1
Fork 0

Rename BindingAnnotation to BindingMode

This commit is contained in:
Jules Bertholet 2024-04-16 19:23:30 -04:00
parent d19e48d79a
commit 2a4624ddd1
No known key found for this signature in database
GPG key ID: 32034DAFC38C1BFC
81 changed files with 222 additions and 256 deletions

View file

@ -46,7 +46,7 @@ use diagnostics::{ElisionFnParameter, LifetimeElisionCandidate, MissingLifetime}
#[derive(Copy, Clone, Debug)]
struct BindingInfo {
span: Span,
annotation: BindingAnnotation,
annotation: BindingMode,
}
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
@ -3655,14 +3655,14 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
fn try_resolve_as_non_binding(
&mut self,
pat_src: PatternSource,
ann: BindingAnnotation,
ann: BindingMode,
ident: Ident,
has_sub: bool,
) -> Option<Res> {
// An immutable (no `mut`) by-value (no `ref`) binding pattern without
// a sub pattern (no `@ $pat`) is syntactically ambiguous as it could
// also be interpreted as a path to e.g. a constant, variant, etc.
let is_syntactic_ambiguity = !has_sub && ann == BindingAnnotation::NONE;
let is_syntactic_ambiguity = !has_sub && ann == BindingMode::NONE;
let ls_binding = self.maybe_resolve_ident_in_lexical_scope(ident, ValueNS)?;
let (res, binding) = match ls_binding {