mirror of https://github.com/rust-lang/rust
20 lines
523 B
Plaintext
20 lines
523 B
Plaintext
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 `&B`, found `&A`
|
|
|
|
|
= note: expected reference `&B`
|
|
found reference `&A`
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|