1
Fork 0

implement new effects desugaring

This commit is contained in:
Deadbeef 2024-06-14 12:16:15 +00:00
parent 99f77a2eda
commit 72e8244e64
50 changed files with 636 additions and 228 deletions

View file

@ -585,6 +585,7 @@ impl<'a> State<'a> {
self.print_struct(struct_def, generics, item.ident.name, item.span, true);
}
hir::ItemKind::Impl(&hir::Impl {
constness,
safety,
polarity,
defaultness,
@ -599,6 +600,10 @@ impl<'a> State<'a> {
self.print_safety(safety);
self.word_nbsp("impl");
if let hir::Constness::Const = constness {
self.word_nbsp("const");
}
if !generics.params.is_empty() {
self.print_generic_params(generics.params);
self.space();
@ -2144,7 +2149,7 @@ impl<'a> State<'a> {
self.print_type(default);
}
}
GenericParamKind::Const { ty, ref default, is_host_effect: _ } => {
GenericParamKind::Const { ty, ref default, is_host_effect: _, synthetic: _ } => {
self.word_space(":");
self.print_type(ty);
if let Some(default) = default {