add docs
This commit is contained in:
parent
443ae83874
commit
0f7bf5d9e1
@ -431,7 +431,7 @@ pub fn super_relate_tys<R: TypeRelation<'tcx>>(
|
||||
let t = relation.relate(&a_t, &b_t)?;
|
||||
match relation.relate(&sz_a, &sz_b) {
|
||||
Ok(sz) => Ok(tcx.mk_ty(ty::Array(t, sz))),
|
||||
// FIXME(lazy_normalization_consts) Implement improved diagnostics for mismatched array
|
||||
// FIXME(#72219) Implement improved diagnostics for mismatched array
|
||||
// length?
|
||||
Err(err) if relation.tcx().features().const_generics => Err(err),
|
||||
Err(err) => {
|
||||
|
@ -99,6 +99,8 @@ impl TypeRelatingDelegate<'tcx> for NllTypeRelatingDelegate<'_, '_, 'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
// We don't have to worry about the equality of consts during borrow checking
|
||||
// as consts always have a static lifetime.
|
||||
fn const_equate(&mut self, _a: &'tcx Const<'tcx>, _b: &'tcx Const<'tcx>) {}
|
||||
|
||||
fn normalization() -> NormalizationStrategy {
|
||||
|
@ -771,7 +771,7 @@ fn contains_illegal_self_type_reference<'tcx>(
|
||||
}
|
||||
|
||||
fn visit_const(&mut self, _c: &ty::Const<'tcx>) -> bool {
|
||||
// FIXME Look into the unevaluated constants for object safety violations.
|
||||
// FIXME(#72219) Look into the unevaluated constants for object safety violations.
|
||||
// Do not walk substitutions of unevaluated consts, as they contain `Self`, even
|
||||
// though the const expression doesn't necessary use it. Currently type variables
|
||||
// inside array length expressions are forbidden, so they can't break the above
|
||||
|
@ -1651,7 +1651,7 @@ fn check_opaque_for_inheriting_lifetimes(tcx: TyCtxt<'tcx>, def_id: LocalDefId,
|
||||
|
||||
fn visit_const(&mut self, c: &'tcx ty::Const<'tcx>) -> bool {
|
||||
if let ty::ConstKind::Unevaluated(..) = c.val {
|
||||
// FIXME(lazy_normalization_consts) We currenctly don't detect lifetimes within substs
|
||||
// FIXME(#72219) We currenctly don't detect lifetimes within substs
|
||||
// which would violate this check. Even though the particular substitution is not used
|
||||
// within the const, this should still be fixed.
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user