From 417c09ab2705b38f23b87daa82b1ace0a03a8117 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Sun, 3 Nov 2019 16:52:27 -0500 Subject: [PATCH] Do not needlessly write-lock --- src/librustc_lint/unused.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs index af43030d0f2ae..3f85e6d772ec1 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);