From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/static/static-mut-not-pat.stderr | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/ui/static/static-mut-not-pat.stderr (limited to 'tests/ui/static/static-mut-not-pat.stderr') diff --git a/tests/ui/static/static-mut-not-pat.stderr b/tests/ui/static/static-mut-not-pat.stderr new file mode 100644 index 000000000..33c1cd6a5 --- /dev/null +++ b/tests/ui/static/static-mut-not-pat.stderr @@ -0,0 +1,21 @@ +error[E0530]: match bindings cannot shadow statics + --> $DIR/static-mut-not-pat.rs:13:9 + | +LL | static mut a: isize = 3; + | ------------------------ the static `a` is defined here +... +LL | a => {} + | ^ cannot be named the same as a static + +error[E0530]: match bindings cannot shadow statics + --> $DIR/static-mut-not-pat.rs:36:9 + | +LL | static mut STATIC_MUT_FOO: Foo = Foo { bar: Some(Direction::West), baz: NEW_FALSE }; + | ------------------------------------------------------------------------------------ the static `STATIC_MUT_FOO` is defined here +... +LL | STATIC_MUT_FOO => (), + | ^^^^^^^^^^^^^^ cannot be named the same as a static + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0530`. -- cgit v1.2.3