mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
13 lines
284 B
Rust
13 lines
284 B
Rust
trait HasAssoc {
|
|
type Assoc;
|
|
}
|
|
fn hasassoc<T: ?HasAssoc<Assoc = ()>>() {}
|
|
//~^ WARN relaxing a default bound
|
|
|
|
trait NoAssoc {}
|
|
fn noassoc<T: ?NoAssoc<Missing = ()>>() {}
|
|
//~^ WARN relaxing a default bound
|
|
//~| ERROR associated type `Missing` not found for `NoAssoc`
|
|
|
|
fn main() {}
|