mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
26 lines
324 B
Rust
26 lines
324 B
Rust
// check-pass
|
|
// revisions: current next
|
|
//[next] compile-flags: -Ztrait-solver=next
|
|
|
|
trait Foo {
|
|
type Bar<'a>
|
|
where
|
|
Self: Sized;
|
|
|
|
fn test(&self);
|
|
}
|
|
|
|
impl Foo for () {
|
|
type Bar<'a> = () where Self: Sized;
|
|
|
|
fn test(&self) {}
|
|
}
|
|
|
|
fn test(x: &dyn Foo) {
|
|
x.test();
|
|
}
|
|
|
|
fn main() {
|
|
test(&());
|
|
}
|