We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9cdefd7 + 9b17e2d commit 661be4cCopy full SHA for 661be4c
src/test/ui/associated-types/issue-91069.rs
@@ -0,0 +1,24 @@
1
+// check-pass
2
+
3
+pub trait Associate {
4
+ type Associated;
5
+}
6
7
+pub struct Wrap<'a> {
8
+ pub field: &'a i32,
9
10
11
+pub trait Create<T> {
12
+ fn create() -> Self;
13
14
15
+pub fn oh_no<'a, T>()
16
+where
17
+ Wrap<'a>: Associate,
18
+ <Wrap<'a> as Associate>::Associated: Create<T>,
19
+{
20
+ <Wrap<'a> as Associate>::Associated::create();
21
22
23
24
+pub fn main() {}
src/test/ui/generic-associated-types/issue-91139.rs
@@ -0,0 +1,22 @@
+#![feature(generic_associated_types)]
+trait Foo<T> {
+ type Type<'a>
+ where
+ T: 'a;
+impl<T> Foo<T> for () {
+ T: 'a,
+ = ();
+fn foo<T>() {
+ let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
0 commit comments