1
Fork 0

Rollup merge of #118396 - compiler-errors:ast-lang-items, r=cjgillot

Collect lang items from AST, get rid of `GenericBound::LangItemTrait`

r? `@cjgillot`
cc #115178

Looking forward, the work to remove `QPath::LangItem` will also be significantly more difficult, but I plan on doing it as well. Specifically, we have to change:
1. A lot of `rustc_ast_lowering` for things like expr `..`
2. A lot of astconv, since we actually instantiate lang and non-lang paths quite differently.
3. A ton of diagnostics and clippy lints that are special-cased via `QPath::LangItem`

Meanwhile, it was pretty easy to remove `GenericBound::LangItemTrait`, so I just did that here.
This commit is contained in:
Jubilee 2023-12-15 14:08:15 -08:00 committed by GitHub
commit 1d54949765
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 504 additions and 412 deletions

View file

@ -2084,11 +2084,6 @@ impl<'a> State<'a> {
}
self.print_poly_trait_ref(tref);
}
GenericBound::LangItemTrait(lang_item, span, ..) => {
self.word("#[lang = \"");
self.print_ident(Ident::new(lang_item.name(), *span));
self.word("\"]");
}
GenericBound::Outlives(lt) => {
self.print_lifetime(lt);
}