mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
15 lines
272 B
Rust
15 lines
272 B
Rust
// compile-flags: -Znext-solver
|
|
|
|
#![feature(pointer_like_trait)]
|
|
|
|
use std::marker::PointerLike;
|
|
|
|
fn require_(_: impl PointerLike) {}
|
|
|
|
fn main() {
|
|
require_(1usize);
|
|
require_(1u16);
|
|
//~^ ERROR `u16` needs to have the same ABI as a pointer
|
|
require_(&1i16);
|
|
}
|