Reject impl Trait bounds in various places where we unconditionally warned since 1.0

This commit is contained in:
Oli Scherer 2025-01-21 09:17:40 +00:00
parent c182ce9cbc
commit c294da3310
21 changed files with 87 additions and 63 deletions

View file

@ -102,8 +102,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
seen_sized_unbound = true;
continue;
}
// There was a `?Trait` bound, but it was not `?Sized`; warn.
self.dcx().span_warn(
// There was a `?Trait` bound, but it was not `?Sized`
self.dcx().span_err(
unbound.span,
"relaxing a default bound only does something for `?Sized`; \
all other traits are not bound by default",