fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.5 KiB61 linesraw
1error: attributes cannot be applied to a function parameter's type
2  --> $DIR/fn-arg-doc-comment.rs:14: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:7:5
15   |
16LL |     /// Other
17   |     ^^^^^^^^^ doc comments are not allowed here
18
19error[E0308]: arguments to this function are incorrect
20  --> $DIR/fn-arg-doc-comment.rs:22:5
21   |
22LL |     f("", "");
23   |     ^ --  -- expected `u8`, found `&str`
24   |       |
25   |       expected `u8`, found `&str`
26   |
27note: function defined here
28  --> $DIR/fn-arg-doc-comment.rs:1:8
29   |
30LL |   pub fn f(
31   |          ^
32LL | /     /// Comment
33LL | |
34LL | |
35LL | |
36LL | |     id: u8,
37   | |__________-
38LL | /     /// Other
39LL | |
40LL | |
41LL | |
42LL | |     a: u8,
43   | |_________-
44
45error[E0308]: mismatched types
46  --> $DIR/fn-arg-doc-comment.rs:26:9
47   |
48LL |     bar("");
49   |     --- ^^ expected `i32`, found `&str`
50   |     |
51   |     arguments to this function are incorrect
52   |
53note: function defined here
54  --> $DIR/fn-arg-doc-comment.rs:14:4
55   |
56LL | fn bar(id: #[allow(dead_code)] i32) {}
57   |    ^^^ ---------------------------
58
59error: aborting due to 5 previous errors
60
61For more information about this error, try `rustc --explain E0308`.