Skip to content

Commit c8b62df

Browse files
committed
Auto merge of #63607 - Centril:rollup-yry7nsw, r=Centril
Rollup of 5 pull requests Successful merges: - #63173 (Use libunwind from llvm-project submodule for musl targets) - #63462 (Opaque builtin derive macros) - #63539 (Suggest Rust 2018 on `<expr>.await` with no such field) - #63545 (Feature gate 'yield $expr?' pre-expansion) - #63584 (libcore: more cleanups using `#![feature(associated_type_bounds)]`) Failed merges: r? @ghost
2 parents f7af19c + 8f2decb commit c8b62df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+677
-470
lines changed

src/bootstrap/sanity.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,6 @@ pub fn check(build: &mut Build) {
202202
panic!("couldn't find libc.a in musl dir: {}",
203203
root.join("lib").display());
204204
}
205-
if fs::metadata(root.join("lib/libunwind.a")).is_err() {
206-
panic!("couldn't find libunwind.a in musl dir: {}",
207-
root.join("lib").display());
208-
}
209205
}
210206
None => {
211207
panic!("when targeting MUSL either the rust.musl-root \

src/ci/docker/scripts/musl-toolchain.sh

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,3 @@ if [ "$REPLACE_CC" = "1" ]; then
5454
ln -s $TARGET-g++ /usr/local/bin/$exec
5555
done
5656
fi
57-
58-
export CC=$TARGET-gcc
59-
export CXX=$TARGET-g++
60-
61-
LLVM=70
62-
63-
# may have been downloaded in a previous run
64-
if [ ! -d libunwind-release_$LLVM ]; then
65-
curl -L https://github.com/llvm-mirror/llvm/archive/release_$LLVM.tar.gz | tar xzf -
66-
curl -L https://github.com/llvm-mirror/libunwind/archive/release_$LLVM.tar.gz | tar xzf -
67-
fi
68-
69-
# fixme(mati865): Replace it with https://github.com/rust-lang/rust/pull/59089
70-
mkdir libunwind-build
71-
cd libunwind-build
72-
cmake ../libunwind-release_$LLVM \
73-
-DLLVM_PATH=/build/llvm-release_$LLVM \
74-
-DLIBUNWIND_ENABLE_SHARED=0 \
75-
-DCMAKE_C_COMPILER=$CC \
76-
-DCMAKE_CXX_COMPILER=$CXX \
77-
-DCMAKE_C_FLAGS="$CFLAGS" \
78-
-DCMAKE_CXX_FLAGS="$CXXFLAGS"
79-
80-
hide_output make -j$(nproc)
81-
cp lib/libunwind.a $OUTPUT/$TARGET/lib
82-
cd - && rm -rf libunwind-build

src/ci/docker/scripts/musl.sh

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ exit 1
2020
TAG=$1
2121
shift
2222

23+
# Ancient binutils versions don't understand debug symbols produced by more recent tools.
24+
# Apparently applying `-fPIC` everywhere allows them to link successfully.
2325
export CFLAGS="-fPIC $CFLAGS"
2426

2527
MUSL=musl-1.1.22
@@ -38,27 +40,3 @@ else
3840
fi
3941
hide_output make install
4042
hide_output make clean
41-
42-
cd ..
43-
44-
LLVM=70
45-
46-
# may have been downloaded in a previous run
47-
if [ ! -d libunwind-release_$LLVM ]; then
48-
curl -L https://github.com/llvm-mirror/llvm/archive/release_$LLVM.tar.gz | tar xzf -
49-
curl -L https://github.com/llvm-mirror/libunwind/archive/release_$LLVM.tar.gz | tar xzf -
50-
fi
51-
52-
mkdir libunwind-build
53-
cd libunwind-build
54-
cmake ../libunwind-release_$LLVM \
55-
-DLLVM_PATH=/build/llvm-release_$LLVM \
56-
-DLIBUNWIND_ENABLE_SHARED=0 \
57-
-DCMAKE_C_COMPILER=$CC \
58-
-DCMAKE_CXX_COMPILER=$CXX \
59-
-DCMAKE_C_FLAGS="$CFLAGS" \
60-
-DCMAKE_CXX_FLAGS="$CXXFLAGS"
61-
62-
hide_output make -j$(nproc)
63-
cp lib/libunwind.a /musl-$TAG/lib
64-
cd ../ && rm -rf libunwind-build

src/libcore/clone.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ pub trait Clone : Sized {
135135

136136
/// Derive macro generating an impl of the trait `Clone`.
137137
#[rustc_builtin_macro]
138-
#[rustc_macro_transparency = "semitransparent"]
139138
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
140139
#[allow_internal_unstable(core_intrinsics, derive_clone_copy)]
141140
pub macro Clone($item:item) { /* compiler built-in */ }

src/libcore/cmp.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ pub trait PartialEq<Rhs: ?Sized = Self> {
202202

203203
/// Derive macro generating an impl of the trait `PartialEq`.
204204
#[rustc_builtin_macro]
205-
#[rustc_macro_transparency = "semitransparent"]
206205
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
207206
#[allow_internal_unstable(core_intrinsics)]
208207
pub macro PartialEq($item:item) { /* compiler built-in */ }
@@ -265,7 +264,6 @@ pub trait Eq: PartialEq<Self> {
265264

266265
/// Derive macro generating an impl of the trait `Eq`.
267266
#[rustc_builtin_macro]
268-
#[rustc_macro_transparency = "semitransparent"]
269267
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
270268
#[allow_internal_unstable(core_intrinsics, derive_eq)]
271269
pub macro Eq($item:item) { /* compiler built-in */ }
@@ -616,7 +614,6 @@ pub trait Ord: Eq + PartialOrd<Self> {
616614

617615
/// Derive macro generating an impl of the trait `Ord`.
618616
#[rustc_builtin_macro]
619-
#[rustc_macro_transparency = "semitransparent"]
620617
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
621618
#[allow_internal_unstable(core_intrinsics)]
622619
pub macro Ord($item:item) { /* compiler built-in */ }
@@ -865,7 +862,6 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
865862

866863
/// Derive macro generating an impl of the trait `PartialOrd`.
867864
#[rustc_builtin_macro]
868-
#[rustc_macro_transparency = "semitransparent"]
869865
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
870866
#[allow_internal_unstable(core_intrinsics)]
871867
pub macro PartialOrd($item:item) { /* compiler built-in */ }

src/libcore/default.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ pub trait Default: Sized {
117117

118118
/// Derive macro generating an impl of the trait `Default`.
119119
#[rustc_builtin_macro]
120-
#[rustc_macro_transparency = "semitransparent"]
121120
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
122121
#[allow_internal_unstable(core_intrinsics)]
123122
pub macro Default($item:item) { /* compiler built-in */ }

src/libcore/fmt/builders.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub struct DebugStruct<'a, 'b: 'a> {
9898
has_fields: bool,
9999
}
100100

101-
pub fn debug_struct_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>,
101+
pub(super) fn debug_struct_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>,
102102
name: &str)
103103
-> DebugStruct<'a, 'b> {
104104
let result = fmt.write_str(name);
@@ -251,7 +251,10 @@ pub struct DebugTuple<'a, 'b: 'a> {
251251
empty_name: bool,
252252
}
253253

254-
pub fn debug_tuple_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>, name: &str) -> DebugTuple<'a, 'b> {
254+
pub(super) fn debug_tuple_new<'a, 'b>(
255+
fmt: &'a mut fmt::Formatter<'b>,
256+
name: &str,
257+
) -> DebugTuple<'a, 'b> {
255258
let result = fmt.write_str(name);
256259
DebugTuple {
257260
fmt,
@@ -418,7 +421,7 @@ pub struct DebugSet<'a, 'b: 'a> {
418421
inner: DebugInner<'a, 'b>,
419422
}
420423

421-
pub fn debug_set_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugSet<'a, 'b> {
424+
pub(super) fn debug_set_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugSet<'a, 'b> {
422425
let result = fmt.write_str("{");
423426
DebugSet {
424427
inner: DebugInner {
@@ -555,7 +558,7 @@ pub struct DebugList<'a, 'b: 'a> {
555558
inner: DebugInner<'a, 'b>,
556559
}
557560

558-
pub fn debug_list_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugList<'a, 'b> {
561+
pub(super) fn debug_list_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugList<'a, 'b> {
559562
let result = fmt.write_str("[");
560563
DebugList {
561564
inner: DebugInner {
@@ -697,7 +700,7 @@ pub struct DebugMap<'a, 'b: 'a> {
697700
state: PadAdapterState,
698701
}
699702

700-
pub fn debug_map_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugMap<'a, 'b> {
703+
pub(super) fn debug_map_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugMap<'a, 'b> {
701704
let result = fmt.write_str("{");
702705
DebugMap {
703706
fmt,

src/libcore/fmt/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ pub trait Debug {
549549
pub(crate) mod macros {
550550
/// Derive macro generating an impl of the trait `Debug`.
551551
#[rustc_builtin_macro]
552-
#[rustc_macro_transparency = "semitransparent"]
553552
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
554553
#[allow_internal_unstable(core_intrinsics)]
555554
pub macro Debug($item:item) { /* compiler built-in */ }

src/libcore/hash/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ pub trait Hash {
202202
pub(crate) mod macros {
203203
/// Derive macro generating an impl of the trait `Hash`.
204204
#[rustc_builtin_macro]
205-
#[rustc_macro_transparency = "semitransparent"]
206205
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
207206
#[allow_internal_unstable(core_intrinsics)]
208207
pub macro Hash($item:item) { /* compiler built-in */ }

src/libcore/iter/adapters/flatten.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ impl<I: Iterator, U: IntoIterator, F> Iterator for FlatMap<I, U, F>
7272
impl<I: DoubleEndedIterator, U, F> DoubleEndedIterator for FlatMap<I, U, F>
7373
where
7474
F: FnMut(I::Item) -> U,
75-
U: IntoIterator,
76-
U::IntoIter: DoubleEndedIterator,
75+
U: IntoIterator<IntoIter: DoubleEndedIterator>,
7776
{
7877
#[inline]
7978
fn next_back(&mut self) -> Option<U::Item> { self.inner.next_back() }
@@ -107,10 +106,7 @@ impl<I, U, F> FusedIterator for FlatMap<I, U, F>
107106
/// [`Iterator`]: trait.Iterator.html
108107
#[must_use = "iterators are lazy and do nothing unless consumed"]
109108
#[stable(feature = "iterator_flatten", since = "1.29.0")]
110-
pub struct Flatten<I: Iterator>
111-
where
112-
I::Item: IntoIterator,
113-
{
109+
pub struct Flatten<I: Iterator<Item: IntoIterator>> {
114110
inner: FlattenCompat<I, <I::Item as IntoIterator>::IntoIter>,
115111
}
116112

0 commit comments

Comments
 (0)