Repository navigation
Fix suggestion for mutability mismatch between trait def and trait impl in 2015 edition - #161827
Conversation
b9e27f2 to
2f32fc5
Compare
There was a problem hiding this comment.
(for context: #t-compiler/help > Wrong Ty "scope"(?) in suggestion @ 💬)
It looks like the real problem here is there's no functionality (or we're unaware of it) for "what is the proper path to item X to use it in scope Y". Can you find or create something like that rather than have all of this just to support one case of a type error?
2f32fc5 to
ac9bfb0
Compare
Agreed, the solution I came up with is not satisfying. So I'd love to create this new API, but I will likely need some help. |
|
I think |
|
With With And with So unless I wrote invalid code, I'll instead tweak how we display |
|
Ok I'm a moron. And I'll rewrite these macros because it made me loss way too much time. |
ac9bfb0 to
9ebe169
Compare
This comment has been minimized.
This comment has been minimized.
|
Updated. The fix was actually to allow the 2015 edition to have paths prepended with |
|
@rustbot ready |
There was a problem hiding this comment.
it looks like this test need not have edition 2015/2018 revisions anymore.
There was a problem hiding this comment.
Indeed, removed revisions.
There was a problem hiding this comment.
Can you change this test to run for both edition 2015 and 2018? The differences in path resolution can be quite subtle.
9ebe169 to
7542191
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Applied suggestions. |
|
@bors r+ rollup |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 1303417 (parent) -> 88638df (this PR) Test differencesShow 17 test diffsStage 1
Stage 2
Additionally, 2 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 88638df1e741778019e42fcdf307072865d19501 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (88638df): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeResults (primary -0.0%, secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 485.912s -> 487.826s (0.39%) |
View all comments
This code:
emits:
Which is wrong. This PR fixes it. However the
Tydoesn't hold a context (or at least not a correct one) allowing to have a correct path to theXtype. So instead, in case of a mutability mismatch, we (try to) retrieve the code snippet, and remove/add themutkeyword. If we fail to, we revert to the current behaviour.r? @mejrs