Skip to content

Commit ef1765e

Browse files
committed
Auto merge of #69253 - JohnTitor:rollup-4asn252, r=JohnTitor
Rollup of 8 pull requests Successful merges: - #67272 (recursion_limit parsing handles overflows) - #68597 (Simplify `Skip::nth` and `Skip::last` implementations) - #68767 (macOS: avoid calling pthread_self() twice) - #69175 (Do not ICE when encountering `yield` inside `async` block) - #69223 (Ignore GDB versions with broken str printing.) - #69244 (configure: set LLVM flags with a value) - #69249 (Stabilize {f32, f64}::{LOG2_10, LOG10_2}) - #69252 (Clean out unused directories for extra disk space) Failed merges: r? @ghost
2 parents 0176a9e + 125b328 commit ef1765e

File tree

23 files changed

+173
-31
lines changed

23 files changed

+173
-31
lines changed

src/bootstrap/configure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ def v(*args):
6262
o("use-libcxx", "llvm.use-libcxx", "build LLVM with libc++")
6363
o("control-flow-guard", "rust.control-flow-guard", "Enable Control Flow Guard")
6464

65-
o("cflags", "llvm.cflags", "build LLVM with these extra compiler flags")
66-
o("cxxflags", "llvm.cxxflags", "build LLVM with these extra compiler flags")
67-
o("ldflags", "llvm.ldflags", "build LLVM with these extra linker flags")
65+
v("llvm-cflags", "llvm.cflags", "build LLVM with these extra compiler flags")
66+
v("llvm-cxxflags", "llvm.cxxflags", "build LLVM with these extra compiler flags")
67+
v("llvm-ldflags", "llvm.ldflags", "build LLVM with these extra linker flags")
6868

6969
o("llvm-libunwind", "rust.llvm-libunwind", "use LLVM libunwind")
7070

src/ci/azure-pipelines/steps/run.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ steps:
3131
- bash: src/ci/scripts/setup-environment.sh
3232
displayName: Setup environment
3333

34+
- bash: src/ci/scripts/clean-disk.sh
35+
displayName: Clean disk
36+
3437
- bash: src/ci/scripts/should-skip-this.sh
3538
displayName: Decide whether to run this job
3639

src/ci/scripts/clean-disk.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# This script deletes some of the Azure-provided artifacts. We don't use these,
3+
# and disk space is at a premium on our builders.
4+
5+
set -euo pipefail
6+
IFS=$'\n\t'
7+
8+
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
9+
10+
# All the Linux builds happen inside Docker.
11+
if isLinux; then
12+
# 6.7GB
13+
sudo rm -rf /opt/ghc
14+
# 16GB
15+
sudo rm -rf /usr/share/dotnet
16+
fi

src/ci/scripts/dump-environment.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ set +o pipefail
1717
du . | sort -nr | head -n100
1818
set -o pipefail
1919
echo
20+
21+
echo "biggest files:"
22+
set +o pipefail
23+
du -h / 2>/dev/null | sort -hr | head -n100
24+
set -o pipefail
25+
echo

