2023-02-07 12:02:20 -06:00
|
|
|
// compile-flags: -Ztrait-solver=next
|
|
|
|
|
|
|
|
#![feature(pointer_like_trait)]
|
|
|
|
|
|
|
|
use std::marker::PointerLike;
|
|
|
|
|
|
|
|
fn require_(_: impl PointerLike) {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
require_(1usize);
|
|
|
|
require_(1u16);
|
2023-03-20 15:53:43 -05:00
|
|
|
//~^ ERROR `u16` needs to have the same ABI as a pointer
|
2023-02-07 12:02:20 -06:00
|
|
|
require_(&1i16);
|
|
|
|
}
|