Remove support for dyn*

This commit is contained in:
Michael Goulet
2025-06-26 02:01:38 +00:00
parent 4e97337005
commit 2516c33982
143 changed files with 114 additions and 2203 deletions

View File

@@ -796,16 +796,10 @@ impl<'a> Parser<'a> {
///
/// Note that this does *not* parse bare trait objects.
fn parse_dyn_ty(&mut self, impl_dyn_multi: &mut bool) -> PResult<'a, TyKind> {
let lo = self.token.span;
self.bump(); // `dyn`
// parse dyn* types
let syntax = if self.eat(exp!(Star)) {
self.psess.gated_spans.gate(sym::dyn_star, lo.to(self.prev_token.span));
TraitObjectSyntax::DynStar
} else {
TraitObjectSyntax::Dyn
};
// We used to parse `*` for `dyn*` here.
let syntax = TraitObjectSyntax::Dyn;
// Always parse bounds greedily for better error recovery.
let bounds = self.parse_generic_bounds()?;