summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorAaron Kofsky <aaronko@umich.edu>2022-06-04 22:27:32 -0400
committerAaron Kofsky <aaronko@umich.edu>2022-06-04 22:27:32 -0400
commit6342b58ef0f71ca0284dced4b1d22f9726c1c74a (patch)
treede665f93801a79abbf08ac31ffdc2bea59790c1a /compiler/rustc_span/src
parente6b66784aca8564557485d902968ff7523cf30ca (diff)
downloadrust-6342b58ef0f71ca0284dced4b1d22f9726c1c74a.tar.gz
rust-6342b58ef0f71ca0284dced4b1d22f9726c1c74a.zip
Use diagnostic items instead of hard coded paths for `let_underscore_lock`
Using diagnostic items avoids having to update the paths if the guard
types ever get moved around for some reason. Additionally, it also greatly
simplifies the `is_sync_lock` check.
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/symbol.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 5c9c16350e4..bc9f5c910df 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -213,6 +213,7 @@ symbols! {
         LinkedList,
         LintPass,
         Mutex,
+        MutexGuard,
         N,
         None,
         Ok,
@@ -250,6 +251,8 @@ symbols! {
         Right,
         RustcDecodable,
         RustcEncodable,
+        RwLockReadGuard,
+        RwLockWriteGuard,
         Send,
         SeqCst,
         SliceIndex,