1
Fork 0

More assertions, tests, and miri coverage

This commit is contained in:
Michael Goulet 2025-01-11 19:31:28 +00:00
parent 9dc41a048d
commit d98b99af56
13 changed files with 173 additions and 86 deletions

View file

@ -80,6 +80,8 @@ fn dyn_trait_in_self<'tcx>(
if let GenericArgKind::Type(ty) = arg.unpack()
&& let ty::Dynamic(data, _, _) = ty.kind()
{
// FIXME(arbitrary_self_types): This is likely broken for receivers which
// have a "non-self" trait objects as a generic argument.
return data
.principal()
.map(|principal| tcx.instantiate_bound_regions_with_erased(principal));