summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/pointer-like.rs
blob: 98630176976f5c3bf4b2f21546adffbe9a25c312 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// compile-flags: -Ztrait-solver=next

#![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);
}