]> git.lizzy.rs Git - rust.git/blob - tests/ui/extern/extern-types-distinct-types.stderr
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
[rust.git] / tests / ui / extern / extern-types-distinct-types.stderr
1 error[E0308]: mismatched types
2   --> $DIR/extern-types-distinct-types.rs:9:5
3    |
4 LL |     type A;
5    |     ------ the found foreign type
6 LL |     type B;
7    |     ------ the expected foreign type
8 ...
9 LL | fn foo(r: &A) -> &B {
10    |                  -- expected `&B` because of return type
11 LL |     r
12    |     ^ expected `&B`, found `&A`
13    |
14    = note: expected reference `&B`
15               found reference `&A`
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0308`.