From 20431706a863f92cb37dc512fef6e48d192aaf2c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- .../ui/suggestions/suggest-let-for-assignment.fixed | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/ui/suggestions/suggest-let-for-assignment.fixed (limited to 'src/test/ui/suggestions/suggest-let-for-assignment.fixed') diff --git a/src/test/ui/suggestions/suggest-let-for-assignment.fixed b/src/test/ui/suggestions/suggest-let-for-assignment.fixed new file mode 100644 index 000000000..3a25e25ee --- /dev/null +++ b/src/test/ui/suggestions/suggest-let-for-assignment.fixed @@ -0,0 +1,17 @@ +// 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 +} -- cgit v1.2.3