diff options
| author | ashtneoi <ashtneoi@gmail.com> | 2018-08-07 01:02:39 -0700 |
|---|---|---|
| committer | ashtneoi <ashtneoi@gmail.com> | 2018-08-15 15:14:21 -0700 |
| commit | a05f82fd2d6ffdaa4f220e3f1c1a060fe6886dfd (patch) | |
| tree | 8f163a1f308af344bb04e8820e4cb7143388b711 /src/librustc | |
| parent | 7b1013329789e1902577af6bda220dc5a8ac7f37 (diff) | |
| download | rust-a05f82fd2d6ffdaa4f220e3f1c1a060fe6886dfd.tar.gz rust-a05f82fd2d6ffdaa4f220e3f1c1a060fe6886dfd.zip | |
Suggest match ergonomics, not `ref`/`ref mut`
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/mir/mod.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index 6b9cd295621..8ceff303774 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -523,6 +523,8 @@ pub struct VarBindingForm<'tcx> { /// (b) it gives a way to separate this case from the remaining cases /// for diagnostics. pub opt_match_place: Option<(Option<Place<'tcx>>, Span)>, + /// Span of the pattern in which this variable was bound. + pub pat_span: Span, } #[derive(Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable)] @@ -540,7 +542,8 @@ CloneTypeFoldableAndLiftImpls! { BindingForm<'tcx>, } impl_stable_hash_for!(struct self::VarBindingForm<'tcx> { binding_mode, opt_ty_info, - opt_match_place + opt_match_place, + pat_span }); mod binding_form_impl { @@ -710,6 +713,7 @@ impl<'tcx> LocalDecl<'tcx> { binding_mode: ty::BindingMode::BindByValue(_), opt_ty_info: _, opt_match_place: _, + pat_span: _, }))) => true, // FIXME: might be able to thread the distinction between @@ -729,6 +733,7 @@ impl<'tcx> LocalDecl<'tcx> { binding_mode: ty::BindingMode::BindByValue(_), opt_ty_info: _, opt_match_place: _, + pat_span: _, }))) => true, Some(ClearCrossCrate::Set(BindingForm::ImplicitSelf)) => true, |
