Skip to content

Commit 937f072

Browse files
Fix typos
1 parent 8dc79ec commit 937f072

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

src/libsyntax/diagnostic_list.rs

+28-26
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
register_long_diagnostics! {
1717

1818
E0533: r##"
19-
The export_name attribute was badly formatted.
19+
The `export_name` attribute was malformed.
2020
2121
Erroneous code example:
2222
@@ -27,19 +27,19 @@ pub fn something() {}
2727
fn main() {}
2828
```
2929
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
3131
the exported symbol. Example:
3232
3333
```
34-
#[export_name = "some function"] // ok!
34+
#[export_name = "some_function"] // ok!
3535
pub fn something() {}
3636
3737
fn main() {}
3838
```
3939
"##,
4040

4141
E0534: r##"
42-
The inline attribute was badly used.
42+
The `inline` attribute was malformed.
4343
4444
Erroneous code example:
4545
@@ -50,30 +50,32 @@ pub fn something() {}
5050
fn main() {}
5151
```
5252
53-
The inline attribute can be used without arguments:
53+
The parenthesized `inline` attribute requires the parameter to be specified:
5454
55-
```
56-
#[inline] // ok!
57-
pub fn something() {}
55+
```ignore
56+
#[inline(always)]
57+
fn something() {}
5858
59-
fn main() {}
59+
// or:
60+
61+
#[inline(never)]
62+
fn something() {}
6063
```
6164
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:
6367
6468
```
65-
#[inline(always)] // ok!
66-
pub fn something() {}
67-
68-
fn main() {}
69+
#[inline]
70+
fn something() {}
6971
```
7072
71-
For more information about the inline attribute, take a look here:
73+
For more information about the inline attribute, read:
7274
https://doc.rust-lang.org/reference.html#inline-attributes
7375
"##,
7476

7577
E0535: r##"
76-
An unknown argument was given to inline attribute.
78+
An unknown argument was given to the `inline` attribute.
7779
7880
Erroneous code example:
7981
@@ -84,12 +86,12 @@ pub fn something() {}
8486
fn main() {}
8587
```
8688
87-
The inline attribute only knows two arguments:
89+
The `inline` attribute only supports two arguments:
8890
8991
* always
9092
* never
9193
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.
9395
Example:
9496
9597
```
@@ -99,12 +101,12 @@ pub fn something() {}
99101
fn main() {}
100102
```
101103
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
104106
"##,
105107

106108
E0536: r##"
107-
No cfg-pattern was found for `not` statement.
109+
The `not` cfg-predicate was malformed.
108110
109111
Erroneous code example:
110112
@@ -115,7 +117,7 @@ pub fn something() {}
115117
pub fn main() {}
116118
```
117119
118-
The `not` statement expects at least one cfg-pattern. Example:
120+
The `not` predicate expects one cfg-pattern. Example:
119121
120122
```
121123
#[cfg(not(target_os = "linux"))] // ok!
@@ -124,12 +126,12 @@ pub fn something() {}
124126
pub fn main() {}
125127
```
126128
127-
For more information about the cfg attribute, take a look here:
129+
For more information about the cfg attribute, read:
128130
https://doc.rust-lang.org/reference.html#conditional-compilation
129131
"##,
130132

131133
E0537: r##"
132-
A unknown predicate was used inside the cfg attribute.
134+
An unknown predicate was used inside the `cfg` attribute.
133135
134136
Erroneous code example:
135137
@@ -140,7 +142,7 @@ pub fn something() {}
140142
pub fn main() {}
141143
```
142144
143-
There are only three predicates for the cfg attribute:
145+
The `cfg` attribute supports only three kinds of predicates:
144146
145147
* any
146148
* all
@@ -155,7 +157,7 @@ pub fn something() {}
155157
pub fn main() {}
156158
```
157159
158-
For more information about the cfg attribute, take a look here:
160+
For more information about the cfg attribute, read:
159161
https://doc.rust-lang.org/reference.html#conditional-compilation
160162
"##,
161163

0 commit comments

Comments
 (0)