Skip to content

Commit

Permalink
Auto merge of #61075 - Centril:rollup-1ugmcqu, r=Centril
Browse files Browse the repository at this point in the history
Rollup of 7 pull requests

Successful merges:

 - #60981 (Bump compiler-builtins to 0.1.15)
 - #61014 (Make -Zemit-artifact-notifications also emit the artifact type)
 - #61043 (Disable LLVM/debug assertions in gnu-full-bootstrap)
 - #61046 (Fix ICE with inconsistent macro matchers)
 - #61055 (Solaris CI: Build with dilos2 stable)
 - #61057 (Revert "Add implementations of last in terms of next_back on a bunch of DoubleEndedIterators.")
 - #61073 (librustc_errors: Remove unused annotation style `OldSchoolNoteText`)

Failed merges:

r? @ghost
  • Loading branch information
bors committed May 23, 2019
2 parents 85334c5 + a89c62c commit f688ba6
Show file tree
Hide file tree
Showing 35 changed files with 130 additions and 207 deletions.
34 changes: 17 additions & 17 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies = [
name = "alloc"
version = "0.0.0"
dependencies = [
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
"rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -123,7 +123,7 @@ version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-std-workspace-core 1.0.0",
]
Expand Down Expand Up @@ -462,7 +462,7 @@ dependencies = [

[[package]]
name = "compiler_builtins"
version = "0.1.14"
version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -744,7 +744,7 @@ name = "dlmalloc"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-std-workspace-core 1.0.0",
]
Expand Down Expand Up @@ -910,7 +910,7 @@ name = "fortanix-sgx-abi"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-std-workspace-core 1.0.0",
]

Expand Down Expand Up @@ -1071,7 +1071,7 @@ name = "hashbrown"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-std-workspace-alloc 1.0.0",
"rustc-std-workspace-core 1.0.0",
]
Expand Down Expand Up @@ -1772,7 +1772,7 @@ dependencies = [
name = "panic_abort"
version = "0.0.0"
dependencies = [
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
]
Expand All @@ -1782,7 +1782,7 @@ name = "panic_unwind"
version = "0.0.0"
dependencies = [
"alloc 0.0.0",
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
"unwind 0.0.0",
Expand Down Expand Up @@ -1967,7 +1967,7 @@ name = "profiler_builtins"
version = "0.0.0"
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
]

Expand Down Expand Up @@ -2492,7 +2492,7 @@ name = "rustc-demangle"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-std-workspace-core 1.0.0",
]

Expand Down Expand Up @@ -2620,7 +2620,7 @@ dependencies = [
"alloc 0.0.0",
"build_helper 0.1.0",
"cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
]

Expand Down Expand Up @@ -2850,7 +2850,7 @@ dependencies = [
"alloc 0.0.0",
"build_helper 0.1.0",
"cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
]

Expand Down Expand Up @@ -2912,7 +2912,7 @@ dependencies = [
"alloc 0.0.0",
"build_helper 0.1.0",
"cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
]

Expand Down Expand Up @@ -3029,7 +3029,7 @@ dependencies = [
"alloc 0.0.0",
"build_helper 0.1.0",
"cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
]

Expand Down Expand Up @@ -3298,7 +3298,7 @@ dependencies = [
"alloc 0.0.0",
"backtrace-sys 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
"dlmalloc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"fortanix-sgx-abi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -3889,7 +3889,7 @@ name = "unwind"
version = "0.0.0"
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
]
Expand Down Expand Up @@ -4087,7 +4087,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum colored 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b0aa3473e85a3161b59845d6096b289bb577874cafeaf75ea1b1beaa6572c7fc"
"checksum commoncrypto 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d056a8586ba25a1e4d61cb090900e495952c7886786fc55f909ab2f819b69007"
"checksum commoncrypto-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1fed34f46747aa73dfaa578069fd8279d2818ade2b55f38f22a9401c7f4083e2"
"checksum compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "e3f235c329e5cb9fa3d2ca2cc36256ba9a7f23fa76e0f4db6f68c23b73b2ac69"
"checksum compiler_builtins 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "e899b947d7e71c3d35c0b6194d64025b84946640510e215090c815b20828964e"
"checksum compiletest_rs 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "f40ecc9332b68270998995c00f8051ee856121764a0d3230e64c9efd059d27b6"
"checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e"
"checksum core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4e2640d6d0bf22e82bed1b73c6aef8d5dd31e5abe6666c57e6d45e2649f4f887"
Expand Down
29 changes: 28 additions & 1 deletion src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,33 @@ pub fn std_cargo(builder: &Builder<'_>,
cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
}

// Determine if we're going to compile in optimized C intrinsics to
// the `compiler-builtins` crate. These intrinsics live in LLVM's
// `compiler-rt` repository, but our `src/llvm-project` submodule isn't
// always checked out, so we need to conditionally look for this. (e.g. if
// an external LLVM is used we skip the LLVM submodule checkout).
//
// Note that this shouldn't affect the correctness of `compiler-builtins`,
// but only its speed. Some intrinsics in C haven't been translated to Rust
// yet but that's pretty rare. Other intrinsics have optimized
// implementations in C which have only had slower versions ported to Rust,
// so we favor the C version where we can, but it's not critical.
//
// If `compiler-rt` is available ensure that the `c` feature of the
// `compiler-builtins` crate is enabled and it's configured to learn where
// `compiler-rt` is located.
let compiler_builtins_root = builder.src.join("src/llvm-project/compiler-rt");
let compiler_builtins_c_feature = if compiler_builtins_root.exists() {
cargo.env("RUST_COMPILER_RT_ROOT", &compiler_builtins_root);
" compiler-builtins-c".to_string()
} else {
String::new()
};

if builder.no_std(target) == Some(true) {
let mut features = "compiler-builtins-mem".to_string();
features.push_str(&compiler_builtins_c_feature);

// for no-std targets we only compile a few no_std crates
cargo
.args(&["-p", "alloc"])
Expand All @@ -170,7 +196,8 @@ pub fn std_cargo(builder: &Builder<'_>,
.arg("--features")
.arg("compiler-builtins-mem compiler-builtins-c");
} else {
let features = builder.std_features();
let mut features = builder.std_features();
features.push_str(&compiler_builtins_c_feature);

if compiler.stage != 0 && builder.config.sanitizers {
// This variable is used by the sanitizer runtime crates, e.g.
Expand Down
6 changes: 3 additions & 3 deletions src/build_helper/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ pub fn sanitizer_lib_boilerplate(sanitizer_name: &str)
} else {
format!("static={}", link_name)
};
// The source for `compiler-rt` comes from the `compiler-builtins` crate, so
// load our env var set by cargo to find the source code.
let dir = env::var_os("DEP_COMPILER_RT_COMPILER_RT").unwrap();
// This env var is provided by rustbuild to tell us where `compiler-rt`
// lives.
let dir = env::var_os("RUST_COMPILER_RT_ROOT").unwrap();
let lib = native_lib_boilerplate(
dir.as_ref(),
sanitizer_name,
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/dist-various-2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN apt-get update && apt-get build-dep -y clang llvm && apt-get install -y --no
gpg-agent

RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys 74DA7924C5513486
RUN add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2-testing main'
RUN add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2 main'

WORKDIR /tmp
COPY dist-various-2/shared.sh /tmp/
Expand Down
6 changes: 6 additions & 0 deletions src/ci/docker/x86_64-gnu-full-bootstrap/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--enable-full-bootstrap
ENV SCRIPT python2.7 ../x.py build

# In general this just slows down the build and we're just a smoke test that
# a full bootstrap works in general, so there's not much need to take this
# penalty in build times.
ENV NO_LLVM_ASSERTIONS 1
ENV NO_DEBUG_ASSERTIONS 1
15 changes: 0 additions & 15 deletions src/liballoc/collections/binary_heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1035,11 +1035,6 @@ impl<'a, T> Iterator for Iter<'a, T> {
fn size_hint(&self) -> (usize, Option<usize>) {
self.iter.size_hint()
}

#[inline]
fn last(mut self) -> Option<&'a T> {
self.next_back()
}
}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -1095,11 +1090,6 @@ impl<T> Iterator for IntoIter<T> {
fn size_hint(&self) -> (usize, Option<usize>) {
self.iter.size_hint()
}

#[inline]
fn last(mut self) -> Option<T> {
self.next_back()
}
}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -1146,11 +1136,6 @@ impl<T> Iterator for Drain<'_, T> {
fn size_hint(&self) -> (usize, Option<usize>) {
self.iter.size_hint()
}

#[inline]
fn last(mut self) -> Option<T> {
self.next_back()
}
}

#[stable(feature = "drain", since = "1.6.0")]
Expand Down
40 changes: 0 additions & 40 deletions src/liballoc/collections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1193,11 +1193,6 @@ impl<'a, K: 'a, V: 'a> Iterator for Iter<'a, K, V> {
fn size_hint(&self) -> (usize, Option<usize>) {
(self.length, Some(self.length))
}

#[inline]
fn last(mut self) -> Option<(&'a K, &'a V)> {
self.next_back()
}
}

#[stable(feature = "fused", since = "1.26.0")]
Expand Down Expand Up @@ -1258,11 +1253,6 @@ impl<'a, K: 'a, V: 'a> Iterator for IterMut<'a, K, V> {
fn size_hint(&self) -> (usize, Option<usize>) {
(self.length, Some(self.length))
}

#[inline]
fn last(mut self) -> Option<(&'a K, &'a mut V)> {
self.next_back()
}
}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -1369,11 +1359,6 @@ impl<K, V> Iterator for IntoIter<K, V> {
fn size_hint(&self) -> (usize, Option<usize>) {
(self.length, Some(self.length))
}

#[inline]
fn last(mut self) -> Option<(K, V)> {
self.next_back()
}
}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -1436,11 +1421,6 @@ impl<'a, K, V> Iterator for Keys<'a, K, V> {
fn size_hint(&self) -> (usize, Option<usize>) {
self.inner.size_hint()
}

#[inline]
fn last(mut self) -> Option<&'a K> {
self.next_back()
}
}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -1478,11 +1458,6 @@ impl<'a, K, V> Iterator for Values<'a, K, V> {
fn size_hint(&self) -> (usize, Option<usize>) {
self.inner.size_hint()
}

#[inline]
fn last(mut self) -> Option<&'a V> {
self.next_back()
}
}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -1520,11 +1495,6 @@ impl<'a, K, V> Iterator for Range<'a, K, V> {
unsafe { Some(self.next_unchecked()) }
}
}

