blob: 9ed8dd6c0b1008bf4c9bb333e1f4aa964574a056 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
// Make sure that having an applicable user-written
// and builtin impl is ambiguous.
trait Equals<T: ?Sized> {}
impl<T: ?Sized> Equals<T> for T {}
fn impls_equals<T: Equals<U> + ?Sized, U: ?Sized>() {}
fn main() {
impls_equals::<dyn Equals<u32>, _>();
//~^ ERROR type annotations needed
}
|