@@ -42,21 +42,21 @@ type ExceptionList = &'static [(&'static str, &'static str)];
4242/// * Optionally a tuple of:
4343/// * A list of crates for which dependencies need to be explicitly allowed.
4444/// * The list of allowed dependencies.
45- const WORKSPACES : & [ ( & str , ExceptionList , Option < ( & [ & str ] , & [ & str ] ) > ) ] = & [
45+ pub ( crate ) const WORKSPACES : & [ ( & str , ExceptionList , Option < ( & [ & str ] , & [ & str ] ) > ) ] = & [
4646 // 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 ) ) ) ,
4848 // Outside of the alphabetical section because rustfmt formats it using multiple lines.
4949 (
50- "compiler/rustc_codegen_cranelift/Cargo.toml " ,
50+ "compiler/rustc_codegen_cranelift" ,
5151 EXCEPTIONS_CRANELIFT ,
5252 Some ( ( & [ "rustc_codegen_cranelift" ] , PERMITTED_CRANELIFT_DEPENDENCIES ) ) ,
5353 ) ,
5454 // 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 ) ,
6060 // tidy-alphabetical-end
6161] ;
6262
@@ -438,7 +438,7 @@ pub fn check(root: &Path, cargo: &Path, bad: &mut bool) {
438438 for & ( workspace, exceptions, permitted_deps) in WORKSPACES {
439439 let mut cmd = cargo_metadata:: MetadataCommand :: new ( ) ;
440440 cmd. cargo_path ( cargo)
441- . manifest_path ( root. join ( workspace) )
441+ . manifest_path ( root. join ( workspace) . join ( "Cargo.toml" ) )
442442 . features ( cargo_metadata:: CargoOpt :: AllFeatures ) ;
443443 let metadata = t ! ( cmd. exec( ) ) ;
444444
@@ -447,12 +447,12 @@ pub fn check(root: &Path, cargo: &Path, bad: &mut bool) {
447447 check_permitted_dependencies ( & metadata, workspace, permitted_deps, crates, bad) ;
448448 }
449449
450- if workspace == "Cargo.toml " {
450+ if workspace == ". " {
451451 let runtime_ids = compute_runtime_crates ( & metadata) ;
452452 check_runtime_license_exceptions ( & metadata, runtime_ids, bad) ;
453453 checked_runtime_licenses = true ;
454454 rust_metadata = Some ( metadata) ;
455- } else if workspace == "src/tools/cargo/Cargo.toml " {
455+ } else if workspace == "src/tools/cargo" {
456456 check_rustfix (
457457 rust_metadata
458458 . as_ref ( )
0 commit comments