diff options
Diffstat (limited to 'tests/ui/traits/issue-65673.rs')
-rw-r--r-- | tests/ui/traits/issue-65673.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/traits/issue-65673.rs b/tests/ui/traits/issue-65673.rs new file mode 100644 index 000000000..e5c2fccb2 --- /dev/null +++ b/tests/ui/traits/issue-65673.rs @@ -0,0 +1,12 @@ +#![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() {} |