Skip to content

Commit 91f34c0

Browse files
authored
Auto merge of #36818 - jonathandturner:rollup, r=jonathandturner
Rollup of 12 pull requests - Successful merges: #35286, #35892, #36460, #36704, #36741, #36760, #36787, #36789, #36794, #36803, #36811, #36813 - Failed merges:
2 parents eee2d04 + f12f950 commit 91f34c0

File tree

65 files changed

+694
-808
lines changed

Some content is hidden

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

65 files changed

+694
-808
lines changed

configure

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,6 @@ valopt datadir "${CFG_PREFIX}/share" "install data"
645645
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
646646
valopt llvm-root "" "set LLVM root"
647647
valopt python "" "set path to python"
648-
valopt nodejs "" "set path to nodejs"
649648
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
650649
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
651650
valopt android-cross-path "" "Android NDK standalone path (deprecated)"
@@ -762,9 +761,6 @@ if [ $(echo $python_version | grep -c '^Python 2\.7') -ne 1 ]; then
762761
err "Found $python_version, but Python 2.7 is required"
763762
fi
764763

765-
# Checking for node, but not required
766-
probe CFG_NODEJS nodejs node
767-
768764
# If we have no git directory then we are probably a tarball distribution
769765
# and shouldn't attempt to load submodules
770766
if [ ! -e ${CFG_SRC_DIR}.git ]

src/bootstrap/bin/rustc.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ fn main() {
104104
let is_panic_abort = args.windows(2).any(|a| {
105105
&*a[0] == "--crate-name" && &*a[1] == "panic_abort"
106106
});
107-
// FIXME(stage0): remove this `stage != "0"` condition
108-
if is_panic_abort && stage != "0" {
107+
if is_panic_abort {
109108
cmd.arg("-C").arg("panic=abort");
110109
}
111110

src/bootstrap/compile.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use std::process::Command;
2525
use build_helper::output;
2626
use filetime::FileTime;
2727

28-
use util::{exe, staticlib, libdir, mtime, is_dylib, copy};
28+
use util::{exe, libdir, mtime, is_dylib, copy};
2929
use {Build, Compiler, Mode};
3030

3131
/// Build the standard library.
@@ -40,20 +40,6 @@ pub fn std<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
4040
let libdir = build.sysroot_libdir(compiler, target);
4141
let _ = fs::remove_dir_all(&libdir);
4242
t!(fs::create_dir_all(&libdir));
43-
// FIXME(stage0) remove this `if` after the next snapshot
44-
// The stage0 compiler still passes the `-lcompiler-rt` flag to the linker but now `bootstrap`
45-
// never builds a `libcopmiler-rt.a`! We'll fill the hole by simply copying stage0's
46-
// `libcompiler-rt.a` to where the stage1's one is expected (though we could as well just use
47-
// an empty `.a` archive). Note that the symbols of that stage0 `libcompiler-rt.a` won't make
48-
// it to the final binary because now `libcore.rlib` also contains the symbols that
49-
// `libcompiler-rt.a` provides. Since that rlib appears first in the linker arguments, its
50-
// symbols are used instead of `libcompiler-rt.a`'s.
51-
if compiler.stage == 0 {
52-
let rtlib = &staticlib("compiler-rt", target);
53-
let src = build.rustc.parent().unwrap().parent().unwrap().join("lib").join("rustlib")
54-
.join(target).join("lib").join(rtlib);
55-
copy(&src, &libdir.join(rtlib));
56-
}
5743

5844
// Some platforms have startup objects that may be required to produce the
5945
// libstd dynamic library, for example.

src/bootstrap/config.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,6 @@ impl Config {
396396
self.rustc = Some(PathBuf::from(value).join("bin/rustc"));
397397
self.cargo = Some(PathBuf::from(value).join("bin/cargo"));
398398
}
399-
"CFG_NODEJS" if value.len() > 0 => {
400-
self.nodejs = Some(PathBuf::from(value));
401-
}
402399
_ => {}
403400
}
404401
}

