Skip to content

Commit 7b4c364

Browse files
committed
Add clone_with_overrides
1 parent 9b0666e commit 7b4c364

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,6 +2361,13 @@ macro_rules! _config_data {
23612361
}
23622362
)*
23632363
}
2364+
2365+
#[allow(unused)]
2366+
fn clone_with_overrides(&self, input: $input) -> Self {
2367+
Self {$(
2368+
$field: input.$field.unwrap_or_else(|| self.$field.clone()),
2369+
)*}
2370+
}
23642371
}
23652372

23662373
impl $input {

0 commit comments

Comments
 (0)