summary refs log tree commit diff
path: root/src/test/ui/estr-subtyping.rs
blob: 9c5825fff8552456c33f6003babdf82fbeedef92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fn wants_uniq(x: String) { }
fn wants_slice(x: &str) { }

fn has_uniq(x: String) {
   wants_uniq(x);
   wants_slice(&*x);
}

fn has_slice(x: &str) {
   wants_uniq(x); //~ ERROR mismatched types
   wants_slice(x);
}

fn main() {
}