Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #92482

Merged
merged 19 commits into from
Jan 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8d8f699
Clarify the guarantees that ThreadId does and doesn't make.
ltratt Apr 11, 2021
fb1e031
Remove unnecessary bounds for some Hash{Map,Set} methods
upsuper Dec 6, 2021
d66a9e1
Language tweak.
ltratt Dec 25, 2021
51a1681
Remove pronunciation guide from Vec<T>
thomcc Dec 31, 2021
193342e
Emit an error for `--cfg=)`
meithecatte Jan 1, 2022
ec0c838
Add test for where clause order
GuillaumeGomez Jan 1, 2022
bffe880
Enforce formatting for rustc_codegen_cranelift
bjorn3 Dec 30, 2021
2fe2728
Remove the lazy_static dependency from rustbuild
bjorn3 Dec 26, 2021
043745c
Avoid the merge derive macro in rustbuild
bjorn3 Dec 26, 2021
947e948
Make the rustc and rustdoc wrapper not depend on libbootstrap
bjorn3 Dec 26, 2021
ad6f98c
Remove the merge dependency
bjorn3 Jan 1, 2022
7ea6e71
Remove some dead code
bjorn3 Jan 1, 2022
30ec1f0
Rollup merge of #84083 - ltratt:threadid_doc_tweak, r=dtolnay
matthiaskrgr Jan 1, 2022
5137f7c
Rollup merge of #91593 - upsuper-forks:hashmap-set-methods-bound, r=d…
matthiaskrgr Jan 1, 2022
ab7a356
Rollup merge of #92297 - bjorn3:smaller_bootstrap, r=Mark-Simulacrum
matthiaskrgr Jan 1, 2022
a015c86
Rollup merge of #92332 - GuillaumeGomez:where-clause-order, r=jsha
matthiaskrgr Jan 1, 2022
f6ce1e8
Rollup merge of #92438 - bjorn3:less_cg_clif_exceptions, r=Mark-Simul…
matthiaskrgr Jan 1, 2022
aa31c97
Rollup merge of #92463 - thomcc:thats-not-how-its-pronounced, r=josht…
matthiaskrgr Jan 1, 2022
2004a51
Rollup merge of #92468 - NieDzejkob:silent-cfg, r=petrochenkov
matthiaskrgr Jan 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove the merge dependency
  • Loading branch information
bjorn3 committed Jan 1, 2022
commit ad6f98cd28e02d10323c125c8ad2eef44dbfbb20
7 changes: 0 additions & 7 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ dependencies = [
"getopts",
"ignore",
"libc",
"merge",
"num_cpus",
"once_cell",
"opener",
Expand Down Expand Up @@ -2220,12 +2219,6 @@ dependencies = [
"autocfg",
]

[[package]]
name = "merge"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10bbef93abb1da61525bbc45eeaff6473a41907d19f8f9aa5168d214e10693e9"

[[package]]
name = "minifier"
version = "0.0.41"
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ toml = "0.5"
time = "0.1"
ignore = "0.4.10"
opener = "0.5"
merge = { version = "0.1.0", default-features = false, features = ["std"] }
once_cell = "1.7.2"

[target.'cfg(windows)'.dependencies.winapi]
Expand Down
11 changes: 9 additions & 2 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ pub use crate::flags::Subcommand;
use crate::flags::{Color, Flags};
use crate::util::exe;
use build_helper::t;
use merge::Merge;
use serde::Deserialize;

macro_rules! check_ci_llvm {
Expand Down Expand Up @@ -334,6 +333,10 @@ struct TomlConfig {
profile: Option<String>,
}

trait Merge {
fn merge(&mut self, other: Self);
}

impl Merge for TomlConfig {
fn merge(
&mut self,
Expand All @@ -357,6 +360,8 @@ impl Merge for TomlConfig {
}
}

// We are using a decl macro instead of a derive proc macro here to reduce the compile time of
// rustbuild.
macro_rules! derive_merge {
($(#[$attr:meta])* struct $name:ident {
$($field:ident: $field_ty:ty,)*
Expand All @@ -369,7 +374,9 @@ macro_rules! derive_merge {
impl Merge for $name {
fn merge(&mut self, other: Self) {
$(
Merge::merge(&mut self.$field, other.$field);
if !self.$field.is_some() {
self.$field = other.$field;
}
)*
}
}
Expand Down