about summary refs log tree commit diff
path: root/tests/ui/parser/attribute/attr-binary-expr-ambigous.rs
blob: 613e01d743bdd660ead99bc99fc8bbc3e5d6617f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ run-rustfix
#![feature(stmt_expr_attributes)]
#![allow(unused_assignments, unused_attributes)]

fn main() {
    let mut x = #[deprecated] 1 + 2; //~ ERROR ambiguous

    #[deprecated] x = 4; //~ ERROR ambiguous

    x = #[deprecated] 5 as i32; //~ ERROR ambiguous

    let _r = #[deprecated] 1..6; //~ ERROR ambiguous

    println!("{}", x);
}