File tree 1 file changed +27
-3
lines changed
1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ fn main() {}
69
69
```
70
70
71
71
For more information about the inline attribute, take a look here:
72
- https://doc.rust-lang.org/reference.html#inline-attributes)
72
+ https://doc.rust-lang.org/reference.html#inline-attributes
73
73
"## ,
74
74
75
75
E0535 : r##"
@@ -100,13 +100,37 @@ fn main() {}
100
100
```
101
101
102
102
For more information about the inline attribute, take a look here:
103
- https://doc.rust-lang.org/reference.html#inline-attributes)
103
+ https://doc.rust-lang.org/reference.html#inline-attributes
104
+ "## ,
105
+
106
+ E0536 : r##"
107
+ No cfg-pattern was found for `not` statement.
108
+
109
+ Erroneous code example:
110
+
111
+ ```compile_fail,E0536
112
+ #[cfg(not())] // error: expected 1 cfg-pattern
113
+ pub fn something() {}
114
+
115
+ pub fn main() {}
116
+ ```
117
+
118
+ The `not` statement expects at least one cfg-pattern. Example:
119
+
120
+ ```
121
+ #[cfg(not(target_os = "linux"))] // ok!
122
+ pub fn something() {}
123
+
124
+ pub fn main() {}
125
+ ```
126
+
127
+ For more information about the cfg attribute, take a look here:
128
+ https://doc.rust-lang.org/reference.html#conditional-compilation
104
129
"## ,
105
130
106
131
}
107
132
108
133
register_diagnostics ! {
109
- E0536 , // expected 1 cfg-pattern
110
134
E0537 , // invalid predicate
111
135
E0538 , // multiple [same] items
112
136
E0539 , // incorrect meta item
You can’t perform that action at this time.
0 commit comments