rust/tests/ui/traits/issue-65673.rs

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

13 lines
324 B
Rust
Raw Normal View History

2019-11-14 19:29:01 +00:00
#![feature(trait_alias)] // Enabled to reduce stderr output, but can be triggered even if disabled.
trait Trait {}
trait WithType {
type Ctx;
}
trait Alias<T> = where T: Trait;
impl<T> WithType for T {
type Ctx = dyn Alias<T>;
//~^ ERROR at least one trait is required for an object type [E0224]
}
fn main() {}