diff --git a/src/test/ui/traits/trait-alias/issue-75983.rs b/src/test/ui/traits/trait-alias/issue-75983.rs new file mode 100644 index 00000000000..f9a7f36de43 --- /dev/null +++ b/src/test/ui/traits/trait-alias/issue-75983.rs @@ -0,0 +1,17 @@ +// check-pass + +#![feature(trait_alias)] + +struct Bar; +trait Foo {} +impl Foo for Bar {} + +trait Baz = Foo where Bar: Foo; + +fn new() -> impl Baz { + Bar +} + +fn main() { + let _ = new(); +}