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
173 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 () };
2023-04-16 11:12:37 +00:00
//~^ ERROR pointers cannot
println!("{}", A);
}