6

Improve suggestion to change struct field to &mut by rukai · Pull Request #9...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/91516
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Contributor

@estebank estebank left a comment

One nitpick

format!("&{}mut {}", lifetime_snippet, &*type_snippet,),

));

return Some(

lifetime.span.with_hi(lifetime.span.hi() + BytePos(1)).shrink_to_hi(),

Suggested change
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, .. }) =

Suggested change
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 }) =

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK