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 26 pull requests #40595

Closed
wants to merge 81 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
13341f4
Reword the non-dropping of `src` for `ptr::write{,_unaligned}`
tbu- Mar 9, 2017
b38992c
some style fixes
tshepang Mar 13, 2017
6b7b262
Updating README.md to point to the correct doc location
projektir Mar 13, 2017
adba642
fix format grammar
llogiq Mar 13, 2017
5e49f79
Add test for issue #29595
mattico Mar 10, 2017
11d3344
Using X headings #39850
projektir Mar 13, 2017
8b9b3b6
Fix sidebar not extending to the bottom of the page
wesleywiser Mar 14, 2017
5b7f330
Corrected very minor documentation detail about Unicode and Japanese
Mar 14, 2017
e06c515
Rust unstable book: basic desc and example for `const_fn`.
frewsxcv Mar 11, 2017
327e8e9
Rust unstable book: basic desc and example for `conservative_impl_tra…
frewsxcv Mar 11, 2017
0dd03ff
Rust unstable book: basic desc and example for `const_indexing`.
frewsxcv Mar 12, 2017
137c1e8
Rust unstable book: basic desc and example for `i128_type`.
frewsxcv Mar 12, 2017
e58e3d0
Rust unstable book: basic desc and example for `non_ascii_idents`.
frewsxcv Mar 12, 2017
d3ae2eb
Rust unstable book: basic desc and example for `concat_idents`.
frewsxcv Mar 12, 2017
1545f4e
std: remove a workaround for privacy limitations that isn't necessary…
swgillespie Mar 14, 2017
5cc056a
A few improvements to the `core::hash` top-level docs.
frewsxcv Mar 14, 2017
5fab9bf
travis: Ensure cargo links libcurl statically
alexcrichton Mar 14, 2017
0671cc1
.gitmodules: use official URLs w/o redirect
nodakai Mar 14, 2017
9a7b789
Add doc example for `OsStr::to_os_string`.
frewsxcv Mar 12, 2017
4d57d92
Add doc example for `OsString::reserve`.
frewsxcv Mar 12, 2017
5537955
Add doc example for `OsString::reserve_exact`.
frewsxcv Mar 12, 2017
bda57db
Add doc example for `OsString::shrink_to_fit`.
frewsxcv Mar 12, 2017
6adbbfc
Add doc example for `OsString::into_boxed_os_str`.
frewsxcv Mar 12, 2017
cc08edc
Remove incorrect feature from the 1.16 relnotes
steveklabnik Mar 14, 2017
61d9387
Target builds for older macOS
wagenet Mar 13, 2017
8b7c7f3
Link core::slice to std::slice
steveklabnik Mar 14, 2017
e3b8550
Point out correct turbofish usage on `Foo<Bar<Baz>>`
estebank Mar 14, 2017
3554ff3
Make docs required again
brson Mar 14, 2017
18a8494
Ammended minor documentation detail abour Unicode cases.
Mar 15, 2017
f23d448
Stabilize move_cell feature, closes #39264
aturon Mar 15, 2017
5b4a1b6
Stabilize expect_err feature, closes #39041
aturon Mar 15, 2017
f789955
Stabilize ptr_unaligned feature, closes #37955
aturon Mar 15, 2017
b60879a
Stabilize process_abort feature, closes #37838
aturon Mar 15, 2017
698c1bb
Stabilize ptr_eq feature, closes #36497
aturon Mar 15, 2017
86b48b2
Stabilize btree_range, closes #27787
aturon Mar 15, 2017
52d9682
Stabilize ordering_chaining, closes #37053
aturon Mar 15, 2017
c2d2c2d
Stabilize rc_raw feature, closes #37197
aturon Mar 15, 2017
5de0406
rustbuild: Retry downloads of OpenSSL source
alexcrichton Mar 15, 2017
e66b3a2
Fix documentation for Vec::dedup_by.
kevinmehall Mar 15, 2017
0739ece
Removes Default for Box<Path>.
Mar 15, 2017
4d8bd05
Remove the existing book
steveklabnik Mar 7, 2017
cc56c7d
Import submodule for the book.
steveklabnik Mar 7, 2017
65cc839
build both editions of the book
steveklabnik Mar 7, 2017
8372e11
build book index
steveklabnik Mar 7, 2017
73b46a0
Render redirect pages.
steveklabnik Mar 7, 2017
11c44aa
Fix up some issues.
steveklabnik Mar 7, 2017
62b280a
fix whitespace
steveklabnik Mar 7, 2017
1d0b1e3
skip nostarch directory
steveklabnik Mar 13, 2017
714ed07
Update book and reference submodules
steveklabnik Mar 14, 2017
9d2cfd4
Fix up various links
steveklabnik Mar 15, 2017
a26162e
exempt hbs from linkchecker
steveklabnik Mar 15, 2017
3d8d376
Minor fixups to fix tidy errors
alexcrichton Mar 15, 2017
befeb04
Remove unused param from bootstrap::clean::rm_rf
mbrubeck Mar 15, 2017
3d01e1a
add sort_unstable to unstable book
steveklabnik Mar 16, 2017
bc6eecd
Merge branch 'master' into frewsxcv-osstr
frewsxcv Mar 17, 2017
f722ee0
Rollup merge of #40332 - steveklabnik:extract-book, r=alexcrichton
frewsxcv Mar 17, 2017
a91ecdb
Rollup merge of #40387 - tbu-:pr_doc_ptr_write2, r=steveklabnik
frewsxcv Mar 17, 2017
c7c533f
Rollup merge of #40433 - mattico:test-issue-29595, r=estebank
frewsxcv Mar 17, 2017
fefd84e
Rollup merge of #40452 - frewsxcv:frewsxcv-unstable-docs, r=Guillaume…
frewsxcv Mar 17, 2017
ced41ef
Rollup merge of #40458 - frewsxcv:frewsxcv-osstr, r=GuillaumeGomez
frewsxcv Mar 17, 2017
68c8b63
Rollup merge of #40463 - tshepang:nit, r=nikomatsakis
frewsxcv Mar 17, 2017
1c4f0ba
Rollup merge of #40467 - projektir:readme_docs, r=steveklabnik
frewsxcv Mar 17, 2017
b5a5ee4
Rollup merge of #40482 - wagenet:fix-old-macos, r=alexcrichton
frewsxcv Mar 17, 2017
28104d0
Rollup merge of #40495 - llogiq:format-docs, r=steveklabnik
frewsxcv Mar 17, 2017
81093a1
Rollup merge of #40496 - projektir:docs_number_headings, r=frewsxcv
frewsxcv Mar 17, 2017
be2d891
Rollup merge of #40497 - wesleywiser:fix_sidebar, r=GuillaumeGomez
frewsxcv Mar 17, 2017
9938a80
Rollup merge of #40499 - ericfindlay:master, r=steveklabnik
frewsxcv Mar 17, 2017
a53bfcc
Rollup merge of #40500 - estebank:turbofish-help, r=pnkfelix
frewsxcv Mar 17, 2017
8b0d071
Rollup merge of #40503 - swgillespie:thread-hack-removal, r=sfackler
frewsxcv Mar 17, 2017
a463ba8
Rollup merge of #40505 - frewsxcv:hash-docs, r=alexcrichton
frewsxcv Mar 17, 2017
6a8b974
Rollup merge of #40507 - alexcrichton:static-libcurl, r=brson
frewsxcv Mar 17, 2017
7d0ad91
Rollup merge of #40512 - nodakai:patch-1, r=alexcrichton
frewsxcv Mar 17, 2017
ea54a37
Rollup merge of #40517 - rust-lang:release-notes-tweak, r=alexcrichton
frewsxcv Mar 17, 2017
bec8f5d
Rollup merge of #40520 - steveklabnik:link-core-slice, r=alexcrichton
frewsxcv Mar 17, 2017
0ae763d
Rollup merge of #40526 - brson:docs-req, r=alexcrichton
frewsxcv Mar 17, 2017
76ac8fd
Rollup merge of #40536 - kevinmehall:dedup_docs_for_dedup_by, r=steve…
frewsxcv Mar 17, 2017
5616df5
Rollup merge of #40538 - aturon:stab-1.17, r=alexcrichton
frewsxcv Mar 17, 2017
37863ab
Rollup merge of #40539 - clarcharr:no_default_path, r=alexcrichton
frewsxcv Mar 17, 2017
7e313ab
Rollup merge of #40545 - alexcrichton:retry-download-openssl, r=nikom…
frewsxcv Mar 17, 2017
683637b
Rollup merge of #40562 - mbrubeck:bootstrap, r=alexcrichton
frewsxcv Mar 17, 2017
7569ddc
Rollup merge of #40586 - steveklabnik:add-unstable-sort-to-unstable-b…
frewsxcv Mar 17, 2017
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
7 changes: 5 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@
url = https://github.com/rust-lang/libc.git
[submodule "src/doc/nomicon"]
path = src/doc/nomicon
url = https://github.com/rust-lang-nursery/nomicon
url = https://github.com/rust-lang-nursery/nomicon.git
[submodule "src/tools/cargo"]
path = cargo
url = https://github.com/rust-lang/cargo
url = https://github.com/rust-lang/cargo.git
[submodule "reference"]
path = src/doc/reference
url = https://github.com/rust-lang-nursery/reference.git
[submodule "book"]
path = src/doc/book
url = https://github.com/rust-lang/book
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ matrix:
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode8.2
install: &osx_install_sccache >
Expand All @@ -60,6 +62,8 @@ matrix:
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode8.2
install: *osx_install_sccache
Expand All @@ -72,6 +76,8 @@ matrix:
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode8.2
install: >
Expand All @@ -85,6 +91,8 @@ matrix:
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode8.2
install: *osx_install_sccache
Expand All @@ -102,6 +110,8 @@ matrix:
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode8.2
install: *osx_install_sccache
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ If you’d like to build the documentation, it’s almost the same:
$ ./x.py doc
```

