]> git.lizzy.rs Git - rust.git/blob - src/test/ui/estr-subtyping.rs
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / estr-subtyping.rs
1 fn wants_uniq(x: String) { }
2 fn wants_slice(x: &str) { }
3
4 fn has_uniq(x: String) {
5    wants_uniq(x);
6    wants_slice(&*x);
7 }
8
9 fn has_slice(x: &str) {
10    wants_uniq(x); //~ ERROR mismatched types
11    wants_slice(x);
12 }
13
14 fn main() {
15 }