rust/tests/ui/traits/new-solver/pointer-sized.rs
2023-01-19 16:15:28 +00:00

13 lines
287 B
Rust

#![feature(pointer_sized_trait)]
use std::marker::PointerSized;
fn require_pointer_sized(_: impl PointerSized) {}
fn main() {
require_pointer_sized(1usize);
require_pointer_sized(1u16);
//~^ ERROR `u16` needs to be a pointer-sized type
require_pointer_sized(&1i16);
}