]> git.lizzy.rs Git - rust.git/blob - tests/ui/extern/extern-type-diag-not-similar.rs
Rollup merge of #106113 - krasimirgg:llvm-16-ext-tyid, r=nikic
[rust.git] / tests / ui / extern / extern-type-diag-not-similar.rs
1 // We previously mentioned other extern types in the error message here.
2 //
3 // Two extern types shouldn't really be considered similar just
4 // because they are both extern types.
5
6 #![feature(extern_types)]
7 extern {
8     type ShouldNotBeMentioned;
9 }
10
11 extern {
12     type Foo;
13 }
14
15 unsafe impl Send for ShouldNotBeMentioned {}
16
17 fn assert_send<T: Send + ?Sized>() {}
18
19 fn main() {
20     assert_send::<Foo>()
21     //~^ ERROR `Foo` cannot be sent between threads safely
22 }