]> git.lizzy.rs Git - rust.git/blob - src/test/ui/estr-subtyping.rs
Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27
[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 }