rust/tests/ui/traits/next-solver/winnow-specializing-impls.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
304 B
Rust
Raw Normal View History

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