mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
a9841936fe
Change the implicit `Sized` `Obligation` `Span` for call expressions to include the whole expression. This aids the existing deduplication machinery to reduce the number of errors caused by a single unsized expression.
21 lines
692 B
Plaintext
21 lines
692 B
Plaintext
error[E0277]: the trait bound `for<'a> &'a _: Trait` is not satisfied
|
|
--> $DIR/issue-89333.rs:6:5
|
|
|
|
|
LL | test(&|| 0);
|
|
| ^^^^^^^^^^^ the trait `for<'a> Trait` is not implemented for `&'a _`
|
|
|
|
|
help: this trait has no implementations, consider adding one
|
|
--> $DIR/issue-89333.rs:9:1
|
|
|
|
|
LL | trait Trait {}
|
|
| ^^^^^^^^^^^
|
|
note: required by a bound in `test`
|
|
--> $DIR/issue-89333.rs:11:55
|
|
|
|
|
LL | fn test<T>(arg: &impl Fn() -> T) where for<'a> &'a T: Trait {}
|
|
| ^^^^^ required by this bound in `test`
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|