1
Fork 0

Impl ConstParamTy for tuples, make PartialStructuralEq a supertrait too

This commit is contained in:
Michael Goulet 2023-05-17 03:00:19 +00:00
parent 8ab10bacdf
commit a9fcb524ff
7 changed files with 68 additions and 7 deletions

View file

@ -100,7 +100,8 @@ pub fn type_allowed_to_implement_const_param_ty<'tcx>(
| ty::Str
| ty::Array(..)
| ty::Slice(_)
| ty::Ref(.., hir::Mutability::Not) => return Ok(()),
| ty::Ref(.., hir::Mutability::Not)
| ty::Tuple(_) => return Ok(()),
&ty::Adt(adt, substs) => (adt, substs),