src/libcore/iter/adapters/mod.rs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1890,17 +1890,15 @@ where
18901890
#[inline]
18911891
fn nth(&mut self, n: usize) -> Option<I::Item> {
18921892
// Can't just add n + self.n due to overflow.
1893-
if self.n == 0 {
1894-
self.iter.nth(n)
1895-
} else {
1893+
if self.n > 0 {
18961894
let to_skip = self.n;
18971895
self.n = 0;
18981896
// nth(n) skips n+1
18991897
if self.iter.nth(to_skip - 1).is_none() {
19001898
return None;
19011899
}
1902-
self.iter.nth(n)
19031900
}
1901+
self.iter.nth(n)
19041902
}
19051903

19061904
#[inline]
@@ -1916,17 +1914,13 @@ where
19161914

19171915
#[inline]
19181916
fn last(mut self) -> Option<I::Item> {
1919-
if self.n == 0 {
1920-
self.iter.last()
1921-
} else {
1922-
let next = self.next();
1923-
if next.is_some() {
1924-
// recurse. n should be 0.
1925-
self.last().or(next)
1926-
} else {
1927-
None
1917+
if self.n > 0 {
1918+
// nth(n) skips n+1
1919+
if self.iter.nth(self.n - 1).is_none() {
1920+
return None;
19281921
}
19291922
}
1923+
self.iter.last()
19301924
}
19311925

19321926
#[inline]

src/libcore/num/f32.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ pub mod consts {
130130
pub const LOG2_E: f32 = 1.44269504088896340735992468100189214_f32;
131131

132132
/// log<sub>2</sub>(10)
133-
#[unstable(feature = "extra_log_consts", issue = "50540")]
133+
#[stable(feature = "extra_log_consts", since = "1.43.0")]
134134
pub const LOG2_10: f32 = 3.32192809488736234787031942948939018_f32;
135135

136136
/// log<sub>10</sub>(e)
137137
#[stable(feature = "rust1", since = "1.0.0")]
138138
pub const LOG10_E: f32 = 0.434294481903251827651128918916605082_f32;
139139

140140
/// log<sub>10</sub>(2)
141-
#[unstable(feature = "extra_log_consts", issue = "50540")]
141+
#[stable(feature = "extra_log_consts", since = "1.43.0")]
142142
pub const LOG10_2: f32 = 0.301029995663981195213738894724493027_f32;
143143

144144
/// ln(2)

src/libcore/num/f64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ pub mod consts {
126126
pub const E: f64 = 2.71828182845904523536028747135266250_f64;
127127

128128
/// log<sub>2</sub>(10)
129-
#[unstable(feature = "extra_log_consts", issue = "50540")]
129+
#[stable(feature = "extra_log_consts", since = "1.43.0")]
130130
pub const LOG2_10: f64 = 3.32192809488736234787031942948939018_f64;
131131

132132
/// log<sub>2</sub>(e)
133133
#[stable(feature = "rust1", since = "1.0.0")]
134134
pub const LOG2_E: f64 = 1.44269504088896340735992468100189214_f64;
135135

136136
/// log<sub>10</sub>(2)
137-
#[unstable(feature = "extra_log_consts", issue = "50540")]
137+
#[stable(feature = "extra_log_consts", since = "1.43.0")]
138138
pub const LOG10_2: f64 = 0.301029995663981195213738894724493027_f64;
139139

140140
/// log<sub>10</sub>(e)

src/librustc/hir/map/hir_id_validator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rustc_hir::intravisit;
77
use rustc_hir::itemlikevisit::ItemLikeVisitor;
88
use rustc_hir::{HirId, ItemLocalId};
99

10-
pub fn check_crate(hir_map: &Map<'_>) {
10+
pub fn check_crate(hir_map: &Map<'_>, sess: &rustc_session::Session) {
1111
hir_map.dep_graph.assert_ignored();
1212

1313
let errors = Lock::new(Vec::new());
@@ -24,7 +24,7 @@ pub fn check_crate(hir_map: &Map<'_>) {
2424

2525
if !errors.is_empty() {
2626
let message = errors.iter().fold(String::new(), |s1, s2| s1 + "\n" + s2);
27-
bug!("{}", message);
27+
sess.delay_span_bug(rustc_span::DUMMY_SP, &message);
2828
}
2929
}
3030

src/librustc/hir/map/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ pub fn map_crate<'hir>(
12351235
let map = Map { krate, dep_graph, crate_hash, map, hir_to_node_id, definitions };
12361236

12371237
sess.time("validate_HIR_map", || {
1238-
hir_id_validator::check_crate(&map);
1238+
hir_id_validator::check_crate(&map, sess);
12391239
});
12401240

12411241
map

src/librustc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#![feature(associated_type_bounds)]
4747
#![feature(rustc_attrs)]
4848
#![feature(hash_raw_entry)]
49+
#![feature(int_error_matching)]
4950
#![recursion_limit = "512"]
5051

5152
#[macro_use]

0 commit comments

Comments
 (0)