summaryrefslogtreecommitdiffstats
path: root/tests/ui/imports/issue-19498.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/imports/issue-19498.stderr
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/imports/issue-19498.stderr')
-rw-r--r--tests/ui/imports/issue-19498.stderr47
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/ui/imports/issue-19498.stderr b/tests/ui/imports/issue-19498.stderr
new file mode 100644
index 000000000..9d2602209
--- /dev/null
+++ b/tests/ui/imports/issue-19498.stderr
@@ -0,0 +1,47 @@
+error[E0255]: the name `A` is defined multiple times
+ --> $DIR/issue-19498.rs:3:1
+ |
+LL | use self::A;
+ | ------- previous import of the module `A` here
+LL | use self::B;
+LL | mod A {}
+ | ^^^^^ `A` redefined here
+ |
+ = note: `A` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+ |
+LL | use self::A as OtherA;
+ | ~~~~~~~~~~~~~~~~~
+
+error[E0255]: the name `B` is defined multiple times
+ --> $DIR/issue-19498.rs:5:1
+ |
+LL | use self::B;
+ | ------- previous import of the module `B` here
+...
+LL | pub mod B {}
+ | ^^^^^^^^^ `B` redefined here
+ |
+ = note: `B` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+ |
+LL | use self::B as OtherB;
+ | ~~~~~~~~~~~~~~~~~
+
+error[E0255]: the name `D` is defined multiple times
+ --> $DIR/issue-19498.rs:9:5
+ |
+LL | use C::D;
+ | ---- previous import of the module `D` here
+LL | mod D {}
+ | ^^^^^ `D` redefined here
+ |
+ = note: `D` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+ |
+LL | use C::D as OtherD;
+ | ~~~~~~~~~~~~~~
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0255`.