File tree 14 files changed +10
-217
lines changed
rust_version_incompatible
cargo_generate_lockfile/help
14 files changed +10
-217
lines changed Original file line number Diff line number Diff line change @@ -8,23 +8,13 @@ pub fn cli() -> Command {
8
8
. arg_silent_suggestion ( )
9
9
. arg_manifest_path ( )
10
10
. arg_lockfile_path ( )
11
- . arg_ignore_rust_version_with_help (
12
- "Ignore `rust-version` specification in packages (unstable)" ,
13
- )
11
+ . arg_ignore_rust_version_with_help ( "Ignore `rust-version` specification in packages" )
14
12
. after_help ( color_print:: cstr!(
15
13
"Run `<cyan,bold>cargo help generate-lockfile</>` for more detailed information.\n "
16
14
) )
17
15
}
18
16
19
17
pub fn exec ( gctx : & mut GlobalContext , args : & ArgMatches ) -> CliResult {
20
- if args. honor_rust_version ( ) . is_some ( ) {
21
- gctx. cli_unstable ( ) . fail_if_stable_opt_custom_z (
22
- "--ignore-rust-version" ,
23
- 9930 ,
24
- "msrv-policy" ,
25
- gctx. cli_unstable ( ) . msrv_policy ,
26
- ) ?;
27
- }
28
18
let ws = args. workspace ( gctx) ?;
29
19
ops:: generate_lockfile ( & ws) ?;
30
20
Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -53,24 +53,13 @@ pub fn cli() -> Command {
53
53
)
54
54
. arg_manifest_path ( )
55
55
. arg_lockfile_path ( )
56
- . arg_ignore_rust_version_with_help (
57
- "Ignore `rust-version` specification in packages (unstable)" ,
58
- )
56
+ . arg_ignore_rust_version_with_help ( "Ignore `rust-version` specification in packages" )
59
57
. after_help ( color_print:: cstr!(
60
58
"Run `<cyan,bold>cargo help update</>` for more detailed information.\n "
61
59
) )
62
60
}
63
61
64
62
pub fn exec ( gctx : & mut GlobalContext , args : & ArgMatches ) -> CliResult {
65
- if args. honor_rust_version ( ) . is_some ( ) {
66
- gctx. cli_unstable ( ) . fail_if_stable_opt_custom_z (
67
- "--ignore-rust-version" ,
68
- 9930 ,
69
- "msrv-policy" ,
70
- gctx. cli_unstable ( ) . msrv_policy ,
71
- ) ?;
72
- }
73
-
74
63
let mut ws = args. workspace ( gctx) ?;
75
64
76
65
if args. is_present_with_zero_values ( "package" ) {
Original file line number Diff line number Diff line change @@ -306,31 +306,12 @@ impl<'gctx> Workspace<'gctx> {
306
306
}
307
307
}
308
308
}
309
- match self . gctx ( ) . get :: < CargoResolverConfig > ( "resolver" ) {
310
- Ok ( CargoResolverConfig {
311
- incompatible_rust_versions : Some ( incompatible_rust_versions) ,
312
- } ) => {
313
- if self . gctx ( ) . cli_unstable ( ) . msrv_policy {
314
- self . resolve_honors_rust_version =
315
- incompatible_rust_versions == IncompatibleRustVersions :: Fallback ;
316
- } else {
317
- self . gctx ( )
318
- . shell ( )
319
- . warn ( "ignoring `resolver` config table without `-Zmsrv-policy`" ) ?;
320
- }
321
- }
322
- Ok ( CargoResolverConfig {
323
- incompatible_rust_versions : None ,
324
- } ) => { }
325
- Err ( err) => {
326
- if self . gctx ( ) . cli_unstable ( ) . msrv_policy {
327
- return Err ( err) ;
328
- } else {
329
- self . gctx ( )
330
- . shell ( )
331
- . warn ( "ignoring `resolver` config table without `-Zmsrv-policy`" ) ?;
332
- }
333
- }
309
+ if let CargoResolverConfig {
310
+ incompatible_rust_versions : Some ( incompatible_rust_versions) ,
311
+ } = self . gctx ( ) . get :: < CargoResolverConfig > ( "resolver" ) ?
312
+ {
313
+ self . resolve_honors_rust_version =
314
+ incompatible_rust_versions == IncompatibleRustVersions :: Fallback ;
334
315
}
335
316
336
317
Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -20,13 +20,11 @@ fn case() {
20
20
let cwd = & project_root;
21
21
22
22
snapbox:: cmd:: Command :: cargo_ui ( )
23
- . arg ( "-Zmsrv-policy" )
24
23
. arg ( "add" )
25
24
. arg ( "--ignore-rust-version" )
26
25
. arg_line ( "rust-version-user" )
27
26
. current_dir ( cwd)
28
27
. env ( "CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS" , "fallback" )
29
- . masquerade_as_nightly_cargo ( & [ "msrv-policy" ] )
30
28
. assert ( )
31
29
. code ( 0 )
32
30
. stdout_eq ( str![ "" ] )
Original file line number Diff line number Diff line change @@ -23,12 +23,10 @@ fn case() {
23
23
let cwd = & project_root;
24
24
25
25
snapbox:: cmd:: Command :: cargo_ui ( )
26
- . arg ( "-Zmsrv-policy" )
27
26
. arg ( "add" )
28
27
. arg_line ( "rust-version-user" )
29
28
. current_dir ( cwd)
30
29
. env ( "CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS" , "fallback" )
31
- . masquerade_as_nightly_cargo ( & [ "msrv-policy" ] )
32
30
. assert ( )
33
31
. failure ( )
34
32
. stdout_eq ( str![ "" ] )
Original file line number Diff line number Diff line change @@ -20,12 +20,10 @@ fn case() {
20
20
let cwd = & project_root;
21
21
22
22
snapbox:: cmd:: Command :: cargo_ui ( )
23
- . arg ( "-Zmsrv-policy" )
24
23
. arg ( "add" )
25
24
. arg_line ( "rust-version-user" )
26
25
. current_dir ( cwd)
27
26
. env ( "CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS" , "fallback" )
28
- . masquerade_as_nightly_cargo ( & [ "msrv-policy" ] )
29
27
. assert ( )
30
28
. success ( )
31
29
. stdout_eq ( str![ "" ] )
Original file line number Diff line number Diff line change @@ -20,12 +20,10 @@ fn case() {
20
20
let cwd = & project_root;
21
21
22
22
snapbox:: cmd:: Command :: cargo_ui ( )
23
- . arg ( "-Zmsrv-policy" )
24
23
. arg ( "add" )
25
24
. arg_line ( "rust-version-user" )
26
25
. current_dir ( cwd)
27
26
. env ( "CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS" , "fallback" )
28
- . masquerade_as_nightly_cargo ( & [ "msrv-policy" ] )
29
27
. assert ( )
30
28
. success ( )
31
29
. stdout_eq ( str![ "" ] )
Original file line number Diff line number Diff line change @@ -23,13 +23,11 @@ fn case() {
23
23
let cwd = & project_root;
24
24
25
25
snapbox:: cmd:: Command :: cargo_ui ( )
26
- . arg ( "-Zmsrv-policy" )
27
26
. arg ( "add" )
28
27
. arg ( "--ignore-rust-version" )
29
28
. arg_line ( "rust-version-user" )
30
29
. current_dir ( cwd)
31
30
. env ( "CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS" , "fallback" )
32
- . masquerade_as_nightly_cargo ( & [ "msrv-policy" ] )
33
31
. assert ( )
34
32
. code ( 0 )
35
33
. stdout_eq ( str![ "" ] )
Original file line number Diff line number Diff line change @@ -17,12 +17,10 @@ fn case() {
17
17
let cwd = & project_root;
18
18
19
19
snapbox:: cmd:: Command :: cargo_ui ( )
20
- . arg ( "-Zmsrv-policy" )
21
20
. arg ( "add" )
22
21
. arg_line ( "rust-version-user" )
23
22
. current_dir ( cwd)
24
23
. env ( "CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS" , "fallback" )
25
- . masquerade_as_nightly_cargo ( & [ "msrv-policy" ] )
26
24
. assert ( )
27
25
. failure ( )
28
26
. stdout_eq ( str![ "" ] )
Original file line number Diff line number Diff line change @@ -23,12 +23,10 @@ fn case() {
23
23
let cwd = & project_root;
24
24
25
25
snapbox:: cmd:: Command :: cargo_ui ( )
26
- . arg ( "-Zmsrv-policy" )
27
26
. arg ( "add" )
28
27
. arg_line ( "rust-version-user" )
29
28
. current_dir ( cwd)
30
29
. env ( "CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS" , "fallback" )
31
- . masquerade_as_nightly_cargo ( & [ "msrv-policy" ] )
32
30
. assert ( )
33
31
. success ( )
34
32
. stdout_eq ( str![ "" ] )
Original file line number Diff line number Diff line change @@ -23,12 +23,10 @@ fn case() {
23
23
let cwd = & project_root;
24
24
25
25
snapbox:: cmd:: Command :: cargo_ui ( )
26
- . arg ( "-Zmsrv-policy" )
27
26
. arg ( "add" )
28
27
. arg_line ( "rust-version-user" )
29
28
. current_dir ( cwd)
30
29
. env ( "CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS" , "fallback" )
31
- . masquerade_as_nightly_cargo ( & [ "msrv-policy" ] )
32
30
. assert ( )
33
31
. success ( )
34
32
. stdout_eq ( str![ "" ] )
You can’t perform that action at this time.
0 commit comments