1
Fork 0

fix Rvalue::ty for ThreadLocalRef

This commit is contained in:
Ralf Jung 2020-10-19 10:53:20 +02:00
parent c1766c6372
commit 153e843c49
5 changed files with 19 additions and 14 deletions

View file

@ -1007,13 +1007,13 @@ impl<'tcx> LocalDecl<'tcx> {
}
/// Returns `Some` if this is a reference to a static item that is used to
/// access that static
/// access that static.
pub fn is_ref_to_static(&self) -> bool {
matches!(self.local_info, Some(box LocalInfo::StaticRef { .. }))
}
/// Returns `Some` if this is a reference to a static item that is used to
/// access that static
/// Returns `Some` if this is a reference to a thread-local static item that is used to
/// access that static.
pub fn is_ref_to_thread_local(&self) -> bool {
match self.local_info {
Some(box LocalInfo::StaticRef { is_thread_local, .. }) => is_thread_local,