Fix suggestion for mutability mismatch between trait def and trait impl in 2051 edition - #161827
GuillaumeGomez wants to merge 1 commit into
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 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. |
|
Updated. The fix was actually to allow the 2015 edition to have paths prepended with |
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