borrowck: Make ConstraintCategory::CallArgument diagnostics pinpoint specific args#158994
borrowck: Make ConstraintCategory::CallArgument diagnostics pinpoint specific args#158994Enselic wants to merge 2 commits into
ConstraintCategory::CallArgument diagnostics pinpoint specific args#158994Conversation
5a8879d to
4259c85
Compare
This comment has been minimized.
This comment has been minimized.
4259c85 to
eb4f057
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
borrowck: Make `ConstraintCategory::CallArgument` diagnostics pinpoint specific args
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (59ef33b): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (secondary -4.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.1%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 487.967s -> 489.278s (0.27%) |
This comment has been minimized.
This comment has been minimized.
|
cc @rust-lang/clippy |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Sorry, fat thumbs on a smartphone made me accidentally click the "ready" button... |
…t specific args
Before this commit, `ConstraintCategory::CallArgument` diagnostics would
point to the entire call expression:
LL | let b = bar(f, y);
| ^^^^^^^^^ argument requires that `'a` must outlive `'b`
This commit changes the diagnostics to point to the specific argument
that is causing the lifetime issue:
LL | let b = bar(f, y);
| ^ argument requires that `'a` must outlive `'b`
eb4f057 to
a53694c
Compare
Before this commit,
ConstraintCategory::CallArgumentdiagnostics would point to the entire call expression:This commit changes the diagnostics to point to the specific argument that is causing the lifetime issue:
Draft
This is just a draft and not ready for review. (Although if someone says "this will never work because of ..." I would like to hear that, of course)
I am currently primarily interested in running perf on this, to get a sense for is this can be made to work. If not, there are hopefully other ways to achieve the same end result.