Refactor FulfillmentError to track less data

Move the information about pointing at the call argument expression in
an unmet obligation span from the `FulfillmentError` to a new
`ObligationCauseCode`.
This commit is contained in:
Esteban Kuber 2021-09-07 11:19:57 +00:00
parent 284a8a9ce7
commit 8a3f712518
11 changed files with 86 additions and 57 deletions

View file

@ -43,7 +43,7 @@ error[E0277]: `dummy1c::TestType` cannot be sent between threads safely
LL | is_send((8, TestType));
| ^^^^^^^^^^^^^ `dummy1c::TestType` cannot be sent between threads safely
|
= help: within `({integer}, dummy1c::TestType)`, the trait `Send` is not implemented for `dummy1c::TestType`
= help: the trait `Send` is not implemented for `dummy1c::TestType`
= note: required because it appears within the type `({integer}, dummy1c::TestType)`
note: required by a bound in `is_send`
--> $DIR/negated-auto-traits-error.rs:16:15
@ -75,7 +75,7 @@ error[E0277]: `dummy3::TestType` cannot be sent between threads safely
LL | is_send(Box::new(Outer2(TestType)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `dummy3::TestType` cannot be sent between threads safely
|
= help: within `Outer2<dummy3::TestType>`, the trait `Send` is not implemented for `dummy3::TestType`
= help: the trait `Send` is not implemented for `dummy3::TestType`
note: required because it appears within the type `Outer2<dummy3::TestType>`
--> $DIR/negated-auto-traits-error.rs:12:8
|

View file

@ -14,7 +14,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation
LL | udrop::<A<[u8]>>(A { 0: *foo() });
| ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `A<[u8]>`, the trait `Sized` is not implemented for `[u8]`
= help: the trait `Sized` is not implemented for `[u8]`
note: required because it appears within the type `A<[u8]>`
--> $DIR/unsized-exprs.rs:3:8
|