]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/deref-suggestion.rs
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / deref-suggestion.rs
index 16d8226bfece10922eadab7144763c791b90f459..04ba4ab905eb1fb8980f046cbae83a7d9ce26c05 100644 (file)
@@ -9,26 +9,26 @@
 // except according to those terms.
 
 macro_rules! borrow {
-    ($x:expr) => { &$x }
+    ($x:expr) => { &$x } //~ ERROR mismatched types
 }
 
 fn foo(_: String) {}
 
 fn foo2(s: &String) {
-    foo(s);
+    foo(s); //~ ERROR mismatched types
 }
 
 fn foo3(_: u32) {}
 fn foo4(u: &u32) {
-    foo3(u);
+    foo3(u); //~ ERROR mismatched types
 }
 
 fn main() {
     let s = String::new();
     let r_s = &s;
     foo2(r_s);
-    foo(&"aaa".to_owned());
-    foo(&mut "aaa".to_owned());
+    foo(&"aaa".to_owned()); //~ ERROR mismatched types
+    foo(&mut "aaa".to_owned()); //~ ERROR mismatched types
     foo3(borrow!(0));
     foo4(&0);
 }