Improve suggestion to change struct field to &mut#91516
Improve suggestion to change struct field to &mut#91516bors merged 2 commits intorust-lang:masterfrom
Conversation
|
☔ The latest upstream changes (presumably #92003) made this pull request unmergeable. Please resolve the merge conflicts. |
|
r=me after rebasing |
e535856 to
97bf7b9
Compare
|
r=estebank |
| format!("&{}mut {}", lifetime_snippet, &*type_snippet,), | ||
| )); | ||
| return Some( | ||
| lifetime.span.with_hi(lifetime.span.hi() + BytePos(1)).shrink_to_hi(), |
There was a problem hiding this comment.
| lifetime.span.with_hi(lifetime.span.hi() + BytePos(1)).shrink_to_hi(), | |
| lifetime.span.between(ty.span), |
| lifetime, | ||
| hir::MutTy { mutbl: hir::Mutability::Not, ref ty }, | ||
| ) = field.ty.kind | ||
| if let hir::TyKind::Rptr(lifetime, hir::MutTy { mutbl: hir::Mutability::Not, .. }) = |
There was a problem hiding this comment.
| if let hir::TyKind::Rptr(lifetime, hir::MutTy { mutbl: hir::Mutability::Not, .. }) = | |
| if let hir::TyKind::Rptr(lifetime, hir::MutTy { mutbl: hir::Mutability::Not, ty }) = |
|
Ended up having to change some other things to get it working like that. Does this look good? Also I'd like to know what the |
f444260 to
e573075
Compare
|
@bors r+ rollup
you can do |
|
📌 Commit e573075 has been approved by |
|
💡 This pull request was already approved, no need to approve it again.
|
|
📌 Commit e573075 has been approved by `estebank`` |
|
@bors r=estebank |
|
💡 This pull request was already approved, no need to approve it again.
|
|
📌 Commit e573075 has been approved by |
…estebank Improve suggestion to change struct field to &mut r? `@estebank` Now displays a proper underline style suggestion instead of including the code change inline with the message.
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#91439 (Mark defaulted `PartialEq`/`PartialOrd` methods as const) - rust-lang#91516 (Improve suggestion to change struct field to &mut) - rust-lang#91896 (Remove `in_band_lifetimes` for `rustc_passes`) - rust-lang#91909 (:arrow_up: rust-analyzer) - rust-lang#91922 (Remove `in_band_lifetimes` from `rustc_mir_dataflow`) - rust-lang#92025 (Revert "socket ancillary data implementation for dragonflybsd.") - rust-lang#92030 (Update stdlib to the 2021 edition) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
r? @estebank
Now displays a proper underline style suggestion instead of including the code change inline with the message.