From 631cd5845e8de329d0e227aaa707d7ea228b8f8f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:29 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/use/use-mod/use-mod.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/ui/use/use-mod/use-mod.rs (limited to 'tests/ui/use/use-mod/use-mod.rs') diff --git a/tests/ui/use/use-mod/use-mod.rs b/tests/ui/use/use-mod/use-mod.rs new file mode 100644 index 000000000..87064c6a4 --- /dev/null +++ b/tests/ui/use/use-mod/use-mod.rs @@ -0,0 +1,19 @@ +use foo::bar::{ + self, +//~^ ERROR `self` import can only appear once in an import list + Bar, + self +//~^ ERROR the name `bar` is defined multiple times +}; + +use {self}; +//~^ ERROR `self` import can only appear in an import list with a non-empty prefix + +mod foo { + pub mod bar { + pub struct Bar; + pub struct Baz; + } +} + +fn main() {} -- cgit v1.2.3