mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
23 lines
304 B
Rust
23 lines
304 B
Rust
// build-pass
|
|
// compile-flags: -Znext-solver
|
|
|
|
// 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();
|
|
}
|