diff options
author | Obei Sideg <obei.sideg@gmail.com> | 2023-05-08 23:38:54 +0300 |
---|---|---|
committer | Obei Sideg <obei.sideg@gmail.com> | 2023-05-10 09:54:56 +0300 |
commit | 2198faeee2a1e3abf30fa71a032aa76c2545c4e3 (patch) | |
tree | 7b3237c1cc7b94b03f0597674e8beb07cf45e7e7 /compiler/rustc_middle | |
parent | a0111af531178e48375f14f838d7a2298524067c (diff) | |
download | rust-2198faeee2a1e3abf30fa71a032aa76c2545c4e3.tar.gz |
Make `NonUseContext::AscribeUserTy` carry `ty::Variance`
Diffstat (limited to 'compiler/rustc_middle')
-rw-r--r-- | compiler/rustc_middle/src/mir/visit.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/mir/visit.rs b/compiler/rustc_middle/src/mir/visit.rs index 6718605ed0b..4b7014e3109 100644 --- a/compiler/rustc_middle/src/mir/visit.rs +++ b/compiler/rustc_middle/src/mir/visit.rs @@ -64,7 +64,7 @@ use crate::mir::*; use crate::ty::subst::SubstsRef; -use crate::ty::{CanonicalUserTypeAnnotation, Ty}; +use crate::ty::{self, CanonicalUserTypeAnnotation, Ty}; use rustc_span::Span; macro_rules! make_mir_visitor { @@ -782,12 +782,12 @@ macro_rules! make_mir_visitor { fn super_ascribe_user_ty(&mut self, place: & $($mutability)? Place<'tcx>, - _variance: $(& $mutability)? ty::Variance, + variance: $(& $mutability)? ty::Variance, user_ty: & $($mutability)? UserTypeProjection, location: Location) { self.visit_place( place, - PlaceContext::NonUse(NonUseContext::AscribeUserTy), + PlaceContext::NonUse(NonUseContext::AscribeUserTy($(* &$mutability *)? variance)), location ); self.visit_user_type_projection(user_ty); @@ -1320,7 +1320,7 @@ pub enum NonUseContext { /// Ending a storage live range. StorageDead, /// User type annotation assertions for NLL. - AscribeUserTy, + AscribeUserTy(ty::Variance), /// The data of a user variable, for debug info. VarDebugInfo, } |