You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
str!["failed to parse `(` as a cfg expression: expected identifier, found `(`"],
114
152
);
115
-
bad::<Cfg>("foo (", str!["failed to parse `foo (` as a cfg expression: unexpected content `(` found after cfg expression"]);
116
-
bad::<Cfg>("bar =", str!["failed to parse `bar =` as a cfg expression: expected a string, but cfg expression ended"]);
117
153
bad::<Cfg>(
118
-
"bar = \"",
119
-
str![[r#"failed to parse `bar = "` as a cfg expression: unterminated string in cfg"#]],
154
+
"version(\"1\")",
155
+
str![[
156
+
r#"failed to parse `version("1")` as a cfg expression: unexpected content `("1")` found after cfg expression"#
157
+
]],
158
+
);
159
+
bad::<Cfg>(
160
+
"version(\"1.\")",
161
+
str![[
162
+
r#"failed to parse `version("1.")` as a cfg expression: unexpected content `("1.")` found after cfg expression"#
163
+
]],
164
+
);
165
+
bad::<Cfg>(
166
+
"version(\"1.2.\")",
167
+
str![[
168
+
r#"failed to parse `version("1.2.")` as a cfg expression: unexpected content `("1.2.")` found after cfg expression"#
169
+
]],
170
+
);
171
+
bad::<Cfg>(
172
+
"version(\"1.2.3.\")",
173
+
str![[
174
+
r#"failed to parse `version("1.2.3.")` as a cfg expression: unexpected content `("1.2.3.")` found after cfg expression"#
175
+
]],
176
+
);
177
+
bad::<Cfg>(
178
+
"version(\"1.2.3-stable\")",
179
+
str![[
180
+
r#"failed to parse `version("1.2.3-stable")` as a cfg expression: unexpected content `("1.2.3-stable")` found after cfg expression"#
181
+
]],
182
+
);
183
+
bad::<Cfg>(
184
+
"version(\"2.3\")",
185
+
str![[
186
+
r#"failed to parse `version("2.3")` as a cfg expression: unexpected content `("2.3")` found after cfg expression"#
187
+
]],
188
+
);
189
+
bad::<Cfg>(
190
+
"version(\"0.99.9\")",
191
+
str![[
192
+
r#"failed to parse `version("0.99.9")` as a cfg expression: unexpected content `("0.99.9")` found after cfg expression"#
193
+
]],
120
194
);
121
-
bad::<Cfg>("foo, bar", str!["failed to parse `foo, bar` as a cfg expression: unexpected content `, bar` found after cfg expression"]);
122
-
bad::<Cfg>("r# foo", str!["failed to parse `r# foo` as a cfg expression: unexpected character ` ` in cfg, expected parens, a comma, an identifier, or a string"]);
123
-
bad::<Cfg>("r #foo", str!["failed to parse `r #foo` as a cfg expression: unexpected content `#foo` found after cfg expression"]);
124
-
bad::<Cfg>("r#\"foo\"", str![[r#"failed to parse `r#"foo"` as a cfg expression: unexpected character `"` in cfg, expected parens, a comma, an identifier, or a string"#]]);
125
-
bad::<Cfg>("foo = r#\"\"", str![[r#"failed to parse `foo = r#""` as a cfg expression: unexpected character `"` in cfg, expected parens, a comma, an identifier, or a string"#]]);
126
195
}
127
196
128
197
#[test]
@@ -145,6 +214,12 @@ fn cfg_expr() {
145
214
good("all(a, )",e!(all(a)));
146
215
good("not(a = \"b\")",e!(not(a = "b")));
147
216
good("not(all(a))",e!(not(all(a))));
217
+
bad::<Cfg>(
218
+
"not(version(\"1.23.4\"))",
219
+
str![[
220
+
r#"failed to parse `not(version("1.23.4"))` as a cfg expression: unexpected content `(version("1.23.4"))` found after cfg expression"#
0 commit comments