diff options
| author | bohan <bohan-zhang@foxmail.com> | 2024-08-06 19:27:15 +0800 |
|---|---|---|
| committer | bohan <bohan-zhang@foxmail.com> | 2024-08-07 22:13:23 +0800 |
| commit | 8c06dc4dda857ce988c35f6207e53edd1502f74b (patch) | |
| tree | 7abe5f1e510e39e7bd65cb9de084a57f318b9da0 /compiler/rustc_resolve/src/check_unused.rs | |
| parent | 9bad7ba324099d124c77c5b06aebf68e11763f7b (diff) | |
| download | rust-8c06dc4dda857ce988c35f6207e53edd1502f74b.tar.gz rust-8c06dc4dda857ce988c35f6207e53edd1502f74b.zip | |
make `import.vis` is not mutable
Diffstat (limited to 'compiler/rustc_resolve/src/check_unused.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/check_unused.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/check_unused.rs b/compiler/rustc_resolve/src/check_unused.rs index a8199971561..75b8ecebdd9 100644 --- a/compiler/rustc_resolve/src/check_unused.rs +++ b/compiler/rustc_resolve/src/check_unused.rs @@ -382,7 +382,7 @@ impl Resolver<'_, '_> { for import in self.potentially_unused_imports.iter() { match import.kind { _ if import.used.get().is_some() - || import.expect_vis().is_public() + || import.vis.is_public() || import.span.is_dummy() => { if let ImportKind::MacroUse { .. } = import.kind { |
