mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-19 01:50:32 +00:00
Validate let
expressions
Emit an error if they're found in an invalid position.
This commit is contained in:
parent
a1b7169b48
commit
821b791b6d
3 changed files with 261 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
fn foo() {
|
||||
const _: () = let _ = None;
|
||||
|
||||
let _ = if true { (let _ = None) };
|
||||
|
||||
if true && (let _ = None) {
|
||||
(let _ = None);
|
||||
while let _ = None {
|
||||
match None {
|
||||
_ if let _ = None => { let _ = None; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue