-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Description
Currently, it appears we are misusing TyKind::Error
(and Const::Error
) in these places, which we should refactor:
-
fixed by Fix abuses of tykind::err #70870
rust/src/librustc_typeck/check/wfcheck.rs
Line 710 in 6dee5f1
fcx.tcx.types.err.into() -
fixed by Fix abuses of tykind::err #70870
rust/src/librustc_typeck/check/wfcheck.rs
Line 715 in 6dee5f1
fcx.tcx.consts.err.into() -
fixed by Fix abuses of tykind::err #70870
rust/src/librustc_typeck/lib.rs
Line 383 in 6dee5f1
tcx.types.err, -
fixed by Fix abuses of tykind::err #70870
poly_trait_ref.with_self_ty(self.tcx(), self.tcx().types.err); -
fixed by De-abuse TyKind::Error in pattern type checking #70932
rust/src/librustc_typeck/check/pat.rs
Lines 1428 to 1435 in 42abbd8
return (self.tcx.types.err, updated_arr_ty); } else { // We have a variable-length pattern and don't know the array length. // This happens if we have e.g., // `let [a, b, ..] = arr` where `arr: [T; N]` where `const N: usize`. self.error_scrutinee_unfixed_length(span); } (self.tcx.types.err, arr_ty) -
fixed by Use trait_object_dummy_self instead of err #71938
rust/src/librustc_typeck/check/closure.rs
Line 180 in 93dc97a
let pb = pb.with_self_ty(self.tcx, self.tcx.types.err); -
fixed by ty/walk: iterate
GenericArg
s instead ofTy
s. #70164.map(|(i, &k)| if ty_params.contains(i) { tcx.types.err.into() } else { k }); -
fixed by De-abuse TyKind::Error in exhaustiveness checking #71930
(false, ..) => cx.tcx.types.err,