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
Copy file name to clipboardExpand all lines: tests/testsuite/features.rs
+17-14Lines changed: 17 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -291,13 +291,12 @@ fn invalid9() {
291
291
.file("bar/src/lib.rs","")
292
292
.build();
293
293
294
-
p.cargo("build --features bar").with_stderr("\
295
-
warning: Package `foo v0.0.1 ([..])` does not have feature `bar`. It has a required dependency with \
296
-
that name, but only optional dependencies can be used as features. [..]
297
-
Compiling bar v0.0.1 ([..])
298
-
Compiling foo v0.0.1 ([..])
299
-
Finished dev [unoptimized + debuginfo] target(s) in [..]s
300
-
").run();
294
+
p.cargo("build --features bar")
295
+
.with_stderr(
296
+
"\
297
+
error: Package `foo v0.0.1 ([..])` does not have feature `bar`. It has a required dependency with that name, but only optional dependencies can be used as features.
298
+
",
299
+
).with_status(101).run();
301
300
}
302
301
303
302
#[test]
@@ -335,13 +334,17 @@ fn invalid10() {
335
334
.build();
336
335
337
336
p.cargo("build").with_stderr("\
338
-
warning: Package `bar v0.0.1 ([..])` does not have feature `baz`. It has a required dependency with \
339
-
that name, but only optional dependencies can be used as features. [..]
340
-
Compiling baz v0.0.1 ([..])
341
-
Compiling bar v0.0.1 ([..])
342
-
Compiling foo v0.0.1 ([..])
343
-
Finished dev [unoptimized + debuginfo] target(s) in [..]s
344
-
").run();
337
+
error: failed to select a version for `bar`.
338
+
... required by package `foo v0.0.1 ([..])`
339
+
versions that meet the requirements `*` are: 0.0.1
340
+
341
+
the package `foo` depends on `bar`, with features: `baz` but `bar` does not have these features.
342
+
It has a required dependency with that name, but only optional dependencies can be used as features.
343
+
344
+
345
+
failed to select a version for `bar` which could resolve this conflict
0 commit comments