rust/tests/ui/suggestions/issue-104086-suggest-let.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
1023 B
Rust
Raw Normal View History

fn main() {
x = x = x;
2022-11-09 03:10:33 -06:00
//~^ ERROR cannot find value `x` in this scope
//~| ERROR cannot find value `x` in this scope
//~| ERROR cannot find value `x` in this scope
x = y = y = y;
2022-11-09 03:10:33 -06:00
//~^ ERROR cannot find value `y` in this scope
//~| ERROR cannot find value `y` in this scope
//~| ERROR cannot find value `y` in this scope
//~| ERROR cannot find value `x` in this scope
x = y = y;
2022-11-09 03:10:33 -06:00
//~^ ERROR cannot find value `x` in this scope
//~| ERROR cannot find value `y` in this scope
//~| ERROR cannot find value `y` in this scope
x = x = y;
2022-11-09 03:10:33 -06:00
//~^ ERROR cannot find value `x` in this scope
//~| ERROR cannot find value `x` in this scope
//~| ERROR cannot find value `y` in this scope
x = x; // will suggest add `let`
2022-11-09 03:10:33 -06:00
//~^ ERROR cannot find value `x` in this scope
//~| ERROR cannot find value `x` in this scope
x = y // will suggest add `let`
2022-11-09 03:10:33 -06:00
//~^ ERROR cannot find value `x` in this scope
//~| ERROR cannot find value `y` in this scope
}