We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96d4e0b commit be2d553Copy full SHA for be2d553
src/test/ui/lifetimes/issue-34979.rs
@@ -0,0 +1,9 @@
1
+trait Foo {}
2
+impl<'a, T> Foo for &'a T {}
3
+
4
+struct Ctx<'a>(&'a ())
5
+where
6
+ &'a (): Foo, //~ ERROR: type annotations needed
7
+ &'static (): Foo;
8
9
+fn main() {}
src/test/ui/lifetimes/issue-34979.stderr
@@ -0,0 +1,14 @@
+error[E0283]: type annotations needed
+ --> $DIR/issue-34979.rs:6:13
+ |
+LL | trait Foo {}
+ | --------- required by this bound in `Foo`
+...
+LL | &'a (): Foo,
+ | ^^^ cannot infer type for reference `&'a ()`
10
+ = note: cannot satisfy `&'a (): Foo`
11
12
+error: aborting due to previous error
13
14
+For more information about this error, try `rustc --explain E0283`.
0 commit comments