New upstream version 1.36.0+dfsg1

This commit is contained in:
Ximin Luo 2019-07-13 12:21:47 -07:00
parent 532ac7d753
commit 48663c562f
5247 changed files with 162455 additions and 69316 deletions

719
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -67,6 +67,7 @@ rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' }
# See comments in `tools/rustc-std-workspace-core/README.md` for what's going on
# here
rustc-std-workspace-core = { path = 'src/tools/rustc-std-workspace-core' }
rustc-std-workspace-alloc = { path = 'src/tools/rustc-std-workspace-alloc' }
[patch."https://github.com/rust-lang/rust-clippy"]
clippy_lints = { path = "src/tools/clippy/clippy_lints" }

View File

@ -128,9 +128,15 @@ build.
#### MSVC
[windows-msvc]: #windows-msvc
MSVC builds of Rust additionally require an installation of Visual Studio 2013
(or later) so `rustc` can use its linker. Make sure to check the “C++ tools”
option.
MSVC builds of Rust additionally require an installation of Visual Studio 2017
(or later) so `rustc` can use its linker. The simplest way is to get the
[Visual Studio Build Tools] and check the “C++ build tools” workload.
[Visual Studio Build Tools]: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019
At last check (cmake 3.14.3 and msvc 16.0.3) using the 2019 tools fails to
build the in-tree LLVM build with a CMake error, so use 2017 instead by
including the “MSVC v141 VS 2017 C++ x64/x86 build tools (v14.16)” component.
With these dependencies installed, you can build the compiler in a `cmd.exe`
shell with:
@ -261,3 +267,19 @@ BSD-like licenses.
See [LICENSE-APACHE](LICENSE-APACHE), [LICENSE-MIT](LICENSE-MIT), and
[COPYRIGHT](COPYRIGHT) for details.
## Trademark
[trademark]: #trademark
The Rust programming language is an open source, community project governed
by a core team. It is also sponsored by the Mozilla Foundation (“Mozilla”),
which owns and protects the Rust and Cargo trademarks and logos
(the “Rust Trademarks”).
If you want to use these names or brands, please read the [media guide][media-guide].
Third-party logos may be subject to third-party copyrights and trademarks. See
[Licenses][policies-licenses] for details.
[media-guide]: https://www.rust-lang.org/policies/media-guide
[policies-licenses]: https://www.rust-lang.org/policies/licenses

View File

