rust/tests/ui/suggestions/suggest-let-for-assignment.fixed
2023-01-11 09:32:08 +00:00

18 lines
544 B
Rust

// run-rustfix
fn main() {
let demo = 1; //~ ERROR cannot find value `demo` in this scope
dbg!(demo); //~ ERROR cannot find value `demo` in this scope
let x = "x"; //~ ERROR cannot find value `x` in this scope
println!("x: {}", x); //~ ERROR cannot find value `x` in this scope
if x == "x" {
//~^ ERROR cannot find value `x` in this scope
println!("x is 1");
}
let y = 1 + 2; //~ ERROR cannot find value `y` in this scope
println!("y: {}", y); //~ ERROR cannot find value `y` in this scope
}