File tree Expand file tree Collapse file tree 2 files changed +9
-24
lines changed Expand file tree Collapse file tree 2 files changed +9
-24
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,21 @@ pub fn cli() -> Command {
9
9
. arg_quiet ( )
10
10
. arg ( flag ( "workspace" , "Only update the workspace packages" ) . short ( 'w' ) )
11
11
. arg_package_spec_simple ( "Package to update" )
12
- . arg ( flag (
13
- "aggressive" ,
14
- "Force updating all dependencies of SPEC as well when used with -p" ,
15
- ) )
12
+ . arg (
13
+ flag (
14
+ "aggressive" ,
15
+ "Force updating all dependencies of SPEC as well when used with -p" ,
16
+ )
17
+ . requires ( "package" ) ,
18
+ )
16
19
. arg_dry_run ( "Don't actually write the lockfile" )
17
20
. arg (
18
21
opt (
19
22
"precise" ,
20
23
"Update a single dependency to exactly PRECISE when used with -p" ,
21
24
)
22
- . value_name ( "PRECISE" ) ,
25
+ . value_name ( "PRECISE" )
26
+ . requires ( "package" ) ,
23
27
)
24
28
. arg_manifest_path ( )
25
29
. after_help ( "Run `cargo help update` for more detailed information.\n " )
Original file line number Diff line number Diff line change @@ -36,25 +36,6 @@ pub fn generate_lockfile(ws: &Workspace<'_>) -> CargoResult<()> {
36
36
}
37
37
38
38
pub fn update_lockfile ( ws : & Workspace < ' _ > , opts : & UpdateOptions < ' _ > ) -> CargoResult < ( ) > {
39
- // Currently this is only a warning, but after a transition period this will become
40
- // a hard error.
41
- // See https://github.com/rust-lang/cargo/issues/10919#issuecomment-1214464756.
42
- // We should declare the `precise` and `aggressive` arguments
43
- // require the `package` argument in the clap.
44
- if opts. aggressive && opts. to_update . is_empty ( ) {
45
- ws. config ( ) . shell ( ) . warn (
46
- "aggressive is only supported with \" --package <SPEC>\" , \
47
- this will become a hard error in a future release.",
48
- ) ?;
49
- }
50
-
51
- if opts. precise . is_some ( ) && opts. to_update . is_empty ( ) {
52
- ws. config ( ) . shell ( ) . warn (
53
- "precise is only supported with \" --package <SPEC>\" , \
54
- this will become a hard error in a future release.",
55
- ) ?;
56
- }
57
-
58
39
if opts. aggressive && opts. precise . is_some ( ) {
59
40
anyhow:: bail!( "cannot specify both aggressive and precise simultaneously" )
60
41
}
You can’t perform that action at this time.
0 commit comments