E0051#
Warning name: ambiguous_precedence
Ambiguous operator precedence.
Some operators have non-intuitive precedence and can lead to confusion. Always use parentheses to make the intent clearer in these cases.
Erroneous example#
///|
pub fn f() -> Int {
1 + 2 << 3
}
Suggestion#
Add parentheses to make the intent clearer.
///|
pub fn f() -> Int {
(1 + 2) << 3
}