summaryrefslogtreecommitdiffstats
path: root/src/test/ui/range/issue-73553-misinterp-range-literal.rs
blob: e65dba0a0382175520a4667b5c5db7ca74b6f289 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
type Range = std::ops::Range<usize>;

fn demo(r: &Range) {
    println!("{:?}", r);
}

fn tell(x: usize) -> usize {
    x
}

fn main() {
    demo(tell(1)..tell(10));
    //~^ ERROR mismatched types
    demo(1..10);
    //~^ ERROR mismatched types
}