summaryrefslogtreecommitdiffstats
path: root/tests/ui/extern/extern-types-distinct-types.stderr
blob: ca25aa64eb8be0454d435a49a6000b06c10bc26e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
error[E0308]: mismatched types
  --> $DIR/extern-types-distinct-types.rs:9:5
   |
LL |     type A;
   |     ------ the found foreign type
LL |     type B;
   |     ------ the expected foreign type
...
LL | fn foo(r: &A) -> &B {
   |                  -- expected `&B` because of return type
LL |     r
   |     ^ expected extern type `B`, found extern type `A`
   |
   = note: expected reference `&B`
              found reference `&A`

error: aborting due to previous error

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