cc #70551 @eddyb
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
fixed by Fix abuses of tykind::err #70870
fcx. tcx . consts . err . into ( )
fixed by Fix abuses of tykind::err #70870
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
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
let pb = pb. with_self_ty ( self . tcx , self . tcx . types . err ) ;
fixed by ty/walk: iterate GenericArgs instead of Tys. #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 ,
cc #70551 @eddyb
Currently, it appears we are misusing
TyKind::Error(andConst::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
fixed by Fix abuses of tykind::err #70870
rust/src/librustc_typeck/check/wfcheck.rs
Line 715 in 6dee5f1
fixed by Fix abuses of tykind::err #70870
rust/src/librustc_typeck/lib.rs
Line 383 in 6dee5f1
fixed by Fix abuses of tykind::err #70870
rust/src/librustc_typeck/variance/constraints.rs
Line 319 in 6dee5f1
fixed by De-abuse TyKind::Error in pattern type checking #70932
rust/src/librustc_typeck/check/pat.rs
Lines 1428 to 1435 in 42abbd8
fixed by Use trait_object_dummy_self instead of err #71938
rust/src/librustc_typeck/check/closure.rs
Line 180 in 93dc97a
fixed by ty/walk: iterate
GenericArgs instead ofTys. #70164rust/src/librustc_trait_selection/traits/select.rs
Line 3079 in 6dee5f1
fixed by De-abuse TyKind::Error in exhaustiveness checking #71930
rust/src/librustc_mir_build/hair/pattern/_match.rs
Line 900 in 9fed360