Skip to content

Commit

Permalink
Report no precedence for : binary operator in non-full mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 29, 2021
1 parent 725fca7 commit 5ced044
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,9 @@ pub(crate) mod parsing {
Precedence::Assign
} else if input.peek(Token![..]) {
Precedence::Range
} else if input.peek(Token![as]) || input.peek(Token![:]) && !input.peek(Token![::]) {
} else if input.peek(Token![as])
|| cfg!(feature = "full") && input.peek(Token![:]) && !input.peek(Token![::])
{
Precedence::Cast
} else {
Precedence::Any
Expand Down

0 comments on commit 5ced044

Please sign in to comment.