summaryrefslogtreecommitdiffstats
path: root/src/test/ui/mismatched_types/show_module.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:11:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:12:43 +0000
commitcf94bdc0742c13e2a0cac864c478b8626b266e1b (patch)
tree044670aa50cc5e2b4229aa0b6b3df6676730c0a6 /src/test/ui/mismatched_types/show_module.stderr
parentAdding debian version 1.65.0+dfsg1-2. (diff)
downloadrustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.tar.xz
rustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.zip
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/test/ui/mismatched_types/show_module.stderr23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/mismatched_types/show_module.stderr b/src/test/ui/mismatched_types/show_module.stderr
new file mode 100644
index 000000000..5e48e0955
--- /dev/null
+++ b/src/test/ui/mismatched_types/show_module.stderr
@@ -0,0 +1,23 @@
+error[E0308]: mismatched types
+ --> $DIR/show_module.rs:14:5
+ |
+LL | fn foo() -> Foo {
+ | --- expected `baz::Foo` because of return type
+LL | meh::Foo
+ | ^^^^^^^^ expected struct `baz::Foo`, found struct `meh::Foo`
+ |
+ = note: struct `meh::Foo` and struct `baz::Foo` have similar names, but are actually distinct types
+note: struct `meh::Foo` is defined in module `crate::meh` of the current crate
+ --> $DIR/show_module.rs:8:5
+ |
+LL | pub struct Foo;
+ | ^^^^^^^^^^^^^^
+note: struct `baz::Foo` is defined in module `crate::blah::baz` of the current crate
+ --> $DIR/show_module.rs:3:9
+ |
+LL | pub struct Foo;
+ | ^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.