src/bootstrap/sanity.rs

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,23 @@ pub fn check(build: &mut Build) {
4040
panic!("PATH contains invalid character '\"'");
4141
}
4242
}
43-
let mut need_cmd = |cmd: &OsStr| {
44-
if !checked.insert(cmd.to_owned()) {
45-
return
46-
}
43+
let have_cmd = |cmd: &OsStr| {
4744
for path in env::split_paths(&path).map(|p| p.join(cmd)) {
4845
if fs::metadata(&path).is_ok() ||
4946
fs::metadata(path.with_extension("exe")).is_ok() {
50-
return
47+
return Some(path);
5148
}
5249
}
53-
panic!("\n\ncouldn't find required command: {:?}\n\n", cmd);
50+
return None;
51+
};
52+
53+
let mut need_cmd = |cmd: &OsStr| {
54+
if !checked.insert(cmd.to_owned()) {
55+
return
56+
}
57+
if have_cmd(cmd).is_none() {
58+
panic!("\n\ncouldn't find required command: {:?}\n\n", cmd);
59+
}
5460
};
5561

5662
// If we've got a git directory we're gona need git to update
@@ -75,8 +81,13 @@ pub fn check(build: &mut Build) {
7581

7682
need_cmd("python".as_ref());
7783

78-
// If a manual nodejs was added to the config,
79-
// of if a nodejs install is detected through config, use it.
84+
// Look for the nodejs command, needed for emscripten testing
85+
if let Some(node) = have_cmd("node".as_ref()) {
86+
build.config.nodejs = Some(node);
87+
} else if let Some(node) = have_cmd("nodejs".as_ref()) {
88+
build.config.nodejs = Some(node);
89+
}
90+
8091
if let Some(ref s) = build.config.nodejs {
8192
need_cmd(s.as_ref());
8293
}

src/doc/book/syntax-index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
* `-` (`- expr`): arithmetic negation. Overloadable (`Neg`).
6262
* `-=` (`var -= expr`): arithmetic subtraction & assignment. Overloadable (`SubAssign`).
6363
* `->` (`fn(…) -> type`, `|…| -> type`): function and closure return type. See [Functions], [Closures].
64-
* `-> !` (`fn(…) -> !`, `|…| -> !`): diverging function or closure. See [Diverging Functions].
6564
* `.` (`expr.ident`): member access. See [Structs], [Method Syntax].
6665
* `..` (`..`, `expr..`, `..expr`, `expr..expr`): right-exclusive range literal.
6766
* `..` (`..expr`): struct literal update syntax. See [Structs (Update syntax)].
@@ -159,6 +158,10 @@
159158
* `/*!…*/`: inner block doc comment. See [Comments].
160159
* `/**…*/`: outer block doc comment. See [Comments].
161160

161+
<!-- Special types -->
162+
163+
* `!`: always empty Never type. See [Diverging Functions].
164+
162165
<!-- Various things involving parens and tuples -->
163166

164167
* `()`: empty tuple (*a.k.a.* unit), both literal and type.

src/doc/grammar.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,13 @@ bound-list := bound | bound '+' bound-list
764764
bound := path | lifetime
765765
```
766766

767+
### Never type
768+
An empty type
769+
770+
```antlr
771+
never_type : "!" ;
772+
```
773+
767774
### Object types
768775

769776
**FIXME:** grammar?

src/liballoc/arc.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
127127
/// }
128128
/// ```
129129
130-
#[cfg_attr(stage0, unsafe_no_drop_flag)]
131130
#[stable(feature = "rust1", since = "1.0.0")]
132131
pub struct Arc<T: ?Sized> {
133132
ptr: Shared<ArcInner<T>>,
@@ -153,7 +152,6 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {}
153152
/// nodes behind strong `Arc<T>` pointers, and then storing the parent pointers
154153
/// as `Weak<T>` pointers.
155154
156-
#[cfg_attr(stage0, unsafe_no_drop_flag)]
157155
#[stable(feature = "arc_weak", since = "1.4.0")]
158156
pub struct Weak<T: ?Sized> {
159157
ptr: Shared<ArcInner<T>>,

src/liballoc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
#![feature(staged_api)]
8989
#![feature(unboxed_closures)]
9090
#![feature(unique)]
91-
#![cfg_attr(stage0, feature(unsafe_no_drop_flag))]
9291
#![feature(unsize)]
9392

9493
#![cfg_attr(not(test), feature(fused, fn_traits, placement_new_protocol))]

src/liballoc/raw_vec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ use core::cmp;
4444
/// `shrink_to_fit`, and `from_box` will actually set RawVec's private capacity
4545
/// field. This allows zero-sized types to not be special-cased by consumers of
4646
/// this type.
47-
#[cfg_attr(stage0, unsafe_no_drop_flag)]
4847
pub struct RawVec<T> {
4948
ptr: Unique<T>,
5049
cap: usize,

0 commit comments

Comments
 (0)