]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/suggest-let-for-assignment.fixed
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / suggest-let-for-assignment.fixed
1 // run-rustfix
2
3 fn main() {
4     let demo = 1; //~ ERROR cannot find value `demo` in this scope
5     dbg!(demo); //~ ERROR cannot find value `demo` in this scope
6
7     let x = "x"; //~ ERROR cannot find value `x` in this scope
8     println!("x: {}", x); //~ ERROR cannot find value `x` in this scope
9
10     if x == "x" {
11         //~^ ERROR cannot find value `x` in this scope
12         println!("x is 1");
13     }
14
15     let y = 1 + 2; //~ ERROR cannot find value `y` in this scope
16     println!("y: {}", y); //~ ERROR cannot find value `y` in this scope
17 }