about summary refs log tree commit diff
path: root/tests/ui/impl-trait/transmute/in-defining-scope.rs
blob: 4c8e1852a9104327343bd333ea56beaeceb6ddf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// This causes a query cycle due to using `TypingEnv::PostAnalysis`,
// in #119821 const eval was changed to always use this mode.
//
// See that PR for more details.
use std::mem::transmute;
fn foo() -> impl Sized {
    //~^ ERROR cycle detected when computing type of
    //~| WARN function cannot return without recursing
    unsafe {
        transmute::<_, u8>(foo());
    }
    0u8
}

fn main() {}