Skip to content

Commit

Permalink
Auto merge of #66908 - Centril:rollup-26givp6, r=Centril
Browse files Browse the repository at this point in the history
Rollup of 9 pull requests

Successful merges:

 - #66612 (Initial implementation of or-pattern usefulness checking)
 - #66705 (Atomic as_mut_ptr)
 - #66759 (impl TrustedLen for vec::Drain)
 - #66858 (Use LLVMAddAnalysisPasses instead of Rust's wrapper)
 - #66870 (SimplifyArmIdentity only for locals with the same type)
 - #66883 (rustc_typeck: gate AnonConst's generics on feature(const_generics).)
 - #66889 (Make python-generated source files compatible with rustfmt)
 - #66894 (Remove unneeded prelude imports in libcore tests)
 - #66895 (Feature gating *declarations* => new crate `rustc_feature`)

Failed merges:

 - #66905 (rustc_plugin: Remove some remaining plugin features)

r? @ghost
  • Loading branch information
bors committed Dec 1, 2019
2 parents d8bdb3f + b772b5b commit 135ccba
Show file tree
Hide file tree
Showing 93 changed files with 2,255 additions and 1,785 deletions.
18 changes: 18 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3199,6 +3199,7 @@ dependencies = [
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_fs_util",
"rustc_index",
"rustc_macros",
Expand Down Expand Up @@ -3574,6 +3575,7 @@ dependencies = [
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_interface",
"rustc_lint",
"rustc_metadata",
Expand Down Expand Up @@ -3607,6 +3609,15 @@ dependencies = [
"unicode-width",
]

[[package]]
name = "rustc_feature"
version = "0.0.0"
dependencies = [
"lazy_static 1.3.0",
"rustc_data_structures",
"syntax_pos",
]

[[package]]
name = "rustc_fs_util"
version = "0.0.0"
Expand Down Expand Up @@ -3682,6 +3693,7 @@ dependencies = [
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_feature",
"rustc_index",
"rustc_target",
"syntax",
Expand Down Expand Up @@ -3786,6 +3798,7 @@ dependencies = [
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_lexer",
"rustc_target",
"smallvec 1.0.0",
Expand All @@ -3802,6 +3815,7 @@ dependencies = [
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_index",
"rustc_parse",
"rustc_target",
Expand Down Expand Up @@ -3844,6 +3858,7 @@ dependencies = [
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_metadata",
"smallvec 1.0.0",
"syntax",
Expand Down Expand Up @@ -4442,6 +4457,7 @@ dependencies = [
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_index",
"rustc_lexer",
"rustc_macros",
Expand All @@ -4458,6 +4474,7 @@ dependencies = [
"log",
"rustc_data_structures",
"rustc_errors",
"rustc_feature",
"rustc_lexer",
"rustc_parse",
"serialize",
Expand All @@ -4475,6 +4492,7 @@ dependencies = [
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_parse",
"rustc_target",
"smallvec 1.0.0",
Expand Down
15 changes: 10 additions & 5 deletions src/etc/dec2flt_table.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,18 @@ def print_proper_powers():
print("pub const MIN_E: i16 = {};".format(MIN_E))
print("pub const MAX_E: i16 = {};".format(MAX_E))
print()
print("#[rustfmt::skip]")
typ = "([u64; {0}], [i16; {0}])".format(len(powers))
print("pub const POWERS: ", typ, " = ([", sep='')
print("pub const POWERS: ", typ, " = (", sep='')
print(" [")
for z in powers:
print(" 0x{:x},".format(z.sig))
print("], [")
print(" 0x{:x},".format(z.sig))
print(" ],")
print(" [")
for z in powers:
print(" {},".format(z.exp))
print("]);")
print(" {},".format(z.exp))
print(" ],")
print(");")


def print_short_powers(num_bits, significand_size):
Expand All @@ -127,6 +131,7 @@ def print_short_powers(num_bits, significand_size):
max_e = int(ceil(log(max_sig, 5)))
e_range = range(max_e)
typ = "[f{}; {}]".format(num_bits, len(e_range))
print("#[rustfmt::skip]")
print("pub const F", num_bits, "_SHORT_POWERS: ", typ, " = [", sep='')
for e in e_range:
print(" 1e{},".format(e))
Expand Down
3 changes: 3 additions & 0 deletions src/liballoc/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2703,6 +2703,9 @@ impl<T> ExactSizeIterator for Drain<'_, T> {
}
}

#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<T> TrustedLen for Drain<'_, T> {}

#[stable(feature = "fused", since = "1.26.0")]
impl<T> FusedIterator for Drain<'_, T> {}

Expand Down
Loading

0 comments on commit 135ccba

Please sign in to comment.