File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -3007,6 +3007,10 @@ impl TomlProfile {
3007
3007
if let Some ( v) = & profile. strip {
3008
3008
self . strip = Some ( v. clone ( ) ) ;
3009
3009
}
3010
+
3011
+ if let Some ( v) = & profile. trim_paths {
3012
+ self . trim_paths = Some ( v. clone ( ) )
3013
+ }
3010
3014
}
3011
3015
}
3012
3016
Original file line number Diff line number Diff line change @@ -165,6 +165,41 @@ fn multiple_options() {
165
165
. run ( ) ;
166
166
}
167
167
168
+ #[ cargo_test( nightly, reason = "-Zremap-path-scope is unstable" ) ]
169
+ fn profile_merge_works ( ) {
170
+ let p = project ( )
171
+ . file (
172
+ "Cargo.toml" ,
173
+ r#"
174
+ [package]
175
+ name = "foo"
176
+ version = "0.0.1"
177
+
178
+ [profile.dev]
179
+ trim-paths = ["macro"]
180
+
181
+ [profile.custom]
182
+ inherits = "dev"
183
+ trim-paths = ["diagnostics"]
184
+ "# ,
185
+ )
186
+ . file ( "src/lib.rs" , "" )
187
+ . build ( ) ;
188
+
189
+ p. cargo ( "build -v -Ztrim-paths --profile custom" )
190
+ . masquerade_as_nightly_cargo ( & [ "-Ztrim-paths" ] )
191
+ . with_stderr (
192
+ "\
193
+ [COMPILING] foo v0.0.1 ([CWD])
194
+ [RUNNING] `rustc [..]\
195
+ -Zremap-path-scope=diagnostics \
196
+ --remap-path-prefix=[..]/lib/rustlib/src/rust=/rustc/[..] \
197
+ --remap-path-prefix=[CWD]= [..]
198
+ [FINISHED] custom [..]" ,
199
+ )
200
+ . run ( ) ;
201
+ }
202
+
168
203
#[ cargo_test( nightly, reason = "-Zremap-path-scope is unstable" ) ]
169
204
fn registry_dependency ( ) {
170
205
Package :: new ( "bar" , "0.0.1" )
You can’t perform that action at this time.
0 commit comments