mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +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.
30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
error[E0277]: the trait bound `[u8; 1]: Test` is not satisfied
|
|
--> $DIR/issue-90528-unsizing-not-suggestion-110063.rs:9:18
|
|
|
|
|
LL | needs_test::<[u8; 1]>();
|
|
| ^^^^^^^ the trait `Test` is not implemented for `[u8; 1]`
|
|
|
|
|
= help: the trait `Test` is implemented for `&[u8]`
|
|
note: required by a bound in `needs_test`
|
|
--> $DIR/issue-90528-unsizing-not-suggestion-110063.rs:4:18
|
|
|
|
|
LL | fn needs_test<T: Test>() -> T {
|
|
| ^^^^ required by this bound in `needs_test`
|
|
|
|
error[E0277]: the trait bound `[u8; 1]: Test` is not satisfied
|
|
--> $DIR/issue-90528-unsizing-not-suggestion-110063.rs:11:22
|
|
|
|
|
LL | let x: [u8; 1] = needs_test();
|
|
| ^^^^^^^^^^^^ the trait `Test` is not implemented for `[u8; 1]`
|
|
|
|
|
= help: the trait `Test` is implemented for `&[u8]`
|
|
note: required by a bound in `needs_test`
|
|
--> $DIR/issue-90528-unsizing-not-suggestion-110063.rs:4:18
|
|
|
|
|
LL | fn needs_test<T: Test>() -> T {
|
|
| ^^^^ required by this bound in `needs_test`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|