1
Fork 0

Parsing , pre-lowering support for precise captures

This commit is contained in:
Michael Goulet 2024-04-03 19:58:50 -04:00
parent 99d0186b1d
commit a076eae0d2
15 changed files with 41 additions and 15 deletions

View file

@ -737,7 +737,7 @@ impl<'a> AstValidator<'a> {
}
}
}
TyKind::ImplTrait(_, bounds) => {
TyKind::ImplTrait(_, bounds, _) => {
if self.is_impl_trait_banned {
self.dcx().emit_err(errors::ImplTraitPath { span: ty.span });
}

View file

@ -569,6 +569,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
gate_all!(fn_delegation, "functions delegation is not yet fully implemented");
gate_all!(postfix_match, "postfix match is experimental");
gate_all!(mut_ref, "mutable by-reference bindings are experimental");
gate_all!(precise_capturing, "precise captures on `impl Trait` are experimental");
if !visitor.features.never_patterns {
if let Some(spans) = spans.get(&sym::never_patterns) {