-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve suggestion to change struct field to &mut #91516
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nitpick
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.