We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c32527f commit 868aa42Copy full SHA for 868aa42
tests/ui/traits/new-solver/nested-obligations-with-bound-vars-gat.rs
@@ -0,0 +1,43 @@
1
+// check-pass
2
+// compile-flags: -Ztrait-solver=next
3
+// Issue 96230
4
+
5
+use std::fmt::Debug;
6
7
+trait Classic {
8
+ type Assoc;
9
+}
10
11
+trait Gat {
12
+ type Assoc<'a>;
13
14
15
+struct Foo;
16
17
+impl Classic for Foo {
18
+ type Assoc = ();
19
20
21
+impl Gat for Foo {
22
+ type Assoc<'i> = ();
23
24
25
+fn classic_debug<T: Classic>(_: T)
26
+where
27
+ T::Assoc: Debug,
28
+{
29
30
31
+fn gat_debug<T: Gat>(_: T)
32
33
+ for<'a> T::Assoc<'a>: Debug,
34
35
36
37
+fn main() {
38
+ classic_debug::<Foo>(Foo); // fine
39
+ classic_debug(Foo); // fine
40
41
+ gat_debug::<Foo>(Foo); // fine
42
+ gat_debug(Foo); // boom
43
0 commit comments