Files
rust/tests/ui/feature-gates
Stuart Cook f87f9a456c Rollup merge of #147734 - fmease:tighten-relaxed, r=lcnr
Further tighten up relaxed bounds

Follow-up to rust-lang/rust#142693, rust-lang/rust#135331 and rust-lang/rust#135841.
Fixes rust-lang/rust#143122.

* Reject relaxed bounds `?Trait` in the bounds of trait aliases.
  Just like `trait Trait {}` doesn't mean `trait Trait: Sized {}` and we therefore reject `trait Trait: ?Sized {}`, `trait Trait =;` (sic!) doesn't mean `trait Trait = Sized;` (never did!) and as a logical consequence `trait Trait = ?Sized;` is meaningless and should be forbidden.
* Don't permit `?Sized` in more places (e.g., supertrait bounds, trait object types) if feature `more_maybe_bounds` is enabled.
  That internal feature is only meant to allow the user to define & use *new* default traits (that have fewer rules to follow for now to ease experimentation).
* Unconditionally check that the `Trait` in `?Trait` is a default trait.
  Previously, we would only perform this check in selected places which was very brittle and led to bugs slipping through.
* Slightly improve diagnostics.
2025-10-20 22:30:53 +11:00
..
2024-12-13 19:16:15 +01:00
2024-12-13 19:16:15 +01:00
2024-01-13 12:46:58 -05:00
2025-04-06 21:41:47 +02:00
2025-04-06 21:41:47 +02:00
2024-01-13 12:46:58 -05:00
2025-05-21 07:24:43 +00:00
2025-05-21 07:24:43 +00:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2024-08-28 23:32:40 +01:00
2024-08-28 23:32:40 +01:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2025-04-06 21:41:47 +02:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2024-03-27 11:20:28 -04:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2024-09-09 19:39:43 -07:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2024-12-12 16:29:40 +00:00
2024-12-12 16:29:40 +00:00
2024-01-13 12:46:58 -05:00
2024-01-13 12:46:58 -05:00
2025-06-03 10:52:32 -07:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00