The generated documentation will appear in a top-level `doc` directory,
created by the `make` rule.
The generated documentation will appear under `doc` in the `build` directory for
the ABI used. I.e., if the ABI was `x86_64-pc-windows-msvc`, the directory will be
`build\x86_64-pc-windows-msvc\doc`.

## Notes

Expand Down
1 change: 0 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Version 1.16.0 (2017-03-16)
Language
--------

* Lifetimes in statics and consts default to `'static`. [RFC 1623]
* [The compiler's `dead_code` lint now accounts for type aliases][38051].
* [Uninhabitable enums (those without any variants) no longer permit wildcard
match patterns][38069]
Expand Down
2 changes: 1 addition & 1 deletion cargo
10 changes: 10 additions & 0 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,16 @@ pub fn docs(build: &Build, compiler: &Compiler) {
continue
}

// The nostarch directory in the book is for no starch, and so isn't guaranteed to build.
// we don't care if it doesn't build, so skip it.
use std::ffi::OsStr;
let path: &OsStr = p.as_ref();
if let Some(path) = path.to_str() {
if path.contains("nostarch") {
continue;
}
}

println!("doc tests for: {}", p.display());
markdown_test(build, compiler, &p);
}
Expand Down
12 changes: 6 additions & 6 deletions src/bootstrap/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ use std::path::Path;
use Build;

