16
16
register_long_diagnostics ! {
17
17
18
18
E0533 : r##"
19
- The export_name attribute was badly formatted .
19
+ The ` export_name` attribute was malformed .
20
20
21
21
Erroneous code example:
22
22
@@ -27,19 +27,19 @@ pub fn something() {}
27
27
fn main() {}
28
28
```
29
29
30
- The export_name attribute expects a string in order to determine the name of
30
+ The ` export_name` attribute expects a string in order to determine the name of
31
31
the exported symbol. Example:
32
32
33
33
```
34
- #[export_name = "some function "] // ok!
34
+ #[export_name = "some_function "] // ok!
35
35
pub fn something() {}
36
36
37
37
fn main() {}
38
38
```
39
39
"## ,
40
40
41
41
E0534 : r##"
42
- The inline attribute was badly used .
42
+ The ` inline` attribute was malformed .
43
43
44
44
Erroneous code example:
45
45
@@ -50,30 +50,32 @@ pub fn something() {}
50
50
fn main() {}
51
51
```
52
52
53
- The inline attribute can be used without arguments :
53
+ The parenthesized ` inline` attribute requires the parameter to be specified :
54
54
55
- ```
56
- #[inline] // ok!
57
- pub fn something() {}
55
+ ```ignore
56
+ #[inline(always)]
57
+ fn something() {}
58
58
59
- fn main() {}
59
+ // or:
60
+
61
+ #[inline(never)]
62
+ fn something() {}
60
63
```
61
64
62
- Or with arguments (and parens have to be used for this case!):
65
+ Alternatively, a paren-less version of the attribute may be used to hint the
66
+ compiler about inlining opportunity:
63
67
64
68
```
65
- #[inline(always)] // ok!
66
- pub fn something() {}
67
-
68
- fn main() {}
69
+ #[inline]
70
+ fn something() {}
69
71
```
70
72
71
- For more information about the inline attribute, take a look here :
73
+ For more information about the inline attribute, read :
72
74
https://doc.rust-lang.org/reference.html#inline-attributes
73
75
"## ,
74
76
75
77
E0535 : r##"
76
- An unknown argument was given to inline attribute.
78
+ An unknown argument was given to the ` inline` attribute.
77
79
78
80
Erroneous code example:
79
81
@@ -84,12 +86,12 @@ pub fn something() {}
84
86
fn main() {}
85
87
```
86
88
87
- The inline attribute only knows two arguments:
89
+ The ` inline` attribute only supports two arguments:
88
90
89
91
* always
90
92
* never
91
93
92
- All other arguments given to the inline attribute will return this error.
94
+ All other arguments given to the ` inline` attribute will return this error.
93
95
Example:
94
96
95
97
```
@@ -99,12 +101,12 @@ pub fn something() {}
99
101
fn main() {}
100
102
```
101
103
102
- For more information about the inline attribute, take a look here :
103
- https ://doc.rust-lang.org/reference.html#inline-attributes
104
+ For more information about the inline attribute, https :
105
+ read ://doc.rust-lang.org/reference.html#inline-attributes
104
106
"## ,
105
107
106
108
E0536 : r##"
107
- No cfg-pattern was found for `not` statement .
109
+ The `not` cfg-predicate was malformed .
108
110
109
111
Erroneous code example:
110
112
@@ -115,7 +117,7 @@ pub fn something() {}
115
117
pub fn main() {}
116
118
```
117
119
118
- The `not` statement expects at least one cfg-pattern. Example:
120
+ The `not` predicate expects one cfg-pattern. Example:
119
121
120
122
```
121
123
#[cfg(not(target_os = "linux"))] // ok!
@@ -124,12 +126,12 @@ pub fn something() {}
124
126
pub fn main() {}
125
127
```
126
128
127
- For more information about the cfg attribute, take a look here :
129
+ For more information about the cfg attribute, read :
128
130
https://doc.rust-lang.org/reference.html#conditional-compilation
129
131
"## ,
130
132
131
133
E0537 : r##"
132
- A unknown predicate was used inside the cfg attribute.
134
+ An unknown predicate was used inside the ` cfg` attribute.
133
135
134
136
Erroneous code example:
135
137
@@ -140,7 +142,7 @@ pub fn something() {}
140
142
pub fn main() {}
141
143
```
142
144
143
- There are only three predicates for the cfg attribute :
145
+ The `cfg` attribute supports only three kinds of predicates :
144
146
145
147
* any
146
148
* all
@@ -155,7 +157,7 @@ pub fn something() {}
155
157
pub fn main() {}
156
158
```
157
159
158
- For more information about the cfg attribute, take a look here :
160
+ For more information about the cfg attribute, read :
159
161
https://doc.rust-lang.org/reference.html#conditional-compilation
160
162
"## ,
161
163
0 commit comments