@@ -42,21 +42,21 @@ type ExceptionList = &'static [(&'static str, &'static str)];
42
42
/// * Optionally a tuple of:
43
43
/// * A list of crates for which dependencies need to be explicitly allowed.
44
44
/// * The list of allowed dependencies.
45
- const WORKSPACES : & [ ( & str , ExceptionList , Option < ( & [ & str ] , & [ & str ] ) > ) ] = & [
45
+ pub ( crate ) const WORKSPACES : & [ ( & str , ExceptionList , Option < ( & [ & str ] , & [ & str ] ) > ) ] = & [
46
46
// The root workspace has to be first for check_rustfix to work.
47
- ( "Cargo.toml " , EXCEPTIONS , Some ( ( & [ "rustc-main" ] , PERMITTED_RUSTC_DEPENDENCIES ) ) ) ,
47
+ ( ". " , EXCEPTIONS , Some ( ( & [ "rustc-main" ] , PERMITTED_RUSTC_DEPENDENCIES ) ) ) ,
48
48
// Outside of the alphabetical section because rustfmt formats it using multiple lines.
49
49
(
50
- "compiler/rustc_codegen_cranelift/Cargo.toml " ,
50
+ "compiler/rustc_codegen_cranelift" ,
51
51
EXCEPTIONS_CRANELIFT ,
52
52
Some ( ( & [ "rustc_codegen_cranelift" ] , PERMITTED_CRANELIFT_DEPENDENCIES ) ) ,
53
53
) ,
54
54
// tidy-alphabetical-start
55
- ( "compiler/rustc_codegen_gcc/Cargo.toml " , EXCEPTIONS_GCC , None ) ,
56
- ( "src/bootstrap/Cargo.toml " , EXCEPTIONS_BOOTSTRAP , None ) ,
57
- ( "src/tools/cargo/Cargo.toml " , EXCEPTIONS_CARGO , None ) ,
58
- ( "src/tools/rust-analyzer/Cargo.toml " , EXCEPTIONS_RUST_ANALYZER , None ) ,
59
- ( "src/tools/x/Cargo.toml " , & [ ] , None ) ,
55
+ ( "compiler/rustc_codegen_gcc" , EXCEPTIONS_GCC , None ) ,
56
+ ( "src/bootstrap" , EXCEPTIONS_BOOTSTRAP , None ) ,
57
+ ( "src/tools/cargo" , EXCEPTIONS_CARGO , None ) ,
58
+ ( "src/tools/rust-analyzer" , EXCEPTIONS_RUST_ANALYZER , None ) ,
59
+ ( "src/tools/x" , & [ ] , None ) ,
60
60
// tidy-alphabetical-end
61
61
] ;
62
62
@@ -438,7 +438,7 @@ pub fn check(root: &Path, cargo: &Path, bad: &mut bool) {
438
438
for & ( workspace, exceptions, permitted_deps) in WORKSPACES {
439
439
let mut cmd = cargo_metadata:: MetadataCommand :: new ( ) ;
440
440
cmd. cargo_path ( cargo)
441
- . manifest_path ( root. join ( workspace) )
441
+ . manifest_path ( root. join ( workspace) . join ( "Cargo.toml" ) )
442
442
. features ( cargo_metadata:: CargoOpt :: AllFeatures ) ;
443
443
let metadata = t ! ( cmd. exec( ) ) ;
444
444
@@ -447,12 +447,12 @@ pub fn check(root: &Path, cargo: &Path, bad: &mut bool) {
447
447
check_permitted_dependencies ( & metadata, workspace, permitted_deps, crates, bad) ;
448
448
}
449
449
450
- if workspace == "Cargo.toml " {
450
+ if workspace == ". " {
451
451
let runtime_ids = compute_runtime_crates ( & metadata) ;
452
452
check_runtime_license_exceptions ( & metadata, runtime_ids, bad) ;
453
453
checked_runtime_licenses = true ;
454
454
rust_metadata = Some ( metadata) ;
455
- } else if workspace == "src/tools/cargo/Cargo.toml " {
455
+ } else if workspace == "src/tools/cargo" {
456
456
check_rustfix (
457
457
rust_metadata
458
458
. as_ref ( )
0 commit comments