fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.3 KiB48 linesraw
1error: attributes cannot be applied to a function parameter's type
2  --> $DIR/fn-arg-doc-comment.rs:12:12
3   |
4LL | fn bar(id: #[allow(dead_code)] i32) {}
5   |            ^^^^^^^^^^^^^^^^^^^ attributes are not allowed here
6
7error: documentation comments cannot be applied to function parameters
8  --> $DIR/fn-arg-doc-comment.rs:2:5
9   |
10LL |     /// Comment
11   |     ^^^^^^^^^^^ doc comments are not allowed here
12
13error: documentation comments cannot be applied to function parameters
14  --> $DIR/fn-arg-doc-comment.rs:6:5
15   |
16LL |     /// Other
17   |     ^^^^^^^^^ doc comments are not allowed here
18
19error[E0308]: mismatched types
20  --> $DIR/fn-arg-doc-comment.rs:18:7
21   |
22LL |     f("", "");
23   |       ^^ expected u8, found reference
24   |
25   = note: expected type `u8`
26              found type `&'static str`
27
28error[E0308]: mismatched types
29  --> $DIR/fn-arg-doc-comment.rs:18:11
30   |
31LL |     f("", "");
32   |           ^^ expected u8, found reference
33   |
34   = note: expected type `u8`
35              found type `&'static str`
36
37error[E0308]: mismatched types
38  --> $DIR/fn-arg-doc-comment.rs:25:9
39   |
40LL |     bar("");
41   |         ^^ expected i32, found reference
42   |
43   = note: expected type `i32`
44              found type `&'static str`
45
46error: aborting due to 6 previous errors
47
48For more information about this error, try `rustc --explain E0308`.