fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.0
1error[E0308]: mismatched types 2 --> $DIR/deref-suggestion.rs:8:9 3 | 4LL | foo(s); 5 | ^ 6 | | 7 | expected struct `std::string::String`, found reference 8 | help: try using a conversion method: `s.to_string()` 9 | 10 = note: expected type `std::string::String` 11 found type `&std::string::String` 12 13error[E0308]: mismatched types 14 --> $DIR/deref-suggestion.rs:14:10 15 | 16LL | foo3(u); 17 | ^ 18 | | 19 | expected u32, found &u32 20 | help: consider dereferencing the borrow: `*u` 21 | 22 = note: expected type `u32` 23 found type `&u32` 24 25error[E0308]: mismatched types 26 --> $DIR/deref-suggestion.rs:30:9 27 | 28LL | foo(&"aaa".to_owned()); 29 | ^^^^^^^^^^^^^^^^^ 30 | | 31 | expected struct `std::string::String`, found reference 32 | help: consider removing the borrow: `"aaa".to_owned()` 33 | 34 = note: expected type `std::string::String` 35 found type `&std::string::String` 36 37error[E0308]: mismatched types 38 --> $DIR/deref-suggestion.rs:32:9 39 | 40LL | foo(&mut "aaa".to_owned()); 41 | ^^^^^^^^^^^^^^^^^^^^^ 42 | | 43 | expected struct `std::string::String`, found mutable reference 44 | help: consider removing the borrow: `"aaa".to_owned()` 45 | 46 = note: expected type `std::string::String` 47 found type `&mut std::string::String` 48 49error[E0308]: mismatched types 50 --> $DIR/deref-suggestion.rs:2:20 51 | 52LL | ($x:expr) => { &$x } 53 | ^^^ expected u32, found &{integer} 54... 55LL | foo3(borrow!(0)); 56 | ---------- in this macro invocation 57 | 58 = note: expected type `u32` 59 found type `&{integer}` 60 61error[E0308]: mismatched types 62 --> $DIR/deref-suggestion.rs:36:5 63 | 64LL | assert_eq!(3i32, &3i32); 65 | ^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found &i32 66 | 67 = note: expected type `i32` 68 found type `&i32` 69 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) 70 71error[E0308]: mismatched types 72 --> $DIR/deref-suggestion.rs:39:17 73 | 74LL | let s = S { u }; 75 | ^ 76 | | 77 | expected &u32, found integer 78 | help: consider borrowing here: `u: &u` 79 | 80 = note: expected type `&u32` 81 found type `{integer}` 82 83error[E0308]: mismatched types 84 --> $DIR/deref-suggestion.rs:41:20 85 | 86LL | let s = S { u: u }; 87 | ^ 88 | | 89 | expected &u32, found integer 90 | help: consider borrowing here: `&u` 91 | 92 = note: expected type `&u32` 93 found type `{integer}` 94 95error[E0308]: mismatched types 96 --> $DIR/deref-suggestion.rs:44:17 97 | 98LL | let r = R { i }; 99 | ^ 100 | | 101 | expected u32, found &{integer} 102 | help: consider dereferencing the borrow: `i: *i` 103 | 104 = note: expected type `u32` 105 found type `&{integer}` 106 107error[E0308]: mismatched types 108 --> $DIR/deref-suggestion.rs:46:20 109 | 110LL | let r = R { i: i }; 111 | ^ 112 | | 113 | expected u32, found &{integer} 114 | help: consider dereferencing the borrow: `*i` 115 | 116 = note: expected type `u32` 117 found type `&{integer}` 118 119error: aborting due to 10 previous errors 120 121For more information about this error, try `rustc --explain E0308`.