Add Mutability::{is_mut,is_not}

This commit is contained in:
Maybe Waffle 2022-11-23 18:22:51 +00:00
parent 9b9c7d0ecc
commit da40965300
14 changed files with 29 additions and 26 deletions

View file

@ -292,7 +292,7 @@ fn emit_newtype_suggestion_for_raw_ptr(
diag: &mut Diagnostic,
) {
if !self_ty.needs_subst() {
let mut_key = if ptr_ty.mutbl == rustc_middle::mir::Mutability::Mut { "mut " } else { "" };
let mut_key = ptr_ty.mutbl.prefix_str();
let msg_sugg = "consider introducing a new wrapper type".to_owned();
let sugg = vec![
(