1
Fork 0

Rollup merge of #135841 - oli-obk:push-qxlnokwrkkym, r=compiler-errors

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

fixes #135730
fixes #135809

Also a breaking change, so let's see what crater says.

This has been an unconditional warning since *before* 1.0
This commit is contained in:
Jacob Pratt 2025-02-12 20:09:57 -05:00 committed by GitHub
commit 6b9b0a0ce8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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",