rust/tests/ui/consts/issue-25826.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
171 B
Rust
Raw Normal View History

fn id<T>(t: T) -> T { t }
fn main() {
const A: bool = unsafe { id::<u8> as *const () < id::<u16> as *const () };
2022-07-25 08:17:00 +00:00
//~^ ERROR can't compare
println!("{}", A);
}