mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 11:48:30 +00:00
18 lines
319 B
Rust
18 lines
319 B
Rust
![]() |
//@ compile-flags: -Znext-solver
|
||
|
|
||
|
trait Wf {
|
||
|
type Assoc;
|
||
|
}
|
||
|
|
||
|
struct S {
|
||
|
f: &'static <() as Wf>::Assoc,
|
||
|
//~^ ERROR the trait bound `(): Wf` is not satisfied
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
let x: S = todo!();
|
||
|
let y: &() = x.f;
|
||
|
//~^ ERROR mismatched types
|
||
|
//~| ERROR the trait bound `(): Wf` is not satisfied
|
||
|
}
|