diff options
Diffstat (limited to 'src/test/ui/consts/std/slice.rs')
| -rw-r--r-- | src/test/ui/consts/std/slice.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/consts/std/slice.rs b/src/test/ui/consts/std/slice.rs new file mode 100644 index 00000000000..ad38105b6aa --- /dev/null +++ b/src/test/ui/consts/std/slice.rs @@ -0,0 +1,10 @@ +// compile-pass + +struct Wrap<T>(T); +unsafe impl<T> Send for Wrap<T> {} +unsafe impl<T> Sync for Wrap<T> {} + +static FOO: Wrap<*const u32> = Wrap([42, 44, 46].as_ptr()); +static BAR: Wrap<*const u8> = Wrap("hello".as_ptr()); + +fn main() {} |
