diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-01-30 12:00:11 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-01-30 12:26:26 +0000 |
| commit | 4d75f618323cb26a31396f20fe91c35efba9b823 (patch) | |
| tree | 5199029df546a317a16c8e1477bf118b4d9f05d4 /compiler/rustc_save_analysis/src | |
| parent | fd649a3cc5e9f17c8aee070227e8c71f094560b7 (diff) | |
| download | rust-4d75f618323cb26a31396f20fe91c35efba9b823.tar.gz rust-4d75f618323cb26a31396f20fe91c35efba9b823.zip | |
Use `Mutability::{is_mut, is_not}`
Diffstat (limited to 'compiler/rustc_save_analysis/src')
| -rw-r--r-- | compiler/rustc_save_analysis/src/sig.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_save_analysis/src/sig.rs b/compiler/rustc_save_analysis/src/sig.rs index 979305547c1..6d8a2b7c3eb 100644 --- a/compiler/rustc_save_analysis/src/sig.rs +++ b/compiler/rustc_save_analysis/src/sig.rs @@ -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(); |
