rust/tests/ui/extern/extern-types-distinct-types.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
138 B
Rust
Raw Normal View History

2017-09-03 18:53:58 +00:00
#![feature(extern_types)]
2020-09-01 21:12:52 +00:00
extern "C" {
2017-09-03 18:53:58 +00:00
type A;
type B;
}
fn foo(r: &A) -> &B {
r //~ ERROR mismatched types
}
2020-09-01 21:12:52 +00:00
fn main() {}