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 `(`"],
115
153
);
116
-
bad::<Cfg>("foo (", str!["failed to parse `foo (` as a cfg expression: unexpected content `(` found after cfg expression"]);
117
-
bad::<Cfg>("bar =", str!["failed to parse `bar =` as a cfg expression: expected a string, but cfg expression ended"]);
118
154
bad::<Cfg>(
119
-
"bar = \"",
120
-
str![[r#"failed to parse `bar = "` as a cfg expression: unterminated string in cfg"#]],
155
+
"version(\"1\")",
156
+
str![[
157
+
r#"failed to parse `version("1")` as a cfg expression: unexpected content `("1")` found after cfg expression"#
158
+
]],
159
+
);
160
+
bad::<Cfg>(
161
+
"version(\"1.\")",
162
+
str![[
163
+
r#"failed to parse `version("1.")` as a cfg expression: unexpected content `("1.")` found after cfg expression"#
164
+
]],
165
+
);
166
+
bad::<Cfg>(
167
+
"version(\"1.2.\")",
168
+
str![[
169
+
r#"failed to parse `version("1.2.")` as a cfg expression: unexpected content `("1.2.")` found after cfg expression"#
170
+
]],
171
+
);
172
+
bad::<Cfg>(
173
+
"version(\"1.2.3.\")",
174
+
str![[
175
+
r#"failed to parse `version("1.2.3.")` as a cfg expression: unexpected content `("1.2.3.")` found after cfg expression"#
176
+
]],
177
+
);
178
+
bad::<Cfg>(
179
+
"version(\"1.2.3-stable\")",
180
+
str![[
181
+
r#"failed to parse `version("1.2.3-stable")` as a cfg expression: unexpected content `("1.2.3-stable")` found after cfg expression"#
182
+
]],
183
+
);
184
+
bad::<Cfg>(
185
+
"version(\"2.3\")",
186
+
str![[
187
+
r#"failed to parse `version("2.3")` as a cfg expression: unexpected content `("2.3")` found after cfg expression"#
188
+
]],
189
+
);
190
+
bad::<Cfg>(
191
+
"version(\"0.99.9\")",
192
+
str![[
193
+
r#"failed to parse `version("0.99.9")` as a cfg expression: unexpected content `("0.99.9")` found after cfg expression"#
194
+
]],
121
195
);
122
-
bad::<Cfg>("foo, bar", str!["failed to parse `foo, bar` as a cfg expression: unexpected content `, bar` found after cfg expression"]);
123
-
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"]);
124
-
bad::<Cfg>("r #foo", str!["failed to parse `r #foo` as a cfg expression: unexpected content `#foo` found after cfg expression"]);
125
-
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"#]]);
126
-
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"#]]);
127
196
}
128
197
129
198
#[test]
@@ -146,6 +215,12 @@ fn cfg_expr() {
146
215
good("all(a, )",e!(all(a)));
147
216
good("not(a = \"b\")",e!(not(a = "b")));
148
217
good("not(all(a))",e!(not(all(a))));
218
+
bad::<Cfg>(
219
+
"not(version(\"1.23.4\"))",
220
+
str![[
221
+
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