提交 29491606 编写于 作者: V varkor

Fix nits

上级 b3a13fdd
......@@ -4,9 +4,9 @@
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
......
......@@ -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(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册