1. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.
2. mir::Mutability -> ast::Mutability.
This commit is contained in:
parent
01a46509a4
commit
a7aec3f207
91 changed files with 292 additions and 319 deletions
|
|
@ -1472,7 +1472,7 @@ impl<'a, 'b> LateResolutionVisitor<'a, '_> {
|
|||
// 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 && bm == BindingMode::ByValue(Mutability::Immutable);
|
||||
let is_syntactic_ambiguity = !has_sub && bm == BindingMode::ByValue(Mutability::Not);
|
||||
|
||||
match res {
|
||||
Res::Def(DefKind::Ctor(_, CtorKind::Const), _) |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue