-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Improve location reporting of trait placeholder error #124977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve location reporting of trait placeholder error #124977
Conversation
// We currently do not store the `DefId` in the `ConstraintCategory` | ||
// for performances reasons. The error reporting code used by NLL only | ||
// uses the span, so this doesn't cause any problems at the moment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// We currently do not store the `DefId` in the `ConstraintCategory` | |
// for performances reasons. The error reporting code used by NLL only | |
// uses the span, so this doesn't cause any problems at the moment. |
or adjust accordingly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL
@@ -1,10 +1,13 @@ | |||
error: implementation of `Coroutine` is not general enough | |||
--> $DIR/resume-arg-late-bound.rs:15:5 | |||
| | |||
LL | fn test(a: impl for<'a> Coroutine<&'a mut bool>) {} | |||
| ------------------------------- due to a where-clause on `test`... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The terminology may be a bit surprising here.
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…=<try> Improve location reporting of trait placeholder error Self-explanatory
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (ddbd46c): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 676.223s -> 674.916s (-0.19%) |
70dcbe4
to
59c2bc1
Compare
@rustbot ready |
☔ The latest upstream changes (presumably #127831) made this pull request unmergeable. Please resolve the merge conflicts. |
// Keep this parameter for now, in case we start using | ||
// it in `ConstraintCategory` at some point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Keep this parameter for now, in case we start using | |
// it in `ConstraintCategory` at some point. |
let (leading_ellipsis, satisfy_span, where_span, dup_span, def_id) = | ||
if let ObligationCauseCode::WhereClause(def_id, span) | ||
| ObligationCauseCode::WhereClauseInExpr(def_id, span, ..) = *cause.code() | ||
&& def_id != CRATE_DEF_ID.to_def_id() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this check removed? process_registered_region_obligations
still introduces a dummy crate def-id. Won't it cause issues?
This is a nice improvement but I have no time for this anymore. |
Self-explanatory