Add deref definition location
Update conflict_errors.rs Add deref definition location
This commit is contained in:
parent
8412da6829
commit
99f4573264
|
@ -1568,6 +1568,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
"borrow occurs due to deref coercion to `{}`",
|
||||
deref_target_ty
|
||||
));
|
||||
err.span_note(tcx.def_span(instance.def_id()), "deref defined here");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,11 @@ LL | first;
|
|||
| ----- borrow later used here
|
||||
|
|
||||
= note: borrow occurs due to deref coercion to `DerefTarget`
|
||||
note: deref defined here
|
||||
--> $DIR/issue-81365-1.rs:12:5
|
||||
|
|
||||
LL | type Target = DerefTarget;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -9,6 +9,11 @@ LL | first;
|
|||
| ----- borrow later used here
|
||||
|
|
||||
= note: borrow occurs due to deref coercion to `DerefTarget`
|
||||
note: deref defined here
|
||||
--> $DIR/issue-81365-2.rs:12:5
|
||||
|
|
||||
LL | type Target = DerefTarget;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -9,6 +9,11 @@ LL | first;
|
|||
| ----- borrow later used here
|
||||
|
|
||||
= note: borrow occurs due to deref coercion to `Container`
|
||||
note: deref defined here
|
||||
--> $DIR/issue-81365-3.rs:23:5
|
||||
|
|
||||
LL | type Target = Container;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -9,6 +9,11 @@ LL | first;
|
|||
| ----- borrow later used here
|
||||
|
|
||||
= note: borrow occurs due to deref coercion to `Container`
|
||||
note: deref defined here
|
||||
--> $DIR/issue-81365-4.rs:24:5
|
||||
|
|
||||
LL | type Target = Container;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -9,6 +9,11 @@ LL | first;
|
|||
| ----- borrow later used here
|
||||
|
|
||||
= note: borrow occurs due to deref coercion to `DerefTarget`
|
||||
note: deref defined here
|
||||
--> $DIR/issue-81365-5.rs:19:5
|
||||
|
|
||||
LL | type Target = DerefTarget;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -9,6 +9,11 @@ LL | first;
|
|||
| ----- borrow later used here
|
||||
|
|
||||
= note: borrow occurs due to deref coercion to `[()]`
|
||||
note: deref defined here
|
||||
--> $DIR/issue-81365-6.rs:9:5
|
||||
|
|
||||
LL | type Target = [()];
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -9,6 +9,11 @@ LL | first;
|
|||
| ----- borrow later used here
|
||||
|
|
||||
= note: borrow occurs due to deref coercion to `DerefTarget`
|
||||
note: deref defined here
|
||||
--> $DIR/issue-81365-7.rs:12:5
|
||||
|
|
||||
LL | type Target = DerefTarget;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -9,6 +9,11 @@ LL | first;
|
|||
| ----- borrow later used here
|
||||
|
|
||||
= note: borrow occurs due to deref coercion to `DerefTarget`
|
||||
note: deref defined here
|
||||
--> $DIR/issue-81365-8.rs:12:5
|
||||
|
|
||||
LL | type Target = DerefTarget;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
Loading…
Reference in New Issue