pub fn clean(build: &Build) {
rm_rf(build, "tmp".as_ref());
rm_rf(build, &build.out.join("tmp"));
rm_rf(build, &build.out.join("dist"));
rm_rf("tmp".as_ref());
rm_rf(&build.out.join("tmp"));
rm_rf(&build.out.join("dist"));

for host in build.config.host.iter() {
let entries = match build.out.join(host).read_dir() {
Expand All @@ -38,12 +38,12 @@ pub fn clean(build: &Build) {
continue
}
let path = t!(entry.path().canonicalize());
rm_rf(build, &path);
rm_rf(&path);
}
}
}

fn rm_rf(build: &Build, path: &Path) {
fn rm_rf(path: &Path) {
if !path.exists() {
return
}
Expand All @@ -55,7 +55,7 @@ fn rm_rf(build: &Build, path: &Path) {
let file = t!(file).path();

if file.is_dir() {
rm_rf(build, &file);
rm_rf(&file);
} else {
// On windows we can't remove a readonly file, and git will
// often clone files as readonly. As a result, we have some
Expand Down
9 changes: 9 additions & 0 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use std::collections::HashMap;
use std::fs::{self, File};
use std::path::{Path, PathBuf};
use std::process::Command;
use std::env;

use build_helper::{output, mtime, up_to_date};
use filetime::FileTime;
Expand All @@ -44,6 +45,11 @@ pub fn std(build: &Build, target: &str, compiler: &Compiler) {
build.clear_if_dirty(&out_dir, &build.compiler_path(compiler));
let mut cargo = build.cargo(compiler, Mode::Libstd, target, "build");
let mut features = build.std_features();

if let Ok(target) = env::var("MACOSX_STD_DEPLOYMENT_TARGET") {
cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
}

// When doing a local rebuild we tell cargo that we're stage1 rather than
// stage0. This works fine if the local rust and being-built rust have the
// same view of what the default allocator is, but fails otherwise. Since
Expand Down Expand Up @@ -170,6 +176,9 @@ pub fn test(build: &Build, target: &str, compiler: &Compiler) {
let out_dir = build.cargo_out(compiler, Mode::Libtest, target);
build.clear_if_dirty(&out_dir, &libstd_stamp(build, compiler, target));
let mut cargo = build.cargo(compiler, Mode::Libtest, target, "build");
if let Ok(target) = env::var("MACOSX_STD_DEPLOYMENT_TARGET") {
cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
}
cargo.arg("--manifest-path")
.arg(build.src.join("src/libtest/Cargo.toml"));
build.run(&mut cargo);
Expand Down
76 changes: 76 additions & 0 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,82 @@ pub fn rustbook(build: &Build, target: &str, name: &str) {
.arg(out));
}

/// Build the book and associated stuff.
///
/// We need to build:
///
/// * Book (first edition)
/// * Book (second edition)
/// * Index page
/// * Redirect pages
pub fn book(build: &Build, target: &str, name: &str) {
// build book first edition
rustbook(build, target, &format!("{}/first-edition", name));

// build book second edition
rustbook(build, target, &format!("{}/second-edition", name));

// build the index page
let index = format!("{}/index.md", name);
println!("Documenting book index ({})", target);
invoke_rustdoc(build, target, &index);

// build the redirect pages
println!("Documenting book redirect pages ({})", target);
for file in t!(fs::read_dir(build.src.join("src/doc/book/redirects"))) {
let file = t!(file);
let path = file.path();
let path = path.to_str().unwrap();

invoke_rustdoc(build, target, path);
}
}

fn invoke_rustdoc(build: &Build, target: &str, markdown: &str) {
let out = build.doc_out(target);

let compiler = Compiler::new(0, &build.config.build);

let path = build.src.join("src/doc").join(markdown);

let rustdoc = build.rustdoc(&compiler);

let favicon = build.src.join("src/doc/favicon.inc");
let footer = build.src.join("src/doc/footer.inc");

let version_input = build.src.join("src/doc/version_info.html.template");
let version_info = out.join("version_info.html");

if !up_to_date(&version_input, &version_info) {
let mut info = String::new();
t!(t!(File::open(&version_input)).read_to_string(&mut info));
let info = info.replace("VERSION", &build.rust_release())
.replace("SHORT_HASH", build.rust_info.sha_short().unwrap_or(""))
.replace("STAMP", build.rust_info.sha().unwrap_or(""));
t!(t!(File::create(&version_info)).write_all(info.as_bytes()));
}

let mut cmd = Command::new(&rustdoc);

build.add_rustc_lib_path(&compiler, &mut cmd);

let out = out.join("book");

t!(fs::copy(build.src.join("src/doc/rust.css"), out.join("rust.css")));

cmd.arg("--html-after-content").arg(&footer)
.arg("--html-before-content").arg(&version_info)
.arg("--html-in-header").arg(&favicon)
.arg("--markdown-playground-url")
.arg("https://play.rust-lang.org/")
.arg("-o").arg(&out)
.arg(&path)
.arg("--markdown-css")
.arg("rust.css");

build.run(&mut cmd);
}

/// Generates all standalone documentation as compiled by the rustdoc in `stage`
/// for the `target` into `out`.
///
Expand Down
21 changes: 18 additions & 3 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,24 @@ pub fn openssl(build: &Build, target: &str) {
let tarball = out.join(&name);
if !tarball.exists() {
let tmp = tarball.with_extension("tmp");
build.run(Command::new("curl")
.arg("-o").arg(&tmp)
.arg(format!("https://www.openssl.org/source/{}", name)));
// originally from https://www.openssl.org/source/...
let url = format!("https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/{}",
name);
let mut ok = false;
for _ in 0..3 {
let status = Command::new("curl")
.arg("-o").arg(&tmp)
.arg(&url)
.status()
.expect("failed to spawn curl");
if status.success() {
ok = true;
break
}
}
if !ok {
panic!("failed to download openssl source")
}
let mut shasum = if target.contains("apple") {
let mut cmd = Command::new("shasum");
cmd.arg("-a").arg("256");
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
.stage(0)
})
.default(build.config.docs)
.run(move |s| doc::rustbook(build, s.target, "book"));
.run(move |s| doc::book(build, s.target, "book"));
rules.doc("doc-nomicon", "src/doc/nomicon")
.dep(move |s| {
s.name("tool-rustbook")
Expand Down
6 changes: 6 additions & 0 deletions src/ci/docker/dist-x86-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,10 @@ ENV RUST_CONFIGURE_ARGS \
--enable-extended \
--enable-sanitizers
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

# This is the only builder which will create source tarballs
ENV DIST_SRC 1

# When we build cargo in this container, we don't want it to use the system
# libcurl, instead it should compile its own.
ENV LIBCURL_NO_PKG_CONFIG 1
1 change: 1 addition & 0 deletions src/doc/book
Submodule book added at e6d6ca
39 changes: 0 additions & 39 deletions src/doc/book/src/README.md

This file was deleted.

Loading