blob: 94a222a7e7e011767de973d5c685a97d07c370a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Make sure extern types are !Sized.
#![feature(extern_types)]
extern "C" {
type A;
}
struct Foo {
x: u8,
tail: A,
}
struct Bar<T: ?Sized> {
x: u8,
tail: T,
}
fn assert_sized<T>() {}
fn main() {
assert_sized::<A>();
//~^ ERROR the size for values of type
assert_sized::<Foo>();
//~^ ERROR the size for values of type
assert_sized::<Bar<A>>();
//~^ ERROR the size for values of type
assert_sized::<Bar<Bar<A>>>();
//~^ ERROR the size for values of type
}
|