about summary refs log tree commit diff
path: root/tests/ui/fully-qualified-type/fully-qualified-type-name2.stderr
blob: 90e54dfea2f78a1aa9393fa0caccfeebe290f857 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
error[E0308]: mismatched types
  --> $DIR/fully-qualified-type-name2.rs:14:12
   |
LL | fn bar(x: x::Foo) -> y::Foo {
   |                      ------ expected `y::Foo` because of return type
LL |     return x;
   |            ^ expected `y::Foo`, found `x::Foo`
   |
   = note: `x::Foo` and `y::Foo` have similar names, but are actually distinct types
note: `x::Foo` is defined in module `crate::x` of the current crate
  --> $DIR/fully-qualified-type-name2.rs:6:5
   |
LL |     pub enum Foo { }
   |     ^^^^^^^^^^^^
note: `y::Foo` is defined in module `crate::y` of the current crate
  --> $DIR/fully-qualified-type-name2.rs:10:5
   |
LL |     pub enum Foo { }
   |     ^^^^^^^^^^^^

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0308`.