about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2019-11-05 09:49:59 +0100
committerGitHub <noreply@github.com>2019-11-05 09:49:59 +0100
commitdc40c9389a02fa0cff6ac15402c787e4b5ab260a (patch)
tree0e9190b6d51ea83abeb4e32de43d7056c514b4c2
parent1d5cb17ebec9723f5d24e6bc41835a24dbb373cb (diff)
parent417c09ab2705b38f23b87daa82b1ace0a03a8117 (diff)
downloadrust-dc40c9389a02fa0cff6ac15402c787e4b5ab260a.tar.gz
rust-dc40c9389a02fa0cff6ac15402c787e4b5ab260a.zip
Rollup merge of #66073 - Mark-Simulacrum:no-borrow-mut, r=Centril
Do not needlessly write-lock

Just removes a needless `borrow_mut()` by using `borrow()` instead.
-rw-r--r--src/librustc_lint/unused.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs
index af43030d0f2..3f85e6d772e 100644
--- a/src/librustc_lint/unused.rs
+++ b/src/librustc_lint/unused.rs
@@ -309,7 +309,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedAttributes {
             }
         }
 
-        let plugin_attributes = cx.sess().plugin_attributes.borrow_mut();
+        let plugin_attributes = cx.sess().plugin_attributes.borrow();
         for &(name, ty) in plugin_attributes.iter() {
             if ty == AttributeType::Whitelisted && attr.check_name(name) {
                 debug!("{:?} (plugin attr) is whitelisted with ty {:?}", name, ty);