]> git.proxmox.com Git - rustc.git/blob - src/test/ui/deref-suggestion.stderr
New upstream version 1.23.0+dfsg1
[rustc.git] / src / test / ui / deref-suggestion.stderr
1 error[E0308]: mismatched types
2 --> $DIR/deref-suggestion.rs:18:9
3 |
4 18 | foo(s);
5 | ^ expected struct `std::string::String`, found reference
6 |
7 = note: expected type `std::string::String`
8 found type `&std::string::String`
9 = help: here are some functions which might fulfill your needs:
10 - .escape_debug()
11 - .escape_default()
12 - .escape_unicode()
13 - .to_ascii_lowercase()
14 - .to_ascii_uppercase()
15
16 error[E0308]: mismatched types
17 --> $DIR/deref-suggestion.rs:23:10
18 |
19 23 | foo3(u);
20 | ^ expected u32, found &u32
21 |
22 = note: expected type `u32`
23 found type `&u32`
24 = help: try with `*u`
25
26 error[E0308]: mismatched types
27 --> $DIR/deref-suggestion.rs:30:9
28 |
29 30 | foo(&"aaa".to_owned());
30 | ^^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found reference
31 |
32 = note: expected type `std::string::String`
33 found type `&std::string::String`
34 = help: try with `"aaa".to_owned()`
35
36 error[E0308]: mismatched types
37 --> $DIR/deref-suggestion.rs:31:9
38 |
39 31 | foo(&mut "aaa".to_owned());
40 | ^^^^^^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found mutable reference
41 |
42 = note: expected type `std::string::String`
43 found type `&mut std::string::String`
44 = help: try with `"aaa".to_owned()`
45
46 error[E0308]: mismatched types
47 --> $DIR/deref-suggestion.rs:12:20
48 |
49 12 | ($x:expr) => { &$x }
50 | ^^^ expected u32, found &{integer}
51 ...
52 32 | foo3(borrow!(0));
53 | ---------- in this macro invocation
54 |
55 = note: expected type `u32`
56 found type `&{integer}`
57
58 error: aborting due to 5 previous errors
59