about summary refs log tree commit diff
path: root/tests/ui/layout/unknown-when-ptr-metadata-is-DST.rs
blob: 54f339711d5c12fb603017ac957023a44912bf1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(ptr_metadata)]
#![feature(trivial_bounds)]

fn return_str()
where
    str: std::ptr::Pointee<Metadata = str>,
{
    [(); { let _a: Option<&str> = None; 0 }];
    //~^ ERROR the type `str` has an unknown layout
}

fn main() {}