File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
tests/testsuite/lints/unused_optional_dependencies Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1159,7 +1159,9 @@ impl<'gctx> Workspace<'gctx> {
1159
1159
for ( path, maybe_pkg) in & self . packages . packages {
1160
1160
let path = path. join ( "Cargo.toml" ) ;
1161
1161
if let MaybePackage :: Package ( pkg) = maybe_pkg {
1162
- self . emit_lints ( pkg, & path) ?
1162
+ if self . gctx . cli_unstable ( ) . cargo_lints {
1163
+ self . emit_lints ( pkg, & path) ?
1164
+ }
1163
1165
}
1164
1166
let warnings = match maybe_pkg {
1165
1167
MaybePackage :: Package ( pkg) => pkg. manifest ( ) . warnings ( ) . warnings ( ) ,
Original file line number Diff line number Diff line change @@ -33,9 +33,10 @@ target-dep = { version = "0.1.0", optional = true }
33
33
. build ( ) ;
34
34
35
35
snapbox:: cmd:: Command :: cargo_ui ( )
36
- . masquerade_as_nightly_cargo ( & [ "edition2024" ] )
36
+ . masquerade_as_nightly_cargo ( & [ "cargo-lints" , " edition2024"] )
37
37
. current_dir ( p. root ( ) )
38
38
. arg ( "check" )
39
+ . arg ( "-Zcargo-lints" )
39
40
. assert ( )
40
41
. success ( )
41
42
. stdout_matches ( str![ "" ] )
Original file line number Diff line number Diff line change @@ -32,9 +32,10 @@ target-dep = { version = "0.1.0", optional = true }
32
32
. build ( ) ;
33
33
34
34
snapbox:: cmd:: Command :: cargo_ui ( )
35
- . masquerade_as_nightly_cargo ( & [ "edition2024" ] )
35
+ . masquerade_as_nightly_cargo ( & [ "cargo-lints" , " edition2024"] )
36
36
. current_dir ( p. root ( ) )
37
37
. arg ( "check" )
38
+ . arg ( "-Zcargo-lints" )
38
39
. assert ( )
39
40
. success ( )
40
41
. stdout_matches ( str![ "" ] )
You can’t perform that action at this time.
0 commit comments