Use Mutability::{is_mut, is_not}
This commit is contained in:
parent
fd649a3cc5
commit
4d75f61832
11 changed files with 13 additions and 21 deletions
|
@ -29,7 +29,6 @@ use crate::{id_from_def_id, SaveContext};
|
|||
|
||||
use rls_data::{SigElement, Signature};
|
||||
|
||||
use rustc_ast::Mutability;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::{DefKind, Res};
|
||||
use rustc_hir_pretty::id_to_string;
|
||||
|
@ -769,7 +768,7 @@ impl<'hir> Sig for hir::ForeignItem<'hir> {
|
|||
}
|
||||
hir::ForeignItemKind::Static(ref ty, m) => {
|
||||
let mut text = "static ".to_owned();
|
||||
if m == Mutability::Mut {
|
||||
if m.is_mut() {
|
||||
text.push_str("mut ");
|
||||
}
|
||||
let name = self.ident.to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue