changed the information provided by (mut x) to mut x (Fix 155030)#155095
changed the information provided by (mut x) to mut x (Fix 155030)#155095rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Conversation
|
r? @nnethercote rustbot has assigned @nnethercote. Use Why was this reviewer chosen?The reviewer was selected based on:
|
There was a problem hiding this comment.
The PR title and description need updating: they should provide a brief description of the change being made. (The PR description can include the words "Fixes 155095" so that GitHub knows this is a fix for that issue.)
Also, for next time, when doing a PR that changes an error message and also adds a new ui test, it's very helpful for reviewers if you add the new ui test in the first commit, and then make the error message change in the second commit. That way the change in behaviour is completely clear.
| if let Ok(pat_snippet) = | ||
| self.infcx.tcx.sess.source_map().span_to_snippet(pat_span) | ||
| { | ||
| if pat_snippet.trim_start().starts_with('&') { |
There was a problem hiding this comment.
Converting to a string and then doing a string search is not the right way to do this. There must be a way to achieve the same behaviour by inspecting the IR data structure directly.
There was a problem hiding this comment.
Starting with the next issue handling, we will separate the commits for adding new tests from the commits for resolving the issue.
We will make the necessary corrections to the code you mentioned as soon as possible.
Thank you for your explanation.
|
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. |
|
@bors r+ rollup |
changed the information provided by (mut x) to mut x (Fix 155030) When trying to change a value without using mut in a for loop, the recommendation for this change is incorrect, so I am correcting it. resolve: rust-lang#155030
changed the information provided by (mut x) to mut x (Fix 155030) When trying to change a value without using mut in a for loop, the recommendation for this change is incorrect, so I am correcting it. resolve: rust-lang#155030
changed the information provided by (mut x) to mut x (Fix 155030) When trying to change a value without using mut in a for loop, the recommendation for this change is incorrect, so I am correcting it. resolve: rust-lang#155030
Rollup of 13 pull requests Successful merges: - #152980 (c-variadic: fix implementation on `avr`) - #154491 (Extend `core::char`'s documentation of casing issues (and fix a rustdoc bug)) - #155354 (Remove AttributeSafety from BUILTIN_ATTRIBUTES) - #154970 (rustdoc: preserve `doc(cfg)` on locally re-exported type aliases) - #155095 (changed the information provided by (mut x) to mut x (Fix 155030)) - #155358 (ImproperCTypes: Move erasing_region_normalisation into helper function) - #155377 (tests/debuginfo/basic-stepping.rs: Remove FIXME related to ZSTs) - #155383 (Rearrange `rustc_ast_pretty`) - #155384 (triagebot: notify on diagnostic attribute changes) - #155386 (Use `box_new` diagnostic item for Box::new suggestions) - #155391 (Small refactor of `QueryJob::latch` method) - #155395 (Tweak how the "copy path" rustdoc button works to allow some accessibility tool to work with rustdoc) - #155396 (`as_ref_unchecked` docs link fix)
Rollup of 19 pull requests Successful merges: - #141633 (Suggest to bind `self.x` to `x` when field `x` may be in format string) - #152980 (c-variadic: fix implementation on `avr`) - #154491 (Extend `core::char`'s documentation of casing issues (and fix a rustdoc bug)) - #155318 (Use mutable pointers for Unix path buffers) - #155335 (Bump bootstrap to 1.96 beta) - #155354 (Remove AttributeSafety from BUILTIN_ATTRIBUTES) - #154970 (rustdoc: preserve `doc(cfg)` on locally re-exported type aliases) - #155095 (changed the information provided by (mut x) to mut x (Fix 155030)) - #155305 (Make `convert_while_ascii` unsafe) - #155358 (ImproperCTypes: Move erasing_region_normalisation into helper function) - #155377 (tests/debuginfo/basic-stepping.rs: Remove FIXME related to ZSTs) - #155383 (Rearrange `rustc_ast_pretty`) - #155384 (triagebot: notify on diagnostic attribute changes) - #155386 (Use `box_new` diagnostic item for Box::new suggestions) - #155391 (Small refactor of `QueryJob::latch` method) - #155395 (Tweak how the "copy path" rustdoc button works to allow some accessibility tool to work with rustdoc) - #155396 (`as_ref_unchecked` docs link fix) - #155411 (compiletest: Remove the `//@ should-ice` directive) - #155413 (fix: typo in `std::fs::hard_link` documentation)
Rollup of 19 pull requests Successful merges: - rust-lang/rust#141633 (Suggest to bind `self.x` to `x` when field `x` may be in format string) - rust-lang/rust#152980 (c-variadic: fix implementation on `avr`) - rust-lang/rust#154491 (Extend `core::char`'s documentation of casing issues (and fix a rustdoc bug)) - rust-lang/rust#155318 (Use mutable pointers for Unix path buffers) - rust-lang/rust#155335 (Bump bootstrap to 1.96 beta) - rust-lang/rust#155354 (Remove AttributeSafety from BUILTIN_ATTRIBUTES) - rust-lang/rust#154970 (rustdoc: preserve `doc(cfg)` on locally re-exported type aliases) - rust-lang/rust#155095 (changed the information provided by (mut x) to mut x (Fix 155030)) - rust-lang/rust#155305 (Make `convert_while_ascii` unsafe) - rust-lang/rust#155358 (ImproperCTypes: Move erasing_region_normalisation into helper function) - rust-lang/rust#155377 (tests/debuginfo/basic-stepping.rs: Remove FIXME related to ZSTs) - rust-lang/rust#155383 (Rearrange `rustc_ast_pretty`) - rust-lang/rust#155384 (triagebot: notify on diagnostic attribute changes) - rust-lang/rust#155386 (Use `box_new` diagnostic item for Box::new suggestions) - rust-lang/rust#155391 (Small refactor of `QueryJob::latch` method) - rust-lang/rust#155395 (Tweak how the "copy path" rustdoc button works to allow some accessibility tool to work with rustdoc) - rust-lang/rust#155396 (`as_ref_unchecked` docs link fix) - rust-lang/rust#155411 (compiletest: Remove the `//@ should-ice` directive) - rust-lang/rust#155413 (fix: typo in `std::fs::hard_link` documentation)
When trying to change a value without using mut in a for loop, the recommendation for this change is incorrect, so I am correcting it.
resolve: #155030