Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 17 pull requests #59067

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
834347d
Add rustdoc JS non-std tests
GuillaumeGomez Feb 9, 2019
aa3ca32
Rename rustdoc js test suites
GuillaumeGomez Feb 23, 2019
be23cd9
Move documentation build into bootstrap
GuillaumeGomez Feb 24, 2019
240fad0
Update to last updates
GuillaumeGomez Feb 25, 2019
405d950
Move rustdoc-js testing into compiletest
GuillaumeGomez Feb 28, 2019
fb98ca7
fs::copy() linux: set file mode early
haraldh Feb 28, 2019
204f087
librustc_interface: Update scoped-tls to 1.0
Xanewok Mar 1, 2019
196e021
Prevent cache issues on version updates
GuillaumeGomez Mar 1, 2019
2742b23
Make migrate mode work at item level granularity
matthewjasper Feb 27, 2019
c82a42c
Change `std::fs::copy` to use `copyfile` on MacOS and iOS
ebarnard Mar 3, 2019
0a991e4
Add test for the behaviour of `fs::copy` when `to` is a symlink
ebarnard Mar 4, 2019
124ab2a
Fix typo
ebarnard Mar 4, 2019
1243859
core: ensure VaList passes improper_ctypes lint
dlrobertson Mar 5, 2019
72958ac
std: Spin for a global malloc lock on wasm32
alexcrichton Mar 1, 2019
710988a
MIPS: add r6 support
wzssyqa Mar 5, 2019
7e8758b
Update compiler_builtins to 0.1.7
jordanrh1 Mar 5, 2019
d6add90
Improve code
GuillaumeGomez Mar 6, 2019
00887f3
Adds diagnostic message and UI test.
repnop Mar 5, 2019
e19b228
Improve recovery for missing trait in a trait impl
petrochenkov Mar 7, 2019
0a505a7
Parse lifetimes that start with a number and give specific error
estebank Mar 2, 2019
9aa89b2
When encountetring `||{}()`, suggest the likely intended `(||{})()`
estebank Mar 9, 2019
a03e20d
Fix fallout from #57667
ishitatsuyuki Jan 31, 2019
967e7f4
resolve: Account for new importable entities
petrochenkov Mar 9, 2019
f690821
review comments
estebank Mar 8, 2019
3a83cb2
Fix ICE in MIR pretty printing
dlrobertson Mar 9, 2019
df4ea90
Use lifetime contravariance to elide more lifetimes in core+alloc+std
scottmcm Mar 10, 2019
3ef23ae
Rollup merge of #58021 - ishitatsuyuki:57667-fix, r=RalfJung
Centril Mar 10, 2019
5d2af50
Rollup merge of #58330 - GuillaumeGomez:rustdoc-js-non-std, r=QuietMi…
Centril Mar 10, 2019
4119762
Rollup merge of #58788 - matthewjasper:compare-children, r=pnkfelix
Centril Mar 10, 2019
e450216
Rollup merge of #58789 - jordanrh1:update-compiler-builtins, r=sanxiyn
Centril Mar 10, 2019
6519db8
Rollup merge of #58803 - haraldh:fs_copy_fix, r=alexcrichton
Centril Mar 10, 2019
02bd58e
Rollup merge of #58829 - Xanewok:scoped-tls, r=Zoxc
Centril Mar 10, 2019
cca1b79
Rollup merge of #58848 - GuillaumeGomez:fix-cache-issues, r=Mark-Simu…
Centril Mar 10, 2019
112007c
Rollup merge of #58855 - alexcrichton:wasm-multithreaded-alloc, r=fit…
Centril Mar 10, 2019
f721977
Rollup merge of #58872 - rep-nop:diagnostic-fix-56031, r=petrochenkov
Centril Mar 10, 2019
7cade09
Rollup merge of #58876 - estebank:numeric-lifetime, r=petrochenkov
Centril Mar 10, 2019
3b63572
Rollup merge of #58901 - ebarnard:just-copying, r=sfackler
Centril Mar 10, 2019
091266b
Rollup merge of #58938 - dlrobertson:fix_58280, r=joshtriplett
Centril Mar 10, 2019
65d565a
Rollup merge of #58941 - wzssyqa:master, r=alexcrichton
Centril Mar 10, 2019
91cbb53
Rollup merge of #59035 - estebank:closure-instacall, r=davidtwco
Centril Mar 10, 2019
035372b
Rollup merge of #59036 - dlrobertson:fix_59021, r=estebank
Centril Mar 10, 2019
56aeb70
Rollup merge of #59047 - petrochenkov:modnodefid, r=Centril
Centril Mar 10, 2019
6a94f44
Rollup merge of #59056 - scottmcm:even-fewer-lifetimes, r=sfackler
Centril Mar 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies = [
name = "alloc"
version = "0.0.0"
dependencies = [
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.7 (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 @@ -106,7 +106,7 @@ version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-std-workspace-core 1.0.0",
]
Expand Down Expand Up @@ -463,7 +463,7 @@ dependencies = [

[[package]]
name = "compiler_builtins"
version = "0.1.5"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -748,7 +748,7 @@ name = "dlmalloc"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-std-workspace-core 1.0.0",
]
Expand Down Expand Up @@ -906,7 +906,7 @@ name = "fortanix-sgx-abi"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-std-workspace-core 1.0.0",
]

Expand Down Expand Up @@ -1739,7 +1739,7 @@ dependencies = [
name = "panic_abort"
version = "0.0.0"
dependencies = [
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
"libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)",
]
Expand All @@ -1749,7 +1749,7 @@ name = "panic_unwind"
version = "0.0.0"
dependencies = [
"alloc 0.0.0",
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
"libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)",
"unwind 0.0.0",
Expand Down Expand Up @@ -1954,7 +1954,7 @@ name = "profiler_builtins"
version = "0.0.0"
dependencies = [
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
]

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

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

Expand Down Expand Up @@ -2779,7 +2779,7 @@ dependencies = [
"rustc_resolve 0.0.0",
"rustc_traits 0.0.0",
"rustc_typeck 0.0.0",
"scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serialize 0.0.0",
"smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
"syntax 0.0.0",
Expand Down Expand Up @@ -2814,7 +2814,7 @@ dependencies = [
"alloc 0.0.0",
"build_helper 0.1.0",
"cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
]

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

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

Expand Down Expand Up @@ -3263,7 +3263,7 @@ dependencies = [
"alloc 0.0.0",
"backtrace-sys 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.7 (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 @@ -3833,7 +3833,7 @@ dependencies = [
name = "unwind"
version = "0.0.0"
dependencies = [
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
"libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)",
]
Expand Down Expand Up @@ -4029,7 +4029,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.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6711d51cb46744dd8305293cc3fbc392aaff7a8f5095a7c4fae1e5113ef07c96"
"checksum compiler_builtins 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d7be038c8f003625c494e97c09bbcef65582b73f6aa86975f5273d8eba4c9d4c"
"checksum compiletest_rs 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "56c799b1f7142badf3b047b4c1f2074cc96b6b784fb2432f2ed9c87da0a03749"
"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
3 changes: 2 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ impl<'a> Builder<'a> {
test::Miri,
test::Clippy,
test::CompiletestTest,
test::RustdocJS,
test::RustdocJSStd,
test::RustdocJSNotStd,
test::RustdocTheme,
// Run bootstrap close to the end as it's unlikely to fail
test::Bootstrap,
Expand Down
15 changes: 7 additions & 8 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,10 @@ fn invoke_rustdoc(
.arg("--html-before-content").arg(&version_info)
.arg("--html-in-header").arg(&favicon)
.arg("--markdown-no-toc")
.arg("--markdown-playground-url")
.arg("https://play.rust-lang.org/")
.arg("-o").arg(&out)
.arg(&path)
.arg("--markdown-css")
.arg("../rust.css");
.arg("--resource-suffix").arg(crate::channel::CFG_RELEASE_NUM)
.arg("--markdown-playground-url").arg("https://play.rust-lang.org/")
.arg("-o").arg(&out).arg(&path)
.arg("--markdown-css").arg("../rust.css");

builder.run(&mut cmd);
}
Expand Down Expand Up @@ -430,9 +428,9 @@ impl Step for Standalone {
.arg("--html-before-content").arg(&version_info)
.arg("--html-in-header").arg(&favicon)
.arg("--markdown-no-toc")
.arg("--resource-suffix").arg(crate::channel::CFG_RELEASE_NUM)
.arg("--index-page").arg(&builder.src.join("src/doc/index.md"))
.arg("--markdown-playground-url")
.arg("https://play.rust-lang.org/")
.arg("--markdown-playground-url").arg("https://play.rust-lang.org/")
.arg("-o").arg(&out)
.arg(&path);

Expand Down Expand Up @@ -523,6 +521,7 @@ impl Step for Std {
.arg("--markdown-css").arg("rust.css")
.arg("--markdown-no-toc")
.arg("--generate-redirect-pages")
.arg("--resource-suffix").arg(crate::channel::CFG_RELEASE_NUM)
.arg("--index-page").arg(&builder.src.join("src/doc/index.md"));

builder.run(&mut cargo);
Expand Down
62 changes: 53 additions & 9 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,22 +574,22 @@ impl Step for RustdocTheme {
}

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct RustdocJS {
pub struct RustdocJSStd {
pub host: Interned<String>,
pub target: Interned<String>,
}

impl Step for RustdocJS {
impl Step for RustdocJSStd {
type Output = ();
const DEFAULT: bool = true;
const ONLY_HOSTS: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src/test/rustdoc-js")
run.path("src/test/rustdoc-js-std")
}

fn make_run(run: RunConfig<'_>) {
run.builder.ensure(RustdocJS {
run.builder.ensure(RustdocJSStd {
host: run.host,
target: run.target,
});
Expand All @@ -598,12 +598,55 @@ impl Step for RustdocJS {
fn run(self, builder: &Builder<'_>) {
if let Some(ref nodejs) = builder.config.nodejs {
let mut command = Command::new(nodejs);
command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
command.args(&["src/tools/rustdoc-js-std/tester.js", &*self.host]);
builder.ensure(crate::doc::Std {
target: self.target,
stage: builder.top_stage,
});
builder.run(&mut command);
} else {
builder.info(
"No nodejs found, skipping \"src/test/rustdoc-js-std\" tests"
);
}
}
}

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct RustdocJSNotStd {
pub host: Interned<String>,
pub target: Interned<String>,
pub compiler: Compiler,
}

impl Step for RustdocJSNotStd {
type Output = ();
const DEFAULT: bool = true;
const ONLY_HOSTS: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src/test/rustdoc-js")
}

fn make_run(run: RunConfig<'_>) {
let compiler = run.builder.compiler(run.builder.top_stage, run.host);
run.builder.ensure(RustdocJSNotStd {
host: run.host,
target: run.target,
compiler,
});
}

fn run(self, builder: &Builder<'_>) {
if builder.config.nodejs.is_some() {
builder.ensure(Compiletest {
compiler: self.compiler,
target: self.target,
mode: "js-doc-test",
suite: "rustdoc-js",
path: None,
compare_mode: None,
});
} else {
builder.info(
"No nodejs found, skipping \"src/test/rustdoc-js\" tests"
Expand Down Expand Up @@ -990,12 +1033,13 @@ impl Step for Compiletest {
.arg(builder.sysroot_libdir(compiler, target));
cmd.arg("--rustc-path").arg(builder.rustc(compiler));

let is_rustdoc_ui = suite.ends_with("rustdoc-ui");
let is_rustdoc = suite.ends_with("rustdoc-ui") || suite.ends_with("rustdoc-js");

// Avoid depending on rustdoc when we don't need it.
if mode == "rustdoc"
|| (mode == "run-make" && suite.ends_with("fulldeps"))
|| (mode == "ui" && is_rustdoc_ui)
|| (mode == "ui" && is_rustdoc)
|| mode == "js-doc-test"
{
cmd.arg("--rustdoc-path")
.arg(builder.rustdoc(compiler.host));
Expand Down Expand Up @@ -1029,12 +1073,12 @@ impl Step for Compiletest {
cmd.arg("--nodejs").arg(nodejs);
}

let mut flags = if is_rustdoc_ui {
let mut flags = if is_rustdoc {
Vec::new()
} else {
vec!["-Crpath".to_string()]
};
if !is_rustdoc_ui {
if !is_rustdoc {
if builder.config.rust_optimize_tests {
flags.push("-O".to_string());
}
Expand Down
8 changes: 4 additions & 4 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ impl<T: ?Sized> From<Box<T>> for Pin<Box<T>> {
}

#[stable(feature = "box_from_slice", since = "1.17.0")]
impl<'a, T: Copy> From<&'a [T]> for Box<[T]> {
impl<T: Copy> From<&[T]> for Box<[T]> {
/// Converts a `&[T]` into a `Box<[T]>`
///
/// This conversion allocates on the heap
Expand All @@ -503,15 +503,15 @@ impl<'a, T: Copy> From<&'a [T]> for Box<[T]> {
///
/// println!("{:?}", boxed_slice);
/// ```
fn from(slice: &'a [T]) -> Box<[T]> {
fn from(slice: &[T]) -> Box<[T]> {
let mut boxed = unsafe { RawVec::with_capacity(slice.len()).into_box() };
boxed.copy_from_slice(slice);
boxed
}
}

#[stable(feature = "box_from_slice", since = "1.17.0")]
impl<'a> From<&'a str> for Box<str> {
impl From<&str> for Box<str> {
/// Converts a `&str` into a `Box<str>`
///
/// This conversion allocates on the heap
Expand All @@ -523,7 +523,7 @@ impl<'a> From<&'a str> for Box<str> {
/// println!("{}", boxed);
/// ```
#[inline]
fn from(s: &'a str) -> Box<str> {
fn from(s: &str) -> Box<str> {
unsafe { from_boxed_utf8_unchecked(Box::from(s.as_bytes())) }
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1145,15 +1145,15 @@ impl<T> From<T> for Rc<T> {
}

#[stable(feature = "shared_from_slice", since = "1.21.0")]
impl<'a, T: Clone> From<&'a [T]> for Rc<[T]> {
impl<T: Clone> From<&[T]> for Rc<[T]> {
#[inline]
fn from(v: &[T]) -> Rc<[T]> {
<Self as RcFromSlice<T>>::from_slice(v)
}
}

#[stable(feature = "shared_from_slice", since = "1.21.0")]
impl<'a> From<&'a str> for Rc<str> {
impl From<&str> for Rc<str> {
#[inline]
fn from(v: &str) -> Rc<str> {
let rc = Rc::<[u8]>::from(v.as_bytes());
Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2172,9 +2172,9 @@ impl AsRef<[u8]> for String {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a> From<&'a str> for String {
impl From<&str> for String {
#[inline]
fn from(s: &'a str) -> String {
fn from(s: &str) -> String {
s.to_owned()
}
}
Expand Down
Loading