2023-07-04 18:06:41 +00:00
|
|
|
//@ build-pass
|
2023-12-14 13:11:28 +01:00
|
|
|
//@ compile-flags: -Znext-solver
|
2023-07-04 18:06:41 +00:00
|
|
|
|
|
|
|
// 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();
|
|
|
|
}
|