23 lines
310 B
Rust
23 lines
310 B
Rust
|
// build-pass
|
||
|
// compile-flags: -Ztrait-solver=next
|
||
|
|
||
|
// Tests that the specializing impl `<() as Foo>` holds during codegen.
|
||
|
|
||
|
#![feature(min_specialization)]
|
||
|
|
||
|
trait Foo {
|
||
|
fn bar();
|
||
|
}
|
||
|
|
||
|
impl<T> Foo for T {
|
||
|
default fn bar() {}
|
||
|
}
|
||
|
|
||
|
impl Foo for () {
|
||
|
fn bar() {}
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
<() as Foo>::bar();
|
||
|
}
|