Skip to content

Commit 2c2e2c5

Browse files
committedOct 12, 2018
Auto merge of #54942 - matthewjasper:wf-type-annotations, r=nikomatsakis
[NLL] Check user types are well-formed Also contains a change of span for AscribeUserType. I'm not quite sure if this was what @nikomatsakis was thinking. Closes #54620 r? @nikomatsakis
2 parents 945372d + c312e04 commit 2c2e2c5

File tree

42 files changed

+343
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+343
-134
lines changed
 

‎src/librustc/mir/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ pub struct LocalDecl<'tcx> {
710710
/// e.g. via `let x: T`, then we carry that type here. The MIR
711711
/// borrow checker needs this information since it can affect
712712
/// region inference.
713-
pub user_ty: Option<CanonicalTy<'tcx>>,
713+
pub user_ty: Option<(CanonicalTy<'tcx>, Span)>,
714714

715715
/// Name of the local, used in debuginfo and pretty-printing.
716716
///

‎src/librustc/mir/visit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ macro_rules! make_mir_visitor {
735735
local,
736736
source_info: *source_info,
737737
});
738-
if let Some(user_ty) = user_ty {
738+
if let Some((user_ty, _)) = user_ty {
739739
self.visit_user_ty(user_ty);
740740
}
741741
self.visit_source_info(source_info);

0 commit comments

Comments
 (0)