blob: 70a0403fc38cb14ac0058656682bb84fbca0c7b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// Regression test for <https://github.com/rust-lang/rust/issues/141844>.
fn main() {
// The following expression gets desugared into something like:
// ```
// let (lhs,) = x; (let x = 1) = lhs;
// ```
// This used to ICE since we haven't yet declared the type for `x` when
// checking the first desugared statement, whose RHS resolved to `x` since
// in the AST, the `let` expression was visited first.
(let x = 1,) = x;
//~^ ERROR expected expression, found `let` statement
}
|