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

fn return_str()
where
    str: std::ptr::Pointee<Metadata = str>,
{
    [(); { let _a: Option<&str> = None; 0 }];
    //~^ ERROR entering unreachable code
    //~| NOTE evaluation of `return_str::{constant#0}` failed here
}

fn main() {}