fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
834 B22 linesraw
1error[E0277]: the trait bound `for<'a> &'a T: Bar` is not satisfied
2  --> $DIR/correct-binder-for-arbitrary-bound-sugg.rs:13:11
3   |
4LL | fn foo<T: Foo>() {}
5   |           ^^^ the trait `for<'a> Bar` is not implemented for `&'a T`
6   |
7note: required by a bound in `Foo`
8  --> $DIR/correct-binder-for-arbitrary-bound-sugg.rs:3:23
9   |
10LL | trait Foo
11   |       --- required by a bound in this trait
12LL | where
13LL |     for<'a> &'a Self: Bar,
14   |                       ^^^ required by this bound in `Foo`
15help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
16   |
17LL | fn foo<T: Foo>() where for<'a> &'a T: Bar {}
18   |                  ++++++++++++++++++++++++
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0277`.