Skip to content

Commit

Permalink
Fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed May 28, 2019
1 parent b3a13fd commit 2949160
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/librustc/infer/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use crate::ty::{self, Ty, Const, TyCtxt, TypeFoldable, InferConst, TypeFlags};
use crate::ty::fold::{TypeFolder, TypeVisitor};

///////////////////////////////////////////////////////////////////////////
// OPPORTUNISTIC KIND RESOLVER
// OPPORTUNISTIC VAR RESOLVER

/// The opportunistic kind resolver can be used at any time. It simply replaces
/// The opportunistic resolver can be used at any time. It simply replaces
/// type/const variables that have been unified with the things they have
/// been unified with (similar to `shallow_resolve`, but deep). This is
/// useful for printing messages etc but also required at various
Expand Down
5 changes: 2 additions & 3 deletions src/librustc/ty/relate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,8 @@ pub fn super_relate_tys<'a, 'gcx, 'tcx, R>(relation: &mut R,
match relation.relate(&sz_a, &sz_b) {
Ok(sz) => Ok(tcx.mk_ty(ty::Array(t, sz))),
Err(err) => {
// Check whether the lengths are both `usize`s,
// but differ in value, for better diagnostics.
// FIXME(eddyb) get the right param_env.
// Check whether the lengths are both concrete/known values,
// but are unequal, for better diagnostics.
match (sz_a.assert_usize(tcx), sz_b.assert_usize(tcx)) {
(Some(sz_a_val), Some(sz_b_val)) => {
Err(TypeError::FixedArraySize(
Expand Down

0 comments on commit 2949160

Please sign in to comment.