@@ -483,6 +483,9 @@ features! {
483
483
484
484
// Allow specifying rustflags directly in a profile
485
485
( stable, workspace_inheritance, "1.64" , "reference/unstable.html#workspace-inheritance" ) ,
486
+
487
+ // Allow setting trim-paths in a profile to control the sanitisation of file paths in build outputs.
488
+ ( unstable, trim_paths, "" , "reference/unstable.html#profile-trim-paths-option" ) ,
486
489
}
487
490
488
491
pub struct Feature {
@@ -752,6 +755,7 @@ unstable_cli_options!(
752
755
separate_nightlies: bool = ( HIDDEN ) ,
753
756
skip_rustdoc_fingerprint: bool = ( HIDDEN ) ,
754
757
target_applies_to_host: bool = ( "Enable the `target-applies-to-host` key in the .cargo/config.toml file" ) ,
758
+ trim_paths: bool = ( "Enable the `trim-paths` option in profiles" ) ,
755
759
unstable_options: bool = ( "Allow the usage of unstable options" ) ,
756
760
) ;
757
761
@@ -1121,6 +1125,7 @@ impl CliUnstable {
1121
1125
"no-index-update" => self . no_index_update = parse_empty ( k, v) ?,
1122
1126
"panic-abort-tests" => self . panic_abort_tests = parse_empty ( k, v) ?,
1123
1127
"profile-rustflags" => self . profile_rustflags = parse_empty ( k, v) ?,
1128
+ "trim-paths" => self . trim_paths = parse_empty ( k, v) ?,
1124
1129
"publish-timeout" => self . publish_timeout = parse_empty ( k, v) ?,
1125
1130
"registry-auth" => self . registry_auth = parse_empty ( k, v) ?,
1126
1131
"rustdoc-map" => self . rustdoc_map = parse_empty ( k, v) ?,
0 commit comments