We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2ea6611 + 6bc5fdd commit cc8040eCopy full SHA for cc8040e
src/test/ui/type-alias-impl-trait/issue-101750.rs
@@ -0,0 +1,37 @@
1
+#![feature(type_alias_impl_trait)]
2
+
3
+// check-pass
4
5
+trait Trait {}
6
7
+type TAIT = impl Trait;
8
9
+struct Concrete;
10
+impl Trait for Concrete {}
11
12
+fn tait() -> TAIT {
13
+ Concrete
14
+}
15
16
+trait OuterTrait {
17
+ type Item;
18
19
+struct Dummy<T> {
20
+ t: T,
21
22
+impl<T> OuterTrait for Dummy<T> {
23
+ type Item = T;
24
25
26
+fn tait_and_impl_trait() -> impl OuterTrait<Item = (TAIT, impl Trait)> {
27
+ Dummy {
28
+ t: (tait(), Concrete),
29
+ }
30
31
32
+fn tait_and_dyn_trait() -> impl OuterTrait<Item = (TAIT, Box<dyn Trait>)> {
33
+ let b: Box<dyn Trait> = Box::new(Concrete);
34
+ Dummy { t: (tait(), b) }
35
36
37
+fn main() {}
0 commit comments