@ -1,3 +1,107 @@
Version 1.36.0 (2019-07-04)
==========================
Language
--------
- [Non-Lexical Lifetimes are now enabled on the 2015 edition.][59114]
- [The order of traits in trait objects no longer affects the semantics of that
object.][59445] e.g. `dyn Send + fmt::Debug` is now equivalent to
`dyn fmt::Debug + Send`, where this was previously not the case.
Libraries
---------
- [`HashMap`'s implementation has been replaced with `hashbrown::HashMap` implementation.][58623]
- [`TryFromSliceError` now implements `From<Infallible>`.][60318]
- [`mem::needs_drop` is now available as a const fn.][60364]
- [`alloc::Layout::from_size_align_unchecked` is now available as a const fn.][60370]
- [`String` now implements `BorrowMut<str>`.][60404]
- [`io::Cursor` now implements `Default`.][60234]
- [Both `NonNull::{dangling, cast}` are now const fns.][60244]
- [The `alloc` crate is now stable.][59675] `alloc` allows you to use a subset
of `std` (e.g. `Vec`, `Box`, `Arc`) in `#![no_std]` environments if the
environment has access to heap memory allocation.
- [`String` now implements `From<&String>`.][59825]
- [You can now pass multiple arguments to the `dbg!` macro.][59826] `dbg!` will
return a tuple of each argument when there is multiple arguments.
- [`Result::{is_err, is_ok}` are now `#[must_use]` and will produce a warning if
not used.][59648]
Stabilized APIs
---------------
- [`VecDeque::rotate_left`]
- [`VecDeque::rotate_right`]
- [`Iterator::copied`]
- [`io::IoSlice`]
- [`io::IoSliceMut`]
- [`Read::read_vectored`]
- [`Write::write_vectored`]
- [`str::as_mut_ptr`]
- [`mem::MaybeUninit`]
- [`pointer::align_offset`]
- [`future::Future`]
- [`task::Context`]
- [`task::RawWaker`]
- [`task::RawWakerVTable`]
- [`task::Waker`]
- [`task::Poll`]
Cargo
-----
- [Cargo will now produce an error if you attempt to use the name of a required dependency as a feature.][cargo/6860]
- [You can now pass the `--offline` flag to run cargo without accessing the network.][cargo/6934]
You can find further change's in [Cargo's 1.36.0 release notes][cargo-1-36-0].
Clippy
------
There have been numerous additions and fixes to clippy, see [Clippy's 1.36.0 release notes][clippy-1-36-0] for more details.
Misc
----
Compatibility Notes
-------------------
- [`std::arch::x86::_rdtsc` returns `u64` instead of `i64`][stdsimd/559]
- [`std::arch::x86_64::_mm_shuffle_ps` takes an `i32` instead of `u32` for `mask`][stdsimd/522]
- With the stabilisation of `mem::MaybeUninit`, `mem::uninitialized` use is no
longer recommended, and will be deprecated in 1.38.0.
[60318]: https://github.com/rust-lang/rust/pull/60318/
[60364]: https://github.com/rust-lang/rust/pull/60364/
[60370]: https://github.com/rust-lang/rust/pull/60370/
[60404]: https://github.com/rust-lang/rust/pull/60404/
[60234]: https://github.com/rust-lang/rust/pull/60234/
[60244]: https://github.com/rust-lang/rust/pull/60244/
[58623]: https://github.com/rust-lang/rust/pull/58623/
[59648]: https://github.com/rust-lang/rust/pull/59648/
[59675]: https://github.com/rust-lang/rust/pull/59675/
[59825]: https://github.com/rust-lang/rust/pull/59825/
[59826]: https://github.com/rust-lang/rust/pull/59826/
[59445]: https://github.com/rust-lang/rust/pull/59445/
[59114]: https://github.com/rust-lang/rust/pull/59114/
[cargo/6860]: https://github.com/rust-lang/cargo/pull/6860/
[cargo/6934]: https://github.com/rust-lang/cargo/pull/6934/
[`VecDeque::rotate_left`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_left
[`VecDeque::rotate_right`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_right
[`Iterator::copied`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#tymethod.copied
[`io::IoSlice`]: https://doc.rust-lang.org/std/io/struct.IoSlice.html
[`io::IoSliceMut`]: https://doc.rust-lang.org/std/io/struct.IoSliceMut.html
[`Read::read_vectored`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_vectored
[`Write::write_vectored`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_vectored
[`str::as_mut_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_mut_ptr
[`mem::MaybeUninit`]: https://doc.rust-lang.org/std/mem/union.MaybeUninit.html
[`pointer::align_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.align_offset
[`future::Future`]: https://doc.rust-lang.org/std/future/trait.Future.html
[`task::Context`]: https://doc.rust-lang.org/beta/std/task/struct.Context.html
[`task::RawWaker`]: https://doc.rust-lang.org/beta/std/task/struct.RawWaker.html
[`task::RawWakerVTable`]: https://doc.rust-lang.org/beta/std/task/struct.RawWakerVTable.html
[`task::Waker`]: https://doc.rust-lang.org/beta/std/task/struct.Waker.html
[`task::Poll`]: https://doc.rust-lang.org/beta/std/task/enum.Poll.html
[clippy-1-36-0]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-136
[cargo-1-36-0]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-136-2019-07-04
[stdsimd/522]: https://github.com/rust-lang-nursery/stdsimd/issues/522
[stdsimd/559]: https://github.com/rust-lang-nursery/stdsimd/issues/559
Version 1.35.0 (2019-05-23)
==========================
@ -62,7 +166,7 @@ Cargo
- [You can now set `cargo:rustc-cdylib-link-arg` at build time to pass custom
linker arguments when building a `cdylib`.][cargo/6298] Its usage is highly
platform specific.
Misc
----
- [The Rust toolchain is now available natively for musl based distros.][58575]

View File

@ -480,7 +480,7 @@
# linked binaries
#musl-root = "..."
# The root location of the `wasm32-unknown-wasi` sysroot.
# The root location of the `wasm32-wasi` sysroot.
#wasi-root = "..."
# Used in testing for configuring where the QEMU images are located, you

View File

@ -1 +1 @@
3c235d5600393dfe6c36eeed34042efad8d4f26e
a53f9df32fbb0b5f4382caaad8f1a46f36ea887c

View File

@ -36,17 +36,16 @@ test = false
[dependencies]
build_helper = { path = "../build_helper" }
cmake = "0.1.23"
cmake = "0.1.38"
filetime = "0.2"
num_cpus = "1.0"
getopts = "0.2"
cc = "1.0.1"
getopts = "0.2.19"
cc = "1.0.35"
libc = "0.2"
serde = "1.0.8"
serde_derive = "1.0.8"
serde = { version = "1.0.8", features = ["derive"] }
serde_json = "1.0.2"
toml = "0.4"
lazy_static = "0.2"
lazy_static = "1.3.0"
time = "0.1"
petgraph = "0.4.13"

View File

@ -262,6 +262,7 @@ fn main() {
// The flags here should be kept in sync with `add_miri_default_args`
// in miri's `src/lib.rs`.
cmd.arg("-Zalways-encode-mir");
cmd.arg("--cfg=miri");
// These options are preferred by miri, to be able to perform better validation,
// but the bootstrap compiler might not understand them.
if stage != "0" {
@ -290,9 +291,7 @@ fn main() {
}
// This is required for internal lints.
if stage != "0" {
cmd.arg("-Zunstable-options");
}
cmd.arg("-Zunstable-options");
// Force all crates compiled by this compiler to (a) be unstable and (b)
// allow the `rustc_private` feature to link to other unstable crates
@ -310,6 +309,7 @@ fn main() {
{
cmd.arg("-Dwarnings");
cmd.arg("-Dbare_trait_objects");
cmd.arg("-Drust_2018_idioms");
}
if verbose > 1 {

View File

@ -177,7 +177,6 @@ def default_build_triple():
# The goal here is to come up with the same triple as LLVM would,
# at least for the subset of platforms we're willing to target.
ostype_mapper = {
'Bitrig': 'unknown-bitrig',
'Darwin': 'apple-darwin',
'DragonFly': 'unknown-dragonfly',
'FreeBSD': 'unknown-freebsd',
@ -677,9 +676,15 @@ class RustBuild(object):
run(["git", "submodule", "-q", "sync", module],
cwd=self.rust_root, verbose=self.verbose)
run(["git", "submodule", "update",
"--init", "--recursive", "--progress", module],
cwd=self.rust_root, verbose=self.verbose)
try:
run(["git", "submodule", "update",
"--init", "--recursive", "--progress", module],
cwd=self.rust_root, verbose=self.verbose, exception=True)
except RuntimeError:
# Some versions of git don't support --progress.
run(["git", "submodule", "update",
"--init", "--recursive", module],
cwd=self.rust_root, verbose=self.verbose)
run(["git", "reset", "-q", "--hard"],
cwd=module_path, verbose=self.verbose)
run(["git", "clean", "-qdfx"],

View File

@ -11,6 +11,8 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use std::time::{Duration, Instant};
use build_helper::t;
use crate::cache::{Cache, Interned, INTERNER};
use crate::check;
use crate::compile;
@ -853,14 +855,30 @@ impl<'a> Builder<'a> {
// FIXME: Temporary fix for https://github.com/rust-lang/cargo/issues/3005
// Force cargo to output binaries with disambiguating hashes in the name
let metadata = if compiler.stage == 0 {
// Treat stage0 like special channel, whether it's a normal prior-
let mut metadata = if compiler.stage == 0 {
// Treat stage0 like a special channel, whether it's a normal prior-
// release rustc or a local rebuild with the same version, so we
// never mix these libraries by accident.
"bootstrap"
"bootstrap".to_string()
} else {
&self.config.channel
self.config.channel.to_string()
};
// We want to make sure that none of the dependencies between
// std/test/rustc unify with one another. This is done for weird linkage
// reasons but the gist of the problem is that if librustc, libtest, and
// libstd all depend on libc from crates.io (which they actually do) we
// want to make sure they all get distinct versions. Things get really
// weird if we try to unify all these dependencies right now, namely
// around how many times the library is linked in dynamic libraries and
// such. If rustc were a static executable or if we didn't ship dylibs
// this wouldn't be a problem, but we do, so it is. This is in general
// just here to make sure things build right. If you can remove this and
// things still build right, please do!
match mode {
Mode::Std => metadata.push_str("std"),
Mode::Test => metadata.push_str("test"),
_ => {},
}
cargo.env("__CARGO_DEFAULT_LIB_METADATA", &metadata);
let stage;
@ -1292,6 +1310,8 @@ mod __test {
use crate::config::Config;
use std::thread;
use pretty_assertions::assert_eq;
fn configure(host: &[&str], target: &[&str]) -> Config {
let mut config = Config::default_opts();
// don't save toolstates

View File

@ -13,6 +13,8 @@ use std::path::{Path, PathBuf};
use std::sync::Mutex;
use std::cmp::{PartialOrd, Ord, Ordering};
use lazy_static::lazy_static;
use crate::builder::Step;
pub struct Interned<T>(usize, PhantomData<*const T>);

View File

@ -13,7 +13,7 @@ use build_helper::output;
use crate::Build;
// The version number
pub const CFG_RELEASE_NUM: &str = "1.35.0";
pub const CFG_RELEASE_NUM: &str = "1.36.0";
pub struct GitInfo {
inner: Option<Info>,

View File

@ -9,6 +9,8 @@ use std::fs;
use std::io::{self, ErrorKind};
use std::path::Path;
use build_helper::t;
use crate::Build;
pub fn clean(build: &Build, all: bool) {

View File

@ -15,8 +15,9 @@ use std::path::{Path, PathBuf};
use std::process::{Command, Stdio, exit};
use std::str;
use build_helper::{output, mtime, up_to_date};
use build_helper::{output, mtime, t, up_to_date};
use filetime::FileTime;
use serde::Deserialize;
use serde_json;
use crate::dist;
@ -167,7 +168,7 @@ pub fn std_cargo(builder: &Builder<'_>,
.arg("--manifest-path")
.arg(builder.src.join("src/liballoc/Cargo.toml"))
.arg("--features")
.arg("compiler-builtins-mem");
.arg("compiler-builtins-mem compiler-builtins-c");
} else {
let features = builder.std_features();

View File

@ -10,8 +10,10 @@ use std::path::{Path, PathBuf};
use std::process;
use std::cmp;
use build_helper::t;
use num_cpus;
use toml;
use serde::Deserialize;
use crate::cache::{INTERNER, Interned};
use crate::flags::Flags;
pub use crate::flags::Subcommand;

View File

@ -14,7 +14,7 @@ use std::io::Write;
use std::path::{PathBuf, Path};
use std::process::{Command, Stdio};
use build_helper::output;
use build_helper::{output, t};
use crate::{Compiler, Mode, LLVM_TOOLS};
use crate::channel;
@ -906,6 +906,7 @@ impl Step for Src {
"src/stdsimd",
"src/libproc_macro",
"src/tools/rustc-std-workspace-core",
"src/tools/rustc-std-workspace-alloc",
"src/librustc",
"src/libsyntax",
];

View File

@ -13,7 +13,7 @@ use std::io;
use std::path::{PathBuf, Path};
use crate::Mode;
use build_helper::up_to_date;
use build_helper::{t, up_to_date};
use crate::util::symlink_dir;
use crate::builder::{Builder, Compiler, RunConfig, ShouldRun, Step};
@ -277,7 +277,7 @@ impl Step for TheBook {
builder.ensure(Rustbook {
target,
name: INTERNER.intern_string(name.to_string()),
version: RustbookVersion::MdBook1,
version: RustbookVersion::MdBook2,
});
// building older edition redirects
@ -286,21 +286,21 @@ impl Step for TheBook {
builder.ensure(Rustbook {
target,
name: INTERNER.intern_string(source_name),
version: RustbookVersion::MdBook1,
version: RustbookVersion::MdBook2,
});
let source_name = format!("{}/second-edition", name);
builder.ensure(Rustbook {
target,
name: INTERNER.intern_string(source_name),
version: RustbookVersion::MdBook1,
version: RustbookVersion::MdBook2,
});
let source_name = format!("{}/2018-edition", name);
builder.ensure(Rustbook {
target,
name: INTERNER.intern_string(source_name),
version: RustbookVersion::MdBook1,
version: RustbookVersion::MdBook2,
});
// build the version info page and CSS

View File

@ -8,6 +8,8 @@ use std::fs;
use std::path::{Path, PathBuf, Component};
use std::process::Command;
use build_helper::t;
use crate::dist::{self, pkgname, sanitize_sh, tmpdir};
use crate::builder::{Builder, RunConfig, ShouldRun, Step};

View File

@ -108,17 +108,6 @@
#![feature(core_intrinsics)]
#![feature(drain_filter)]
#[macro_use]
extern crate build_helper;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate lazy_static;
#[cfg(test)]
#[macro_use]
extern crate pretty_assertions;
use std::cell::{RefCell, Cell};
use std::collections::{HashSet, HashMap};
use std::env;
@ -134,7 +123,9 @@ use std::os::unix::fs::symlink as symlink_file;
#[cfg(windows)]
use std::os::windows::fs::symlink_file;
use build_helper::{run_silent, run_suppressed, try_run_silent, try_run_suppressed, output, mtime};
use build_helper::{
mtime, output, run_silent, run_suppressed, t, try_run_silent, try_run_suppressed,
};
use filetime::FileTime;
use crate::util::{exe, libdir, OutputFolder, CiEnv};
@ -1049,7 +1040,7 @@ impl Build {
}
fn llvm_tools_package_vers(&self) -> String {
self.package_vers(&self.rust_version())
self.package_vers(channel::CFG_RELEASE_NUM)
}
fn llvm_tools_vers(&self) -> String {
@ -1057,7 +1048,7 @@ impl Build {
}
fn lldb_package_vers(&self) -> String {
self.package_vers(&self.rust_version())
self.package_vers(channel::CFG_RELEASE_NUM)
}
fn lldb_vers(&self) -> String {

View File

@ -4,6 +4,7 @@ use std::path::PathBuf;
use std::collections::HashSet;
use build_helper::output;
use serde::Deserialize;
use serde_json;
use crate::{Build, Crate};

View File

@ -14,7 +14,7 @@ use std::fs::{self, File};
use std::path::{Path, PathBuf};
use std::process::Command;
use build_helper::output;
use build_helper::{output, t};
use cmake;
use cc;
@ -156,8 +156,10 @@ impl Step for Llvm {
.define("LLVM_DEFAULT_TARGET_TRIPLE", target);
if builder.config.llvm_thin_lto && !emscripten {
cfg.define("LLVM_ENABLE_LTO", "Thin")
.define("LLVM_ENABLE_LLD", "ON");
cfg.define("LLVM_ENABLE_LTO", "Thin");
if !target.contains("apple") {
cfg.define("LLVM_ENABLE_LLD", "ON");
}
}
// By default, LLVM will automatically find OCaml and, if it finds it,
@ -315,6 +317,10 @@ fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) {
fn configure_cmake(builder: &Builder<'_>,
target: Interned<String>,
cfg: &mut cmake::Config) {
// Do not print installation messages for up-to-date files.
// LLVM and LLD builds can produce a lot of those and hit CI limits on log size.
cfg.define("CMAKE_INSTALL_MESSAGE", "LAZY");
if builder.config.ninja {
cfg.generator("Ninja");
}
@ -434,7 +440,7 @@ fn configure_cmake(builder: &Builder<'_>,
}
if env::var_os("SCCACHE_ERROR_LOG").is_some() {
cfg.env("RUST_LOG", "sccache=warn");
cfg.env("RUSTC_LOG", "sccache=warn");
}
}

View File

@ -15,7 +15,7 @@ use std::fs;
use std::path::PathBuf;
use std::process::Command;
use build_helper::output;
use build_helper::{output, t};
use crate::Build;
@ -131,6 +131,11 @@ pub fn check(build: &mut Build) {
continue;
}
// We don't use a C compiler on wasm32
if target.contains("wasm32") {
continue;
}
if !build.config.dry_run {
cmd_finder.must_have(build.cc(*target));
if let Some(ar) = build.ar(*target) {

View File

@ -11,7 +11,7 @@ use std::iter;
use std::path::{Path, PathBuf};
use std::process::Command;
use build_helper::{self, output};
use build_helper::{self, output, t};
use crate::builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
use crate::cache::{Interned, INTERNER};
@ -683,7 +683,7 @@ impl Step for RustdocUi {
target: self.target,
mode: "ui",
suite: "rustdoc-ui",
path: None,
path: Some("src/test/rustdoc-ui"),
compare_mode: None,
})
}
@ -1016,7 +1016,10 @@ impl Step for Compiletest {
// Also provide `rust_test_helpers` for the host.
builder.ensure(native::TestHelpers { target: compiler.host });
builder.ensure(native::TestHelpers { target });
// wasm32 can't build the test helpers
if !target.contains("wasm32") {
builder.ensure(native::TestHelpers { target });
}
builder.ensure(RemoteCopyLibs { compiler, target });
let mut cmd = builder.tool_cmd(Tool::Compiletest);
@ -1181,8 +1184,19 @@ impl Step for Compiletest {
Err(_) => p,
}
})
.filter(|p| p.starts_with(suite_path) && p.is_file())
.map(|p| p.strip_prefix(suite_path).unwrap().to_str().unwrap())
.filter(|p| p.starts_with(suite_path) && (p.is_dir() || p.is_file()))
.filter_map(|p| {
// Since test suite paths are themselves directories, if we don't
// specify a directory or file, we'll get an empty string here
// (the result of the test suite directory without its suite prefix).
// Therefore, we need to filter these out, as only the first --test-args
// flag is respected, so providing an empty --test-args conflicts with
// any following it.
match p.strip_prefix(suite_path).ok().and_then(|p| p.to_str()) {
Some(s) if s != "" => Some(s),
_ => None,
}
})
.collect();
test_args.append(&mut builder.config.cmd.test_args());
@ -1228,6 +1242,28 @@ impl Step for Compiletest {
if let Some(ar) = builder.ar(target) {
cmd.arg("--ar").arg(ar);
}
// The llvm/bin directory contains many useful cross-platform
// tools. Pass the path to run-make tests so they can use them.
let llvm_bin_path = llvm_config.parent()
.expect("Expected llvm-config to be contained in directory");
assert!(llvm_bin_path.is_dir());
cmd.arg("--llvm-bin-dir").arg(llvm_bin_path);
// If LLD is available, add it to the PATH
if builder.config.lld_enabled {
let lld_install_root = builder.ensure(native::Lld {
target: builder.config.build,
});
let lld_bin_path = lld_install_root.join("bin");
let old_path = env::var_os("PATH").unwrap_or_default();
let new_path = env::join_paths(std::iter::once(lld_bin_path)
.chain(env::split_paths(&old_path)))
.expect("Could not add LLD bin path to PATH");
cmd.env("PATH", new_path);
}
}
}
@ -1265,11 +1301,11 @@ impl Step for Compiletest {
builder.add_rust_test_threads(&mut cmd);
if builder.config.sanitizers {
cmd.env("SANITIZER_SUPPORT", "1");
cmd.env("RUSTC_SANITIZER_SUPPORT", "1");
}
if builder.config.profiler {
cmd.env("PROFILER_SUPPORT", "1");
cmd.env("RUSTC_PROFILER_SUPPORT", "1");
}
cmd.env("RUST_TEST_TMPDIR", builder.out.join("tmp"));
@ -1845,6 +1881,10 @@ impl Step for CrateRustdoc {
cargo.arg("--");
cargo.args(&builder.config.cmd.test_args());
if self.host.contains("musl") {
cargo.arg("'-Ctarget-feature=-crt-static'");
}
if !builder.config.verbose_tests {
cargo.arg("--quiet");
}

View File

@ -4,12 +4,13 @@ use std::path::PathBuf;
use std::process::{Command, exit};
use std::collections::HashSet;
use build_helper::t;
use crate::Mode;
use crate::Compiler;
use crate::builder::{Step, RunConfig, ShouldRun, Builder};
use crate::util::{exe, add_lib_path};
use crate::compile;
use crate::native;
use crate::channel::GitInfo;
use crate::channel;
use crate::cache::Interned;
@ -698,56 +699,6 @@ impl<'a> Builder<'a> {
}
}
// Add the llvm/bin directory to PATH since it contains lots of
// useful, platform-independent tools
if tool.uses_llvm_tools() && !self.config.dry_run {
let mut additional_paths = vec![];
if let Some(llvm_bin_path) = self.llvm_bin_path() {
additional_paths.push(llvm_bin_path);
}
// If LLD is available, add that too.
if self.config.lld_enabled {
let lld_install_root = self.ensure(native::Lld {
target: self.config.build,
});
let lld_bin_path = lld_install_root.join("bin");
additional_paths.push(lld_bin_path);
}
if host.contains("windows") {
// On Windows, PATH and the dynamic library path are the same,
// so we just add the LLVM bin path to lib_path
lib_paths.extend(additional_paths);
} else {
let old_path = env::var_os("PATH").unwrap_or_default();
let new_path = env::join_paths(additional_paths.into_iter()
.chain(env::split_paths(&old_path)))
.expect("Could not add LLVM bin path to PATH");
cmd.env("PATH", new_path);
}
}
add_lib_path(lib_paths, cmd);
}
fn llvm_bin_path(&self) -> Option<PathBuf> {
if self.config.llvm_enabled() {
let llvm_config = self.ensure(native::Llvm {
target: self.config.build,
emscripten: false,
});
// Add the llvm/bin directory to PATH since it contains lots of
// useful, platform-independent tools
let llvm_bin_path = llvm_config.parent()
.expect("Expected llvm-config to be contained in directory");
assert!(llvm_bin_path.is_dir());
Some(llvm_bin_path.to_path_buf())
} else {
None
}
}
}

View File

@ -1,3 +1,5 @@
use serde::{Deserialize, Serialize};
#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")]
/// Whether a tool can be compiled, tested or neither

View File

@ -11,6 +11,8 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use std::time::{SystemTime, Instant};
use build_helper::t;
use crate::config::Config;
use crate::builder::Builder;

View File

@ -113,7 +113,7 @@ pub fn gnu_target(target: &str) -> &str {
}
pub fn make(host: &str) -> PathBuf {
if host.contains("bitrig") || host.contains("dragonfly") || host.contains("freebsd")
if host.contains("dragonfly") || host.contains("freebsd")
|| host.contains("netbsd") || host.contains("openbsd")
{
PathBuf::from("gmake")

View File

@ -7,23 +7,21 @@ COPY scripts/android-ndk.sh /scripts/
RUN . /scripts/android-ndk.sh && \
download_and_make_toolchain android-ndk-r15c-linux-x86_64.zip arm 14
# Note:
# Do not upgrade to `openjdk-9-jre-headless`, as it will cause certificate error
# when installing the Android SDK (see PR #45193). This is unfortunate, but
# every search result suggested either disabling HTTPS or replacing JDK 9 by
# JDK 8 as the solution (e.g. https://stackoverflow.com/q/41421340). :|
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y --no-install-recommends \
libgl1-mesa-glx \
libpulse0 \
libstdc++6:i386 \
openjdk-8-jre-headless \
tzdata
openjdk-9-jre-headless \
tzdata \
wget \
python3
COPY scripts/android-sdk.sh /scripts/
RUN . /scripts/android-sdk.sh && \
download_and_create_avd 4333796 armeabi-v7a 18 5264690
COPY scripts/android-sdk-manager.py /scripts/
COPY arm-android/android-sdk.lock /android/sdk/android-sdk.lock
RUN /scripts/android-sdk.sh
ENV PATH=$PATH:/android/sdk/emulator
ENV PATH=$PATH:/android/sdk/tools

View File

@ -0,0 +1,6 @@
emulator emulator-linux-5264690.zip 48c1cda2bdf3095d9d9d5c010fbfb3d6d673e3ea
patcher;v4 3534162-studio.sdk-patcher.zip 046699c5e2716ae11d77e0bad814f7f33fab261e
platform-tools platform-tools_r28.0.2-linux.zip 46a4c02a9b8e4e2121eddf6025da3c979bf02e28
platforms;android-18 android-18_r03.zip e6b09b3505754cbbeb4a5622008b907262ee91cb
system-images;android-18;default;armeabi-v7a sys-img/android/armeabi-v7a-18_r05.zip 580b583720f7de671040d5917c8c9db0c7aa03fd
tools sdk-tools-linux-4333796.zip 8c7c28554a32318461802c1291d76fccfafde054

View File

@ -32,5 +32,8 @@ ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-gcc \
ENV HOSTS=aarch64-unknown-linux-gnu
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
ENV RUST_CONFIGURE_ARGS \
--enable-extended \
--enable-profiler \
--disable-docs
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

View File

@ -1,5 +1,4 @@
#!/usr/bin/env bash
# ignore-tidy-linelength
set -ex

View File

@ -1,9 +1,12 @@
FROM ubuntu:17.10
FROM ubuntu:18.04
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh
RUN apt-get build-dep -y clang llvm && apt-get install -y --no-install-recommends \
# Enable source repositories, which are disabled by default on Ubuntu >= 18.04
RUN sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list
RUN apt-get update && apt-get build-dep -y clang llvm && apt-get install -y --no-install-recommends \
build-essential \
gcc-multilib \
libedit-dev \
@ -15,10 +18,13 @@ RUN apt-get build-dep -y clang llvm && apt-get install -y --no-install-recommend
nodejs \
python2.7-dev \
software-properties-common \
unzip
unzip \
# Needed for apt-key to work:
dirmngr \
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/
@ -69,7 +75,7 @@ ENV TARGETS=x86_64-fuchsia
ENV TARGETS=$TARGETS,aarch64-fuchsia
ENV TARGETS=$TARGETS,sparcv9-sun-solaris
ENV TARGETS=$TARGETS,wasm32-unknown-unknown
ENV TARGETS=$TARGETS,wasm32-unknown-wasi
ENV TARGETS=$TARGETS,wasm32-wasi
ENV TARGETS=$TARGETS,x86_64-sun-solaris
ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32
ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi
@ -79,5 +85,5 @@ ENV TARGETS=$TARGETS,nvptx64-nvidia-cuda
ENV X86_FORTANIX_SGX_LIBS="/x86_64-fortanix-unknown-sgx/lib/"
ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --disable-docs \
--set target.wasm32-unknown-wasi.wasi-root=/wasm32-unknown-wasi
--set target.wasm32-wasi.wasi-root=/wasm32-wasi
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS

View File

@ -1,7 +1,5 @@
#!/usr/bin/env bash
# ignore-tidy-linelength
set -ex
source shared.sh
@ -12,7 +10,7 @@ pushd zircon > /dev/null
# Download sources
git init
git remote add origin https://fuchsia.googlesource.com/zircon
git remote add origin https://github.com/rust-lang-nursery/mirror-google-fuchsia-zircon
git fetch --depth=1 origin $ZIRCON
git reset --hard FETCH_HEAD

View File

@ -13,7 +13,7 @@ git clone https://github.com/CraneStation/wasi-sysroot
cd wasi-sysroot
git reset --hard e5f14be38362f1ab83302895a6e74b2ffd0e2302
make -j$(nproc) INSTALL_DIR=/wasm32-unknown-wasi install
make -j$(nproc) INSTALL_DIR=/wasm32-wasi install
cd ..
rm -rf reference-sysroot-wasi

View File

@ -32,6 +32,7 @@ hide_output ../gcc-$GCC/configure \
--enable-languages=c,c++
hide_output make -j10
hide_output make install
ln -s gcc /rustroot/bin/cc
cd ..
rm -rf gcc-build

View File

@ -23,15 +23,19 @@ COPY scripts/musl-toolchain.sh /build/
# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
RUN CFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
CXXFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
bash musl-toolchain.sh x86_64 && rm -rf build
REPLACE_CC=1 bash musl-toolchain.sh x86_64 && rm -rf build
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
ENV HOSTS=x86_64-unknown-linux-musl
ENV RUST_CONFIGURE_ARGS \
--musl-root-x86_64=/usr/local/x86_64-linux-musl \
--enable-extended \
--disable-docs
--disable-docs \
--set target.x86_64-unknown-linux-musl.crt-static=false \
--build $HOSTS
# Newer binutils broke things on some vms/distros (i.e., linking against
# unknown relocs disabled by the following flag), so we need to go out of our
@ -42,12 +46,5 @@ ENV RUST_CONFIGURE_ARGS \
ENV CFLAGS_x86_64_unknown_linux_musl="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none \
-Wl,--compress-debug-sections=none"
ENV HOSTS=x86_64-unknown-linux-musl \
CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \
CXX_x86_64_unknown_linux_musl=x86_64-linux-musl-g++
# Musl defaults to static libs but we need them to be dynamic for host toolchain.
# The toolchain will produce static libs by default.
ENV RUSTFLAGS="-C target-feature=-crt-static"
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
# To run native tests replace `dist` below with `test`
ENV SCRIPT python2.7 ../x.py dist --build $HOSTS

View File

@ -0,0 +1,190 @@
#!/usr/bin/env python3
# Simpler reimplementation of Android's sdkmanager
# Extra features of this implementation are pinning and mirroring
# These URLs are the Google repositories containing the list of available
# packages and their versions. The list has been generated by listing the URLs
# fetched while executing `tools/bin/sdkmanager --list`
BASE_REPOSITORY = "https://dl.google.com/android/repository/"
REPOSITORIES = [
"sys-img/android/sys-img2-1.xml",
"sys-img/android-wear/sys-img2-1.xml",
"sys-img/android-wear-cn/sys-img2-1.xml",
"sys-img/android-tv/sys-img2-1.xml",
"sys-img/google_apis/sys-img2-1.xml",
"sys-img/google_apis_playstore/sys-img2-1.xml",
"addon2-1.xml",
"glass/addon2-1.xml",
"extras/intel/addon2-1.xml",
"repository2-1.xml",
]
# Available hosts: linux, macosx and windows
HOST_OS = "linux"
# Mirroring options
MIRROR_BUCKET = "rust-lang-ci2"
MIRROR_BASE_DIR = "rust-ci-mirror/android/"
import argparse
import hashlib
import os
import subprocess
import sys
import tempfile
import urllib.request
import xml.etree.ElementTree as ET
class Package:
def __init__(self, path, url, sha1, deps=None):
if deps is None:
deps = []
self.path = path.strip()
self.url = url.strip()
self.sha1 = sha1.strip()
self.deps = deps
def download(self, base_url):
_, file = tempfile.mkstemp()
url = base_url + self.url
subprocess.run(["curl", "-o", file, url], check=True)
# Ensure there are no hash mismatches
with open(file, "rb") as f:
sha1 = hashlib.sha1(f.read()).hexdigest()
if sha1 != self.sha1:
raise RuntimeError(
"hash mismatch for package " + self.path + ": " +
sha1 + " vs " + self.sha1 + " (known good)"
)
return file
def __repr__(self):
return "<Package "+self.path+" at "+self.url+" (sha1="+self.sha1+")"
def fetch_url(url):
page = urllib.request.urlopen(url)
return page.read()
def fetch_repository(base, repo_url):
packages = {}
root = ET.fromstring(fetch_url(base + repo_url))
for package in root:
if package.tag != "remotePackage":
continue
path = package.attrib["path"]
for archive in package.find("archives"):
host_os = archive.find("host-os")
if host_os is not None and host_os.text != HOST_OS:
continue
complete = archive.find("complete")
url = os.path.join(os.path.dirname(repo_url), complete.find("url").text)
sha1 = complete.find("checksum").text
deps = []
dependencies = package.find("dependencies")
if dependencies is not None:
for dep in dependencies:
deps.append(dep.attrib["path"])
packages[path] = Package(path, url, sha1, deps)
break
return packages
def fetch_repositories():
packages = {}
for repo in REPOSITORIES:
packages.update(fetch_repository(BASE_REPOSITORY, repo))
return packages
class Lockfile:
def __init__(self, path):
self.path = path
self.packages = {}
if os.path.exists(path):
with open(path) as f:
for line in f:
path, url, sha1 = line.split(" ")
self.packages[path] = Package(path, url, sha1)
def add(self, packages, name, *, update=True):
if name not in packages:
raise NameError("package not found: " + name)
if not update and name in self.packages:
return
self.packages[name] = packages[name]
for dep in packages[name].deps:
self.add(packages, dep, update=False)
def save(self):
packages = list(sorted(self.packages.values(), key=lambda p: p.path))
with open(self.path, "w") as f:
for package in packages:
f.write(package.path + " " + package.url + " " + package.sha1 + "\n")
def cli_add_to_lockfile(args):
lockfile = Lockfile(args.lockfile)
packages = fetch_repositories()
for package in args.packages:
lockfile.add(packages, package)
lockfile.save()
def cli_update_mirror(args):
lockfile = Lockfile(args.lockfile)
for package in lockfile.packages.values():
path = package.download(BASE_REPOSITORY)
subprocess.run([
"aws", "s3", "mv", path,
"s3://" + MIRROR_BUCKET + "/" + MIRROR_BASE_DIR + package.url,
"--profile=" + args.awscli_profile,
], check=True)
def cli_install(args):
lockfile = Lockfile(args.lockfile)
for package in lockfile.packages.values():
# Download the file from the mirror into a temp file
url = "https://" + MIRROR_BUCKET + ".s3.amazonaws.com/" + MIRROR_BASE_DIR
downloaded = package.download(url)
# Extract the file in a temporary directory
extract_dir = tempfile.mkdtemp()
subprocess.run([
"unzip", "-q", downloaded, "-d", extract_dir,
], check=True)
# Figure out the prefix used in the zip
subdirs = [d for d in os.listdir(extract_dir) if not d.startswith(".")]
if len(subdirs) != 1:
raise RuntimeError("extracted directory contains more than one dir")
# Move the extracted files in the proper directory
dest = os.path.join(args.dest, package.path.replace(";", "/"))
os.makedirs("/".join(dest.split("/")[:-1]), exist_ok=True)
os.rename(os.path.join(extract_dir, subdirs[0]), dest)
os.unlink(downloaded)
def cli():
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()
add_to_lockfile = subparsers.add_parser("add-to-lockfile")
add_to_lockfile.add_argument("lockfile")
add_to_lockfile.add_argument("packages", nargs="+")
add_to_lockfile.set_defaults(func=cli_add_to_lockfile)
update_mirror = subparsers.add_parser("update-mirror")
update_mirror.add_argument("lockfile")
update_mirror.add_argument("--awscli-profile", default="default")
update_mirror.set_defaults(func=cli_update_mirror)
install = subparsers.add_parser("install")
install.add_argument("lockfile")
install.add_argument("dest")
install.set_defaults(func=cli_install)
args = parser.parse_args()
if not hasattr(args, "func"):
print("error: a subcommand is required (see --help)")
exit(1)
args.func(args)
if __name__ == "__main__":
cli()

81
src/ci/docker/scripts/android-sdk.sh Normal file → Executable file
View File

@ -2,66 +2,27 @@ set -ex
export ANDROID_HOME=/android/sdk
PATH=$PATH:"${ANDROID_HOME}/tools/bin"
LOCKFILE="${ANDROID_HOME}/android-sdk.lock"
download_sdk() {
mkdir -p /android
curl -fo sdk.zip "https://dl.google.com/android/repository/sdk-tools-linux-$1.zip"
unzip -q sdk.zip -d "$ANDROID_HOME"
rm -f sdk.zip
}
download_sysimage() {
abi=$1
api=$2
# See https://developer.android.com/studio/command-line/sdkmanager.html for
# usage of `sdkmanager`.
#
# The output from sdkmanager is so noisy that it will occupy all of the 4 MB
# log extremely quickly. Thus we must silence all output.
yes | sdkmanager --licenses > /dev/null
yes | sdkmanager platform-tools \
"platforms;android-$api" \
"system-images;android-$api;default;$abi" > /dev/null
}
download_emulator() {
# Download a pinned version of the emulator since upgrades can cause issues
curl -fo emulator.zip "https://dl.google.com/android/repository/emulator-linux-$1.zip"
rm -rf "${ANDROID_HOME}/emulator"
unzip -q emulator.zip -d "${ANDROID_HOME}"
rm -f emulator.zip
}
create_avd() {
abi=$1
api=$2
# See https://developer.android.com/studio/command-line/avdmanager.html for
# usage of `avdmanager`.
echo no | avdmanager create avd \
-n "$abi-$api" \
-k "system-images;android-$api;default;$abi"
}
download_and_create_avd() {
download_sdk $1
download_sysimage $2 $3
create_avd $2 $3
download_emulator $4
}
# Usage:
# To add a new packages to the SDK or to update an existing one you need to
# run the command:
#
# download_and_create_avd 4333796 armeabi-v7a 18 5264690
# android-sdk-manager.py add-to-lockfile $LOCKFILE <package-name>
#
# 4333796 =>
# SDK tool version.
# Copy from https://developer.android.com/studio/index.html#command-tools
# armeabi-v7a =>
# System image ABI
# 18 =>
# Android API Level (18 = Android 4.3 = Jelly Bean MR2)
# 5264690 =>
# Android Emulator version.
# Copy from the "build_id" in the `/android/sdk/emulator/emulator -version` output
# Then, after every lockfile update the mirror has to be synchronized as well:
#
# android-sdk-manager.py update-mirror $LOCKFILE
#
/scripts/android-sdk-manager.py install "${LOCKFILE}" "${ANDROID_HOME}"
details=$(cat "${LOCKFILE}" \
| grep system-images \
| sed 's/^system-images;android-\([0-9]\+\);default;\([a-z0-9-]\+\) /\1 \2 /g')
api="$(echo "${details}" | awk '{print($1)}')"
abi="$(echo "${details}" | awk '{print($2)}')"
# See https://developer.android.com/studio/command-line/avdmanager.html for
# usage of `avdmanager`.
echo no | avdmanager create avd \
-n "$abi-$api" \
-k "system-images;android-$api;default;$abi"

View File

@ -45,6 +45,15 @@ cd -
ln -s $OUTPUT/$TARGET/lib/libc.so /lib/ld-musl-$ARCH.so.1
echo $OUTPUT/$TARGET/lib >> /etc/ld-musl-$ARCH.path
# Now when musl bootstraps itself create proper toolchain symlinks to make build and tests easier
if [ "$REPLACE_CC" = "1" ]; then
for exec in cc gcc; do
ln -s $TARGET-gcc /usr/local/bin/$exec
done
for exec in cpp c++ g++; do
ln -s $TARGET-g++ /usr/local/bin/$exec
done
fi
export CC=$TARGET-gcc
export CXX=$TARGET-g++
@ -71,4 +80,3 @@ cmake ../libunwind-release_$LLVM \
hide_output make -j$(nproc)
cp lib/libunwind.a $OUTPUT/$TARGET/lib
cd - && rm -rf libunwind-build

View File

@ -1,5 +1,3 @@
# ignore-tidy-linelength
set -ex
curl -fo /usr/local/bin/sccache \

View File

@ -1,4 +1,4 @@
FROM ubuntu:18.10
FROM ubuntu:19.04
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \

View File

@ -1,4 +1,4 @@
FROM ubuntu:18.10
FROM ubuntu:19.04
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \

View File

@ -13,6 +13,6 @@ addons:
- aspell
- aspell-en
before_script:
- (cargo install mdbook --vers 0.1.7 --force || true)
- (cargo install mdbook --vers 0.2.3 --force || true)
script:
- bash ci/build.sh

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../appendix-00.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../appendix-01-keywords.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../appendix-02-operators.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../appendix-03-derivable-traits.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../appendix-04-useful-development-tools.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../appendix-05-editions.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../appendix-06-translation.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../appendix-07-nightly-rust.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch00-00-introduction.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch01-00-getting-started.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch01-01-installation.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch01-02-hello-world.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch01-03-hello-cargo.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch02-00-guessing-game-tutorial.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch03-00-common-programming-concepts.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch03-01-variables-and-mutability.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch03-02-data-types.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch03-03-how-functions-work.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch03-04-comments.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch03-05-control-flow.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch04-00-understanding-ownership.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch04-01-what-is-ownership.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch04-02-references-and-borrowing.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch04-03-slices.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch05-00-structs.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch05-01-defining-structs.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch05-02-example-structs.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch05-03-method-syntax.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch06-00-enums.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch06-01-defining-an-enum.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch06-02-match.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch06-03-if-let.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch08-00-common-collections.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch08-01-vectors.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch08-02-strings.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch08-03-hash-maps.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch09-00-error-handling.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch09-01-unrecoverable-errors-with-panic.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch09-02-recoverable-errors-with-result.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch09-03-to-panic-or-not-to-panic.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch10-00-generics.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch10-01-syntax.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch10-02-traits.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch10-03-lifetime-syntax.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch11-00-testing.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch11-01-writing-tests.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch11-02-running-tests.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch11-03-test-organization.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch12-00-an-io-project.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch12-01-accepting-command-line-arguments.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch12-02-reading-a-file.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch12-03-improving-error-handling-and-modularity.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch12-04-testing-the-librarys-functionality.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch12-05-working-with-environment-variables.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch12-06-writing-to-stderr-instead-of-stdout.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch13-00-functional-features.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

View File

@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../index.html) instead.
version of the book](../ch13-01-closures.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust

Some files were not shown because too many files have changed in this diff Show More