#[inline]
fn last(mut self) -> Option<(&'a K, &'a V)> {
self.next_back()
}
}

#[stable(feature = "map_values_mut", since = "1.10.0")]
Expand All @@ -1538,11 +1508,6 @@ impl<'a, K, V> Iterator for ValuesMut<'a, K, V> {
fn size_hint(&self) -> (usize, Option<usize>) {
self.inner.size_hint()
}

#[inline]
fn last(mut self) -> Option<&'a mut V> {
self.next_back()
}
}

#[stable(feature = "map_values_mut", since = "1.10.0")]
Expand Down Expand Up @@ -1661,11 +1626,6 @@ impl<'a, K, V> Iterator for RangeMut<'a, K, V> {
unsafe { Some(self.next_unchecked()) }
}
}

#[inline]
fn last(mut self) -> Option<(&'a K, &'a mut V)> {
self.next_back()
}
}

impl<'a, K, V> RangeMut<'a, K, V> {
Expand Down
15 changes: 0 additions & 15 deletions src/liballoc/collections/btree/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1019,11 +1019,6 @@ impl<'a, T> Iterator for Iter<'a, T> {
fn size_hint(&self) -> (usize, Option<usize>) {
self.iter.size_hint()
}

#[inline]
fn last(mut self) -> Option<&'a T> {
self.next_back()
}
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> DoubleEndedIterator for Iter<'a, T> {
Expand All @@ -1049,11 +1044,6 @@ impl<T> Iterator for IntoIter<T> {
fn size_hint(&self) -> (usize, Option<usize>) {
self.iter.size_hint()
}

#[inline]
fn last(mut self) -> Option<T> {
self.next_back()
}
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> DoubleEndedIterator for IntoIter<T> {
Expand Down Expand Up @@ -1083,11 +1073,6 @@ impl<'a, T> Iterator for Range<'a, T> {
fn next(&mut self) -> Option<&'a T> {
self.iter.next().map(|(k, _)| k)
}

#[inline]
fn last(mut self) -> Option<&'a T> {
self.next_back()
}
}

#[stable(feature = "btree_range", since = "1.17.0")]
Expand Down
Loading

0 comments on commit f688ba6

Please sign in to comment.