Skip to content

Commit

Permalink
pacify the mercilous tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Sep 10, 2018
1 parent 7e1b978 commit 05a6e1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs
Expand Up @@ -547,7 +547,10 @@ impl<'cx, 'bccx, 'gcx, 'tcx> TypeRelation<'cx, 'gcx, 'tcx>

// Reset ambient variance to contravariance. See the
// covariant case above for an explanation.
let variance = ::std::mem::replace(&mut self.ambient_variance, ty::Variance::Contravariant);
let variance = ::std::mem::replace(
&mut self.ambient_variance,
ty::Variance::Contravariant,
);

self.relate(a.skip_binder(), b.skip_binder())?;

Expand Down Expand Up @@ -629,7 +632,7 @@ impl<'cx, 'gcx, 'tcx> TypeVisitor<'tcx> for ScopeInstantiator<'cx, 'gcx, 'tcx> {
/// so that the resulting generalized type is independent from the
/// scopes.
///
/// [blog post]: http://smallcultfollowing.com/babysteps/blog/2014/07/09/an-experimental-new-type-inference-scheme-for-rust/
/// [blog post]: https://is.gd/0hKvIr
struct TypeGeneralizer<'me, 'bccx: 'me, 'gcx: 'tcx, 'tcx: 'bccx> {
type_rel: &'me TypeRelating<'me, 'bccx, 'gcx, 'tcx>,

Expand Down
3 changes: 2 additions & 1 deletion src/librustc_mir/hair/pattern/_match.rs
Expand Up @@ -1235,7 +1235,8 @@ fn pat_constructors<'tcx>(cx: &mut MatchCheckCtxt,
-> Option<Vec<Constructor<'tcx>>>
{
match *pat.kind {
PatternKind::AscribeUserType { ref subpattern, .. } => pat_constructors(cx, subpattern, pcx),
PatternKind::AscribeUserType { ref subpattern, .. } =>
pat_constructors(cx, subpattern, pcx),
PatternKind::Binding { .. } | PatternKind::Wild => None,
PatternKind::Leaf { .. } | PatternKind::Deref { .. } => Some(vec![Single]),
PatternKind::Variant { adt_def, variant_index, .. } => {
Expand Down

0 comments on commit 05a6e1e

Please sign in to comment.