]> git.lizzy.rs Git - rust.git/commitdiff
Remove `requires_sync`
authorDylan MacKenzie <ecstaticmorse@gmail.com>
Wed, 30 Oct 2019 00:17:30 +0000 (17:17 -0700)
committerDylan MacKenzie <ecstaticmorse@gmail.com>
Fri, 15 Nov 2019 18:33:32 +0000 (10:33 -0800)
src/librustc_mir/transform/check_consts/mod.rs

index a5b711e75a603e01535d1bde8c7d74bfe312be10..4d00aaf7abc212df6c1c571a7ebf9b986a61253d 100644 (file)
@@ -95,16 +95,6 @@ pub fn is_static(self) -> bool {
             ConstKind::ConstFn | ConstKind::Const => false,
         }
     }
-
-    /// Returns `true` if the value returned by this item must be `Sync`.
-    ///
-    /// This returns false for `StaticMut` since all accesses to one are `unsafe` anyway.
-    pub fn requires_sync(self) -> bool {
-        match self {
-            ConstKind::Static => true,
-            ConstKind::ConstFn | ConstKind::Const |  ConstKind::StaticMut => false,
-        }
-    }
 }
 
 impl fmt::Display for ConstKind {