summaryrefslogtreecommitdiffstats
path: root/tests/ui/double-ref.rs
blob: e68b86833764fdd80390b389e3a5b5582fbd70d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// run-pass

#![allow(dead_code)]
// pretty-expanded FIXME #23616

fn check_expr() {
    let _:         & usize =     &1;
    let _:       & & usize =    &&1;
    let _:     & & & usize =   &&&1;
    let _:     & & & usize =  & &&1;
    let _:   & & & & usize =  &&&&1;
    let _:   & & & & usize = & &&&1;
    let _: & & & & & usize = &&&&&1;
}

fn check_ty() {
    let _:     &usize =         & 1;
    let _:    &&usize =       & & 1;
    let _:   &&&usize =     & & & 1;
    let _:  & &&usize =     & & & 1;
    let _:  &&&&usize =   & & & & 1;
    let _: & &&&usize =   & & & & 1;
    let _: &&&&&usize = & & & & & 1;
}

fn check_pat() {
    let     &_ =         & 1_usize;
    let    &&_ =       & & 1_usize;
    let   &&&_ =     & & & 1_usize;
    let  & &&_ =     & & & 1_usize;
    let  &&&&_ =   & & & & 1_usize;
    let & &&&_ =   & & & & 1_usize;
    let &&&&&_ = & & & & & 1_usize;
}

pub fn main() {}