Uh oh!
There was an error while loading. Please reload this page.
borrowck: consolidate mut suggestions - #40841
Conversation
estebank
left a comment
There was a problem hiding this comment.
I like it (besides a couple of nitpicks).
There was a problem hiding this comment.
Shouldn't it suggest &mut self in that case?
There was a problem hiding this comment.
Nope. Binding vs. reference - the code is intentionally careful to do the right thing.
There was a problem hiding this comment.
I see, you're right, of course.
There was a problem hiding this comment.
What's the procedure to remove Errors that we no longer emit?
There was a problem hiding this comment.
there's no such procedure.
There was a problem hiding this comment.
We put these into register_diagnostics! {}, commented out, although a better way to annotate codes that may not be reused should be made.
There was a problem hiding this comment.
@nagisa are you saying that this modification (the commenting out here) is okay as is? Or are you saying it shouldn't stay here under register_long_diagnostics!, and should ... move to register_diagnostics!...?
I think you must mean the former, that this is okay as is... Let us know if I misunderstand.
There was a problem hiding this comment.
(well I guess deleting all this long commented-out diagnostic text and replacing it with one line in register_diagnostics! could be an attractive option...)
ghost
commented
Mar 26, 2017
Is #35927 supposed to link somewhere else? |
This converts all of borrowck's `mut` suggestions to a new `mc::ImmutabilityBlame` API instead of the current mix of various hacks. Fixesrust-lang#35937. Fixesrust-lang#40823.
@whataloadofwhat Indeed. Updated & fixed. BTW, @eddyb & @petrochenkov - is there a cleaner way of determining whether a function has an implicit self? |
eddyb
commented
Mar 27, 2017
@arielb1 Doubt it. It might be better idea to preserve the distinction in |
pnkfelix
commented
Mar 29, 2017
@bors r+ |
bors
commented
Mar 29, 2017
📌 Commit 39011f8 has been approved by |
borrowck: consolidate `mut` suggestions This converts all of borrowck's `mut` suggestions to a new `mc::ImmutabilityBlame` API instead of the current mix of various hacks. Fixesrust-lang#35937. Fixesrust-lang#40823. Fixesrust-lang#40859. cc @estebank r? @pnkfelix
This converts all of borrowck's
mutsuggestions to a newmc::ImmutabilityBlameAPI instead of the current mix of various hacks.Fixes#35937.
Fixes#40823.
Fixes#40859.
cc @estebank
r? @pnkfelix