mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Auto merge of #43320 - alexcrichton:new-bootstrap, r=Mark-Simulacrum
Bump master to 1.21.0 This commit bumps the master branch's version to 1.21.0 and also updates the bootstrap compiler from the freshly minted beta release.
This commit is contained in:
commit
c417ee9ae8
143
src/Cargo.lock
generated
143
src/Cargo.lock
generated
@ -75,7 +75,7 @@ version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -88,7 +88,7 @@ dependencies = [
|
||||
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -99,7 +99,7 @@ version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -135,7 +135,7 @@ dependencies = [
|
||||
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -170,13 +170,19 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cargo"
|
||||
version = "0.21.0"
|
||||
version = "0.22.0"
|
||||
source = "git+https://github.com/rust-lang/cargo#88aa6423a164774d09abc78a24e74e8e665f651b"
|
||||
replace = "cargo 0.22.0"
|
||||
|
||||
[[package]]
|
||||
name = "cargo"
|
||||
version = "0.22.0"
|
||||
dependencies = [
|
||||
"advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cargotest 0.1.0",
|
||||
"crates-io 0.10.0",
|
||||
"crates-io 0.11.0",
|
||||
"crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -190,56 +196,11 @@ dependencies = [
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ignore 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"semver 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_ignored 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"shell-escape 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tar 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"termcolor 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"toml 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cargo"
|
||||
version = "0.22.0"
|
||||
source = "git+https://github.com/rust-lang/cargo#47783c151dcfcd3b835cd2012bfc2810c0f8d017"
|
||||
dependencies = [
|
||||
"advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crates-io 0.11.0 (git+https://github.com/rust-lang/cargo)",
|
||||
"crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"home 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ignore 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -266,14 +227,14 @@ name = "cargotest"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cargo 0.21.0",
|
||||
"cargo 0.22.0",
|
||||
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -341,7 +302,7 @@ dependencies = [
|
||||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -357,22 +318,9 @@ dependencies = [
|
||||
"rand 0.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crates-io"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crates-io"
|
||||
version = "0.11.0"
|
||||
source = "git+https://github.com/rust-lang/cargo#47783c151dcfcd3b835cd2012bfc2810c0f8d017"
|
||||
dependencies = [
|
||||
"curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -393,7 +341,7 @@ version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"socket2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -406,7 +354,7 @@ version = "0.3.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -497,7 +445,7 @@ name = "filetime"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -513,7 +461,7 @@ name = "flate2"
|
||||
version = "0.2.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -537,7 +485,7 @@ version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -562,7 +510,7 @@ version = "0.6.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -703,7 +651,7 @@ name = "jobserver"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -755,7 +703,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.26"
|
||||
version = "0.2.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@ -766,7 +714,7 @@ dependencies = [
|
||||
"cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -779,7 +727,7 @@ version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -791,7 +739,7 @@ version = "1.0.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -812,7 +760,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -842,7 +790,7 @@ name = "memchr"
|
||||
version = "0.1.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -850,7 +798,7 @@ name = "memchr"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -859,7 +807,7 @@ version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -884,7 +832,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -960,7 +908,7 @@ name = "num_cpus"
|
||||
version = "1.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -976,7 +924,7 @@ dependencies = [
|
||||
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -991,7 +939,7 @@ version = "0.9.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -1113,7 +1061,7 @@ name = "rand"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1641,7 +1589,7 @@ dependencies = [
|
||||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1746,7 +1694,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -1865,7 +1813,7 @@ name = "syntex_errors"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syntex_pos 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1887,7 +1835,7 @@ version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syntex_errors 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1902,7 +1850,7 @@ version = "0.4.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -1933,7 +1881,7 @@ version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -1968,7 +1916,7 @@ version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2157,7 +2105,7 @@ name = "xattr"
|
||||
version = "0.1.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2189,7 +2137,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
|
||||
"checksum clap 2.25.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7f1aabf260a8f3fefa8871f16b531038c98dd9eab1cfa2c575e78c459abfa3a0"
|
||||
"checksum cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b8ebbb35d3dc9cd09497168f33de1acb79b265d350ab0ac34133b98f8509af1f"
|
||||
"checksum crates-io 0.11.0 (git+https://github.com/rust-lang/cargo)" = "<none>"
|
||||
"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"
|
||||
"checksum curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7034c534a1d7d22f7971d6088aa9d281d219ef724026c3428092500f41ae9c2c"
|
||||
"checksum curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d5481162dc4f424d088581db2f979fa7d4c238fe9794595de61d8d7522e277de"
|
||||
@ -2226,7 +2173,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
||||
"checksum languageserver-types 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d52e477b23bf52cd3ca0f9fc6c5d14be954eec97e3b9cdfbd962d911bd533caf"
|
||||
"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"
|
||||
"checksum libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)" = "30885bcb161cf67054244d10d4a7f4835ffd58773bc72e07d35fecf472295503"
|
||||
"checksum libc 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)" = "719aa0af4c241fa71d396ffdfe584aa758f08f35b4680ec3f03ecc2c3fe69b76"
|
||||
"checksum libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "df18a822100352d9863b302faf6f8f25c0e77f0e60feb40e5dbe1238b7f13b1d"
|
||||
"checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75"
|
||||
"checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
|
||||
|
@ -51,4 +51,4 @@ debug = false
|
||||
debug-assertions = false
|
||||
|
||||
[replace]
|
||||
"https://github.com/rust-lang/cargo#0.21.0" = { path = "tools/cargo" }
|
||||
"https://github.com/rust-lang/cargo#0.22.0" = { path = "tools/cargo" }
|
||||
|
@ -23,7 +23,7 @@ use build_helper::output;
|
||||
use Build;
|
||||
|
||||
// The version number
|
||||
pub const CFG_RELEASE_NUM: &str = "1.20.0";
|
||||
pub const CFG_RELEASE_NUM: &str = "1.21.0";
|
||||
|
||||
// An optional number to put after the label, e.g. '.2' -> '-beta.2'
|
||||
// Be sure to make this starts with a dot to conform to semver pre-release
|
||||
|
@ -25,15 +25,14 @@ use std::io::Read;
|
||||
|
||||
use build_helper::{self, output};
|
||||
|
||||
use {Build, Mode};
|
||||
use dist;
|
||||
use util::{self, dylib_path, dylib_path_var};
|
||||
|
||||
use compile;
|
||||
use native;
|
||||
use builder::{Kind, RunConfig, ShouldRun, Builder, Compiler, Step};
|
||||
use tool::{self, Tool};
|
||||
use cache::{INTERNER, Interned};
|
||||
use compile;
|
||||
use dist;
|
||||
use native;
|
||||
use tool::{self, Tool};
|
||||
use util::{self, dylib_path, dylib_path_var};
|
||||
use {Build, Mode};
|
||||
|
||||
const ADB_TEST_DIR: &str = "/data/tmp/work";
|
||||
|
||||
@ -963,25 +962,6 @@ impl Step for Crate {
|
||||
|
||||
builder.ensure(compile::Test { compiler, target });
|
||||
builder.ensure(RemoteCopyLibs { compiler, target });
|
||||
let (name, path, features, root) = match mode {
|
||||
Mode::Libstd => {
|
||||
("libstd", "src/libstd", build.std_features(), "std")
|
||||
}
|
||||
Mode::Libtest => {
|
||||
("libtest", "src/libtest", String::new(), "test")
|
||||
}
|
||||
Mode::Librustc => {
|
||||
builder.ensure(compile::Rustc { compiler, target });
|
||||
("librustc", "src/rustc", build.rustc_features(), "rustc-main")
|
||||
}
|
||||
_ => panic!("can only test libraries"),
|
||||
};
|
||||
let root = INTERNER.intern_string(String::from(root));
|
||||
let _folder = build.fold_output(|| {
|
||||
format!("{}_stage{}-{}", test_kind.subcommand(), compiler.stage, name)
|
||||
});
|
||||
println!("{} {} stage{} ({} -> {})", test_kind, name, compiler.stage,
|
||||
&compiler.host, target);
|
||||
|
||||
// If we're not doing a full bootstrap but we're testing a stage2 version of
|
||||
// libstd, then what we're actually testing is the libstd produced in
|
||||
@ -993,15 +973,35 @@ impl Step for Crate {
|
||||
compiler.clone()
|
||||
};
|
||||
|
||||
let mut cargo = builder.cargo(compiler, mode, target, test_kind.subcommand());
|
||||
let (name, root) = match mode {
|
||||
Mode::Libstd => {
|
||||
compile::std_cargo(build, &compiler, target, &mut cargo);
|
||||
("libstd", "std")
|
||||
}
|
||||
Mode::Libtest => {
|
||||
compile::test_cargo(build, &compiler, target, &mut cargo);
|
||||
("libtest", "test")
|
||||
}
|
||||
Mode::Librustc => {
|
||||
builder.ensure(compile::Rustc { compiler, target });
|
||||
compile::rustc_cargo(build, &compiler, target, &mut cargo);
|
||||
("librustc", "rustc-main")
|
||||
}
|
||||
_ => panic!("can only test libraries"),
|
||||
};
|
||||
let root = INTERNER.intern_string(String::from(root));
|
||||
let _folder = build.fold_output(|| {
|
||||
format!("{}_stage{}-{}", test_kind.subcommand(), compiler.stage, name)
|
||||
});
|
||||
println!("{} {} stage{} ({} -> {})", test_kind, name, compiler.stage,
|
||||
&compiler.host, target);
|
||||
|
||||
// Build up the base `cargo test` command.
|
||||
//
|
||||
// Pass in some standard flags then iterate over the graph we've discovered
|
||||
// in `cargo metadata` with the maps above and figure out what `-p`
|
||||
// arguments need to get passed.
|
||||
let mut cargo = builder.cargo(compiler, mode, target, test_kind.subcommand());
|
||||
cargo.arg("--manifest-path")
|
||||
.arg(build.src.join(path).join("Cargo.toml"))
|
||||
.arg("--features").arg(features);
|
||||
if test_kind.subcommand() == "test" && !build.fail_fast {
|
||||
cargo.arg("--no-fail-fast");
|
||||
}
|
||||
@ -1014,16 +1014,18 @@ impl Step for Crate {
|
||||
let mut visited = HashSet::new();
|
||||
let mut next = vec![root];
|
||||
while let Some(name) = next.pop() {
|
||||
// Right now jemalloc is our only target-specific crate in the
|
||||
// sense that it's not present on all platforms. Custom skip it
|
||||
// here for now, but if we add more this probably wants to get
|
||||
// more generalized.
|
||||
// Right now jemalloc and the sanitizer crates are
|
||||
// target-specific crate in the sense that it's not present
|
||||
// on all platforms. Custom skip it here for now, but if we
|
||||
// add more this probably wants to get more generalized.
|
||||
//
|
||||
// Also skip `build_helper` as it's not compiled normally for
|
||||
// target during the bootstrap and it's just meant to be a
|
||||
// helper crate, not tested. If it leaks through then it ends up
|
||||
// messing with various mtime calculations and such.
|
||||
if !name.contains("jemalloc") && *name != *"build_helper" {
|
||||
// Also skip `build_helper` as it's not compiled normally
|
||||
// for target during the bootstrap and it's just meant to be
|
||||
// a helper crate, not tested. If it leaks through then it
|
||||
// ends up messing with various mtime calculations and such.
|
||||
if !name.contains("jemalloc") &&
|
||||
*name != *"build_helper" &&
|
||||
!(name.starts_with("rustc_") && name.ends_with("san")) {
|
||||
cargo.arg("-p").arg(&format!("{}:0.0.0", name));
|
||||
}
|
||||
for dep in build.crates[&name].deps.iter() {
|
||||
|
@ -91,6 +91,25 @@ impl Step for Std {
|
||||
let out_dir = build.cargo_out(compiler, Mode::Libstd, target);
|
||||
build.clear_if_dirty(&out_dir, &builder.rustc(compiler));
|
||||
let mut cargo = builder.cargo(compiler, Mode::Libstd, target, "build");
|
||||
std_cargo(build, &compiler, target, &mut cargo);
|
||||
run_cargo(build,
|
||||
&mut cargo,
|
||||
&libstd_stamp(build, compiler, target));
|
||||
|
||||
builder.ensure(StdLink {
|
||||
compiler: builder.compiler(compiler.stage, build.build),
|
||||
target_compiler: compiler,
|
||||
target: target,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// Configure cargo to compile the standard library, adding appropriate env vars
|
||||
/// and such.
|
||||
pub fn std_cargo(build: &Build,
|
||||
compiler: &Compiler,
|
||||
target: Interned<String>,
|
||||
cargo: &mut Command) {
|
||||
let mut features = build.std_features();
|
||||
|
||||
if let Some(target) = env::var_os("MACOSX_STD_DEPLOYMENT_TARGET") {
|
||||
@ -131,19 +150,7 @@ impl Step for Std {
|
||||
cargo.env("MUSL_ROOT", p);
|
||||
}
|
||||
}
|
||||
|
||||
run_cargo(build,
|
||||
&mut cargo,
|
||||
&libstd_stamp(build, compiler, target));
|
||||
|
||||
builder.ensure(StdLink {
|
||||
compiler: builder.compiler(compiler.stage, build.build),
|
||||
target_compiler: compiler,
|
||||
target: target,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
struct StdLink {
|
||||
@ -329,11 +336,7 @@ impl Step for Test {
|
||||
let out_dir = build.cargo_out(compiler, Mode::Libtest, target);
|
||||
build.clear_if_dirty(&out_dir, &libstd_stamp(build, compiler, target));
|
||||
let mut cargo = builder.cargo(compiler, Mode::Libtest, target, "build");
|
||||
if let Some(target) = env::var_os("MACOSX_STD_DEPLOYMENT_TARGET") {
|
||||
cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
|
||||
}
|
||||
cargo.arg("--manifest-path")
|
||||
.arg(build.src.join("src/libtest/Cargo.toml"));
|
||||
test_cargo(build, &compiler, target, &mut cargo);
|
||||
run_cargo(build,
|
||||
&mut cargo,
|
||||
&libtest_stamp(build, compiler, target));
|
||||
@ -346,6 +349,18 @@ impl Step for Test {
|
||||
}
|
||||
}
|
||||
|
||||
/// Same as `std_cargo`, but for libtest
|
||||
pub fn test_cargo(build: &Build,
|
||||
_compiler: &Compiler,
|
||||
_target: Interned<String>,
|
||||
cargo: &mut Command) {
|
||||
if let Some(target) = env::var_os("MACOSX_STD_DEPLOYMENT_TARGET") {
|
||||
cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
|
||||
}
|
||||
cargo.arg("--manifest-path")
|
||||
.arg(build.src.join("src/libtest/Cargo.toml"));
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct TestLink {
|
||||
pub compiler: Compiler,
|
||||
@ -443,6 +458,24 @@ impl Step for Rustc {
|
||||
build.clear_if_dirty(&out_dir, &libtest_stamp(build, compiler, target));
|
||||
|
||||
let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "build");
|
||||
rustc_cargo(build, &compiler, target, &mut cargo);
|
||||
run_cargo(build,
|
||||
&mut cargo,
|
||||
&librustc_stamp(build, compiler, target));
|
||||
|
||||
builder.ensure(RustcLink {
|
||||
compiler: builder.compiler(compiler.stage, build.build),
|
||||
target_compiler: compiler,
|
||||
target,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// Same as `std_cargo`, but for libtest
|
||||
pub fn rustc_cargo(build: &Build,
|
||||
compiler: &Compiler,
|
||||
target: Interned<String>,
|
||||
cargo: &mut Command) {
|
||||
cargo.arg("--features").arg(build.rustc_features())
|
||||
.arg("--manifest-path")
|
||||
.arg(build.src.join("src/rustc/Cargo.toml"));
|
||||
@ -504,16 +537,6 @@ impl Step for Rustc {
|
||||
if let Some(ref s) = build.config.rustc_default_ar {
|
||||
cargo.env("CFG_DEFAULT_AR", s);
|
||||
}
|
||||
run_cargo(build,
|
||||
&mut cargo,
|
||||
&librustc_stamp(build, compiler, target));
|
||||
|
||||
builder.ensure(RustcLink {
|
||||
compiler: builder.compiler(compiler.stage, build.build),
|
||||
target_compiler: compiler,
|
||||
target,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
|
@ -442,9 +442,7 @@ impl Step for Std {
|
||||
t!(symlink_dir_force(&my_out, &out_dir));
|
||||
|
||||
let mut cargo = builder.cargo(compiler, Mode::Libstd, target, "doc");
|
||||
cargo.arg("--manifest-path")
|
||||
.arg(build.src.join("src/libstd/Cargo.toml"))
|
||||
.arg("--features").arg(build.std_features());
|
||||
compile::std_cargo(build, &compiler, target, &mut cargo);
|
||||
|
||||
// We don't want to build docs for internal std dependencies unless
|
||||
// in compiler-docs mode. When not in that mode, we whitelist the crates
|
||||
@ -520,8 +518,7 @@ impl Step for Test {
|
||||
t!(symlink_dir_force(&my_out, &out_dir));
|
||||
|
||||
let mut cargo = builder.cargo(compiler, Mode::Libtest, target, "doc");
|
||||
cargo.arg("--manifest-path")
|
||||
.arg(build.src.join("src/libtest/Cargo.toml"));
|
||||
compile::test_cargo(build, &compiler, target, &mut cargo);
|
||||
build.run(&mut cargo);
|
||||
cp_r(&my_out, &out);
|
||||
}
|
||||
@ -582,9 +579,7 @@ impl Step for Rustc {
|
||||
t!(symlink_dir_force(&my_out, &out_dir));
|
||||
|
||||
let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "doc");
|
||||
cargo.arg("--manifest-path")
|
||||
.arg(build.src.join("src/rustc/Cargo.toml"))
|
||||
.arg("--features").arg(build.rustc_features());
|
||||
compile::rustc_cargo(build, &compiler, target, &mut cargo);
|
||||
|
||||
if build.config.compiler_docs {
|
||||
// src/rustc/Cargo.toml contains bin crates called rustc and rustdoc
|
||||
|
@ -263,7 +263,7 @@ impl Step for Cargo {
|
||||
stage: self.stage,
|
||||
target: self.target,
|
||||
tool: "cargo",
|
||||
mode: Mode::Libstd,
|
||||
mode: Mode::Librustc,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,6 @@
|
||||
#![cfg_attr(not(test), feature(slice_rotate))]
|
||||
#![cfg_attr(not(test), feature(str_checked_slicing))]
|
||||
#![cfg_attr(test, feature(rand, test))]
|
||||
#![cfg_attr(stage0, feature(allocator))]
|
||||
#![feature(allow_internal_unstable)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
@ -124,7 +123,7 @@
|
||||
#![feature(unicode)]
|
||||
#![feature(unique)]
|
||||
#![feature(unsize)]
|
||||
#![cfg_attr(not(stage0), feature(allocator_internals))]
|
||||
#![feature(allocator_internals)]
|
||||
|
||||
#![cfg_attr(not(test), feature(fused, fn_traits, placement_new_protocol))]
|
||||
#![cfg_attr(test, feature(test, box_heap))]
|
||||
|
@ -12,12 +12,10 @@ test = false
|
||||
doc = false
|
||||
|
||||
[dependencies]
|
||||
core = { path = "../libcore" }
|
||||
libc = { path = "../rustc/libc_shim" }
|
||||
|
||||
[target.'cfg(not(stage0))'.dependencies]
|
||||
alloc = { path = "../liballoc" }
|
||||
alloc_system = { path = "../liballoc_system" }
|
||||
core = { path = "../libcore" }
|
||||
libc = { path = "../rustc/libc_shim" }
|
||||
|
||||
[build-dependencies]
|
||||
build_helper = { path = "../build_helper" }
|
||||
|
@ -16,26 +16,21 @@
|
||||
form or name",
|
||||
issue = "27783")]
|
||||
#![deny(warnings)]
|
||||
#![feature(alloc)]
|
||||
#![feature(alloc_system)]
|
||||
#![feature(libc)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(linkage)]
|
||||
#![cfg_attr(stage0, allocator)]
|
||||
#![cfg_attr(stage0, feature(allocator))]
|
||||
#![cfg_attr(not(stage0), feature(global_allocator))]
|
||||
#![cfg_attr(all(not(stage0), not(dummy_jemalloc)), feature(allocator_api))]
|
||||
#![cfg_attr(not(stage0), feature(alloc))]
|
||||
#![cfg_attr(not(stage0), feature(alloc_system))]
|
||||
#![feature(staged_api)]
|
||||
#![cfg_attr(dummy_jemalloc, allow(dead_code))]
|
||||
#![cfg_attr(not(dummy_jemalloc), feature(allocator_api))]
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
extern crate alloc;
|
||||
#[cfg(not(stage0))]
|
||||
extern crate alloc_system;
|
||||
extern crate libc;
|
||||
|
||||
#[cfg(all(not(stage0), not(dummy_jemalloc)))]
|
||||
#[cfg(not(dummy_jemalloc))]
|
||||
pub use contents::*;
|
||||
#[cfg(all(not(stage0), not(dummy_jemalloc)))]
|
||||
#[cfg(not(dummy_jemalloc))]
|
||||
mod contents {
|
||||
use core::ptr;
|
||||
|
||||
|
@ -10,8 +10,6 @@ test = false
|
||||
doc = false
|
||||
|
||||
[dependencies]
|
||||
alloc = { path = "../liballoc" }
|
||||
core = { path = "../libcore" }
|
||||
libc = { path = "../rustc/libc_shim" }
|
||||
|
||||
[target.'cfg(not(stage0))'.dependencies]
|
||||
alloc = { path = "../liballoc" }
|
||||
|
@ -16,13 +16,10 @@
|
||||
reason = "this library is unlikely to be stabilized in its current \
|
||||
form or name",
|
||||
issue = "27783")]
|
||||
#![cfg_attr(stage0, allocator)]
|
||||
#![cfg_attr(stage0, feature(allocator))]
|
||||
#![cfg_attr(stage0, feature(core_intrinsics))]
|
||||
#![cfg_attr(not(stage0), feature(global_allocator))]
|
||||
#![cfg_attr(not(stage0), feature(allocator_api))]
|
||||
#![cfg_attr(not(stage0), feature(alloc))]
|
||||
#![cfg_attr(not(stage0), feature(core_intrinsics))]
|
||||
#![feature(global_allocator)]
|
||||
#![feature(allocator_api)]
|
||||
#![feature(alloc)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(staged_api)]
|
||||
#![cfg_attr(any(unix, target_os = "redox"), feature(libc))]
|
||||
|
||||
@ -44,16 +41,7 @@ const MIN_ALIGN: usize = 8;
|
||||
target_arch = "sparc64")))]
|
||||
const MIN_ALIGN: usize = 16;
|
||||
|
||||
#[cfg(stage0)]
|
||||
pub use old::*;
|
||||
#[cfg(stage0)]
|
||||
mod old;
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
pub use new::System;
|
||||
#[cfg(not(stage0))]
|
||||
mod new {
|
||||
pub extern crate alloc;
|
||||
extern crate alloc;
|
||||
|
||||
use self::alloc::heap::{Alloc, AllocErr, Layout, Excess, CannotReallocInPlace};
|
||||
|
||||
@ -125,9 +113,8 @@ mod new {
|
||||
(&*self).shrink_in_place(ptr, layout, new_layout)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(not(stage0), any(unix, target_os = "redox")))]
|
||||
#[cfg(any(unix, target_os = "redox"))]
|
||||
mod platform {
|
||||
extern crate libc;
|
||||
|
||||
@ -135,8 +122,8 @@ mod platform {
|
||||
use core::ptr;
|
||||
|
||||
use MIN_ALIGN;
|
||||
use new::System;
|
||||
use new::alloc::heap::{Alloc, AllocErr, Layout};
|
||||
use System;
|
||||
use alloc::heap::{Alloc, AllocErr, Layout};
|
||||
|
||||
#[unstable(feature = "allocator_api", issue = "32838")]
|
||||
unsafe impl<'a> Alloc for &'a System {
|
||||
@ -272,15 +259,15 @@ mod platform {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(windows, not(stage0)))]
|
||||
#[cfg(windows)]
|
||||
#[allow(bad_style)]
|
||||
mod platform {
|
||||
use core::cmp;
|
||||
use core::ptr;
|
||||
|
||||
use MIN_ALIGN;
|
||||
use new::System;
|
||||
use new::alloc::heap::{Alloc, AllocErr, Layout, CannotReallocInPlace};
|
||||
use System;
|
||||
use alloc::heap::{Alloc, AllocErr, Layout, CannotReallocInPlace};
|
||||
|
||||
type LPVOID = *mut u8;
|
||||
type HANDLE = LPVOID;
|
||||
|
@ -1,268 +0,0 @@
|
||||
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn __rust_alloc(size: usize,
|
||||
align: usize,
|
||||
err: *mut u8) -> *mut u8 {
|
||||
let p = imp::allocate(size, align);
|
||||
if p.is_null() {
|
||||
__rust_oom(err);
|
||||
}
|
||||
p
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn __rust_oom(_err: *const u8) -> ! {
|
||||
::core::intrinsics::abort()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn __rust_dealloc(ptr: *mut u8,
|
||||
size: usize,
|
||||
align: usize) {
|
||||
imp::deallocate(ptr, size, align)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn __rust_usable_size(size: usize,
|
||||
_align: usize,
|
||||
min: *mut usize,
|
||||
max: *mut usize) {
|
||||
*min = size;
|
||||
*max = size;
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn __rust_realloc(ptr: *mut u8,
|
||||
old_size: usize,
|
||||
old_align: usize,
|
||||
new_size: usize,
|
||||
new_align: usize,
|
||||
err: *mut u8) -> *mut u8 {
|
||||
if new_align != old_align {
|
||||
__rust_oom(err);
|
||||
}
|
||||
let p = imp::reallocate(ptr, old_size, new_size, new_align);
|
||||
if p.is_null() {
|
||||
__rust_oom(err);
|
||||
}
|
||||
p
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn __rust_alloc_zeroed(size: usize,
|
||||
align: usize,
|
||||
err: *mut u8) -> *mut u8 {
|
||||
let p = imp::allocate_zeroed(size, align);
|
||||
if p.is_null() {
|
||||
__rust_oom(err);
|
||||
}
|
||||
p
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn __rust_alloc_excess(_size: usize,
|
||||
_align: usize,
|
||||
_excess: *mut usize,
|
||||
err: *mut u8) -> *mut u8 {
|
||||
__rust_oom(err);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn __rust_realloc_excess(_ptr: *mut u8,
|
||||
_old_size: usize,
|
||||
_old_align: usize,
|
||||
_new_size: usize,
|
||||
_new_align: usize,
|
||||
_excess: *mut usize,
|
||||
err: *mut u8) -> *mut u8 {
|
||||
__rust_oom(err);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn __rust_grow_in_place(_ptr: *mut u8,
|
||||
_old_size: usize,
|
||||
_old_align: usize,
|
||||
_new_size: usize,
|
||||
_new_align: usize) -> u8 {
|
||||
0
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn __rust_shrink_in_place(_ptr: *mut u8,
|
||||
_old_size: usize,
|
||||
_old_align: usize,
|
||||
_new_size: usize,
|
||||
_new_align: usize) -> u8 {
|
||||
0
|
||||
}
|
||||
|
||||
#[cfg(any(unix, target_os = "redox"))]
|
||||
mod imp {
|
||||
extern crate libc;
|
||||
|
||||
use core::cmp;
|
||||
use core::ptr;
|
||||
use MIN_ALIGN;
|
||||
|
||||
pub unsafe fn allocate(size: usize, align: usize) -> *mut u8 {
|
||||
if align <= MIN_ALIGN {
|
||||
libc::malloc(size as libc::size_t) as *mut u8
|
||||
} else {
|
||||
aligned_malloc(size, align)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "android", target_os = "redox"))]
|
||||
unsafe fn aligned_malloc(size: usize, align: usize) -> *mut u8 {
|
||||
// On android we currently target API level 9 which unfortunately
|
||||
// doesn't have the `posix_memalign` API used below. Instead we use
|
||||
// `memalign`, but this unfortunately has the property on some systems
|
||||
// where the memory returned cannot be deallocated by `free`!
|
||||
//
|
||||
// Upon closer inspection, however, this appears to work just fine with
|
||||
// Android, so for this platform we should be fine to call `memalign`
|
||||
// (which is present in API level 9). Some helpful references could
|
||||
// possibly be chromium using memalign [1], attempts at documenting that
|
||||
// memalign + free is ok [2] [3], or the current source of chromium
|
||||
// which still uses memalign on android [4].
|
||||
//
|
||||
// [1]: https://codereview.chromium.org/10796020/
|
||||
// [2]: https://code.google.com/p/android/issues/detail?id=35391
|
||||
// [3]: https://bugs.chromium.org/p/chromium/issues/detail?id=138579
|
||||
// [4]: https://chromium.googlesource.com/chromium/src/base/+/master/
|
||||
// /memory/aligned_memory.cc
|
||||
libc::memalign(align as libc::size_t, size as libc::size_t) as *mut u8
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "android", target_os = "redox")))]
|
||||
unsafe fn aligned_malloc(size: usize, align: usize) -> *mut u8 {
|
||||
let mut out = ptr::null_mut();
|
||||
let ret = libc::posix_memalign(&mut out, align as libc::size_t, size as libc::size_t);
|
||||
if ret != 0 {
|
||||
ptr::null_mut()
|
||||
} else {
|
||||
out as *mut u8
|
||||
}
|
||||
}
|
||||
|
||||
pub unsafe fn allocate_zeroed(size: usize, align: usize) -> *mut u8 {
|
||||
if align <= MIN_ALIGN {
|
||||
libc::calloc(size as libc::size_t, 1) as *mut u8
|
||||
} else {
|
||||
let ptr = aligned_malloc(size, align);
|
||||
if !ptr.is_null() {
|
||||
ptr::write_bytes(ptr, 0, size);
|
||||
}
|
||||
ptr
|
||||
}
|
||||
}
|
||||
|
||||
pub unsafe fn reallocate(ptr: *mut u8, old_size: usize, size: usize, align: usize) -> *mut u8 {
|
||||
if align <= MIN_ALIGN {
|
||||
libc::realloc(ptr as *mut libc::c_void, size as libc::size_t) as *mut u8
|
||||
} else {
|
||||
let new_ptr = allocate(size, align);
|
||||
if !new_ptr.is_null() {
|
||||
ptr::copy(ptr, new_ptr, cmp::min(size, old_size));
|
||||
deallocate(ptr, old_size, align);
|
||||
}
|
||||
new_ptr
|
||||
}
|
||||
}
|
||||
|
||||
pub unsafe fn deallocate(ptr: *mut u8, _old_size: usize, _align: usize) {
|
||||
libc::free(ptr as *mut libc::c_void)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[allow(bad_style)]
|
||||
mod imp {
|
||||
use core::cmp::min;
|
||||
use core::ptr::copy_nonoverlapping;
|
||||
use MIN_ALIGN;
|
||||
|
||||
type LPVOID = *mut u8;
|
||||
type HANDLE = LPVOID;
|
||||
type SIZE_T = usize;
|
||||
type DWORD = u32;
|
||||
type BOOL = i32;
|
||||
|
||||
extern "system" {
|
||||
fn GetProcessHeap() -> HANDLE;
|
||||
fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID;
|
||||
fn HeapReAlloc(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID, dwBytes: SIZE_T) -> LPVOID;
|
||||
fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL;
|
||||
fn GetLastError() -> DWORD;
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
struct Header(*mut u8);
|
||||
|
||||
|
||||
const HEAP_ZERO_MEMORY: DWORD = 0x00000008;
|
||||
|
||||
unsafe fn get_header<'a>(ptr: *mut u8) -> &'a mut Header {
|
||||
&mut *(ptr as *mut Header).offset(-1)
|
||||
}
|
||||
|
||||
unsafe fn align_ptr(ptr: *mut u8, align: usize) -> *mut u8 {
|
||||
let aligned = ptr.offset((align - (ptr as usize & (align - 1))) as isize);
|
||||
*get_header(aligned) = Header(ptr);
|
||||
aligned
|
||||
}
|
||||
|
||||
#[inline]
|
||||
unsafe fn allocate_with_flags(size: usize, align: usize, flags: DWORD) -> *mut u8 {
|
||||
if align <= MIN_ALIGN {
|
||||
HeapAlloc(GetProcessHeap(), flags, size as SIZE_T) as *mut u8
|
||||
} else {
|
||||
let ptr = HeapAlloc(GetProcessHeap(), flags, (size + align) as SIZE_T) as *mut u8;
|
||||
if ptr.is_null() {
|
||||
return ptr;
|
||||
}
|
||||
align_ptr(ptr, align)
|
||||
}
|
||||
}
|
||||
|
||||
pub unsafe fn allocate(size: usize, align: usize) -> *mut u8 {
|
||||
allocate_with_flags(size, align, 0)
|
||||
}
|
||||
|
||||
pub unsafe fn allocate_zeroed(size: usize, align: usize) -> *mut u8 {
|
||||
allocate_with_flags(size, align, HEAP_ZERO_MEMORY)
|
||||
}
|
||||
|
||||
pub unsafe fn reallocate(ptr: *mut u8, old_size: usize, size: usize, align: usize) -> *mut u8 {
|
||||
if align <= MIN_ALIGN {
|
||||
HeapReAlloc(GetProcessHeap(), 0, ptr as LPVOID, size as SIZE_T) as *mut u8
|
||||
} else {
|
||||
let new = allocate(size, align);
|
||||
if !new.is_null() {
|
||||
copy_nonoverlapping(ptr, new, min(size, old_size));
|
||||
deallocate(ptr, old_size, align);
|
||||
}
|
||||
new
|
||||
}
|
||||
}
|
||||
|
||||
pub unsafe fn deallocate(ptr: *mut u8, _old_size: usize, align: usize) {
|
||||
if align <= MIN_ALIGN {
|
||||
let err = HeapFree(GetProcessHeap(), 0, ptr as LPVOID);
|
||||
debug_assert!(err != 0, "Failed to free heap memory: {}", GetLastError());
|
||||
} else {
|
||||
let header = get_header(ptr);
|
||||
let err = HeapFree(GetProcessHeap(), 0, header.0 as LPVOID);
|
||||
debug_assert!(err != 0, "Failed to free heap memory: {}", GetLastError());
|
||||
}
|
||||
}
|
||||
}
|
@ -1229,7 +1229,6 @@ extern "rust-intrinsic" {
|
||||
/// let num_leading = unsafe { ctlz_nonzero(x) };
|
||||
/// assert_eq!(num_leading, 3);
|
||||
/// ```
|
||||
#[cfg(not(stage0))]
|
||||
pub fn ctlz_nonzero<T>(x: T) -> T;
|
||||
|
||||
/// Returns the number of trailing unset bits (zeroes) in an integer type `T`.
|
||||
@ -1273,7 +1272,6 @@ extern "rust-intrinsic" {
|
||||
/// let num_trailing = unsafe { cttz_nonzero(x) };
|
||||
/// assert_eq!(num_trailing, 3);
|
||||
/// ```
|
||||
#[cfg(not(stage0))]
|
||||
pub fn cttz_nonzero<T>(x: T) -> T;
|
||||
|
||||
/// Reverses the bytes in an integer type `T`.
|
||||
|
@ -93,8 +93,6 @@
|
||||
#![feature(untagged_unions)]
|
||||
#![feature(unwind_attributes)]
|
||||
|
||||
#![cfg_attr(stage0, feature(associated_consts))]
|
||||
|
||||
#[prelude_import]
|
||||
#[allow(unused)]
|
||||
use prelude::v1::*;
|
||||
|
@ -2238,17 +2238,12 @@ macro_rules! uint_impl {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
unsafe fn ctlz_nonzero<T>(x: T) -> T { intrinsics::ctlz(x) }
|
||||
#[cfg(not(stage0))]
|
||||
unsafe fn ctlz_nonzero<T>(x: T) -> T { intrinsics::ctlz_nonzero(x) }
|
||||
|
||||
#[lang = "u8"]
|
||||
impl u8 {
|
||||
uint_impl! { u8, u8, 8,
|
||||
intrinsics::ctpop,
|
||||
intrinsics::ctlz,
|
||||
ctlz_nonzero,
|
||||
intrinsics::ctlz_nonzero,
|
||||
intrinsics::cttz,
|
||||
intrinsics::bswap,
|
||||
intrinsics::add_with_overflow,
|
||||
@ -2261,7 +2256,7 @@ impl u16 {
|
||||
uint_impl! { u16, u16, 16,
|
||||
intrinsics::ctpop,
|
||||
intrinsics::ctlz,
|
||||
ctlz_nonzero,
|
||||
intrinsics::ctlz_nonzero,
|
||||
intrinsics::cttz,
|
||||
intrinsics::bswap,
|
||||
intrinsics::add_with_overflow,
|
||||
@ -2274,7 +2269,7 @@ impl u32 {
|
||||
uint_impl! { u32, u32, 32,
|
||||
intrinsics::ctpop,
|
||||
intrinsics::ctlz,
|
||||
ctlz_nonzero,
|
||||
intrinsics::ctlz_nonzero,
|
||||
intrinsics::cttz,
|
||||
intrinsics::bswap,
|
||||
intrinsics::add_with_overflow,
|
||||
@ -2287,7 +2282,7 @@ impl u64 {
|
||||
uint_impl! { u64, u64, 64,
|
||||
intrinsics::ctpop,
|
||||
intrinsics::ctlz,
|
||||
ctlz_nonzero,
|
||||
intrinsics::ctlz_nonzero,
|
||||
intrinsics::cttz,
|
||||
intrinsics::bswap,
|
||||
intrinsics::add_with_overflow,
|
||||
@ -2300,7 +2295,7 @@ impl u128 {
|
||||
uint_impl! { u128, u128, 128,
|
||||
intrinsics::ctpop,
|
||||
intrinsics::ctlz,
|
||||
ctlz_nonzero,
|
||||
intrinsics::ctlz_nonzero,
|
||||
intrinsics::cttz,
|
||||
intrinsics::bswap,
|
||||
intrinsics::add_with_overflow,
|
||||
@ -2314,7 +2309,7 @@ impl usize {
|
||||
uint_impl! { usize, u16, 16,
|
||||
intrinsics::ctpop,
|
||||
intrinsics::ctlz,
|
||||
ctlz_nonzero,
|
||||
intrinsics::ctlz_nonzero,
|
||||
intrinsics::cttz,
|
||||
intrinsics::bswap,
|
||||
intrinsics::add_with_overflow,
|
||||
@ -2327,7 +2322,7 @@ impl usize {
|
||||
uint_impl! { usize, u32, 32,
|
||||
intrinsics::ctpop,
|
||||
intrinsics::ctlz,
|
||||
ctlz_nonzero,
|
||||
intrinsics::ctlz_nonzero,
|
||||
intrinsics::cttz,
|
||||
intrinsics::bswap,
|
||||
intrinsics::add_with_overflow,
|
||||
@ -2341,7 +2336,7 @@ impl usize {
|
||||
uint_impl! { usize, u64, 64,
|
||||
intrinsics::ctpop,
|
||||
intrinsics::ctlz,
|
||||
ctlz_nonzero,
|
||||
intrinsics::ctlz_nonzero,
|
||||
intrinsics::cttz,
|
||||
intrinsics::bswap,
|
||||
intrinsics::add_with_overflow,
|
||||
|
@ -39,7 +39,7 @@
|
||||
use fmt;
|
||||
|
||||
#[cold] #[inline(never)] // this is the slow path, always
|
||||
#[cfg_attr(not(stage0), lang = "panic")]
|
||||
#[lang = "panic"]
|
||||
pub fn panic(expr_file_line_col: &(&'static str, &'static str, u32, u32)) -> ! {
|
||||
// Use Arguments::new_v1 instead of format_args!("{}", expr) to potentially
|
||||
// reduce size overhead. The format_args! macro uses str's Display trait to
|
||||
@ -51,35 +51,14 @@ pub fn panic(expr_file_line_col: &(&'static str, &'static str, u32, u32)) -> ! {
|
||||
panic_fmt(fmt::Arguments::new_v1(&[expr], &[]), &(file, line, col))
|
||||
}
|
||||
|
||||
// FIXME: remove when SNAP
|
||||
#[cold] #[inline(never)]
|
||||
#[cfg(stage0)]
|
||||
#[lang = "panic"]
|
||||
pub fn panic_old(expr_file_line: &(&'static str, &'static str, u32)) -> ! {
|
||||
let (expr, file, line) = *expr_file_line;
|
||||
let expr_file_line_col = (expr, file, line, 0);
|
||||
panic(&expr_file_line_col)
|
||||
}
|
||||
|
||||
#[cold] #[inline(never)]
|
||||
#[cfg_attr(not(stage0), lang = "panic_bounds_check")]
|
||||
#[lang = "panic_bounds_check"]
|
||||
fn panic_bounds_check(file_line_col: &(&'static str, u32, u32),
|
||||
index: usize, len: usize) -> ! {
|
||||
panic_fmt(format_args!("index out of bounds: the len is {} but the index is {}",
|
||||
len, index), file_line_col)
|
||||
}
|
||||
|
||||
// FIXME: remove when SNAP
|
||||
#[cold] #[inline(never)]
|
||||
#[cfg(stage0)]
|
||||
#[lang = "panic_bounds_check"]
|
||||
fn panic_bounds_check_old(file_line: &(&'static str, u32),
|
||||
index: usize, len: usize) -> ! {
|
||||
let (file, line) = *file_line;
|
||||
panic_fmt(format_args!("index out of bounds: the len is {} but the index is {}",
|
||||
len, index), &(file, line, 0))
|
||||
}
|
||||
|
||||
#[cold] #[inline(never)]
|
||||
pub fn panic_fmt(fmt: fmt::Arguments, file_line_col: &(&'static str, u32, u32)) -> ! {
|
||||
#[allow(improper_ctypes)]
|
||||
|
@ -9,8 +9,8 @@
|
||||
// except according to those terms.
|
||||
|
||||
#![no_std]
|
||||
#![cfg_attr(not(stage0), feature(profiler_runtime))]
|
||||
#![cfg_attr(not(stage0), profiler_runtime)]
|
||||
#![feature(profiler_runtime)]
|
||||
#![profiler_runtime]
|
||||
#![unstable(feature = "profiler_runtime_lib",
|
||||
reason = "internal implementation detail of rustc right now",
|
||||
issue = "0")]
|
||||
|
@ -41,8 +41,6 @@
|
||||
#![feature(trace_macros)]
|
||||
#![feature(test)]
|
||||
|
||||
#![cfg_attr(stage0, feature(associated_consts))]
|
||||
|
||||
#![recursion_limit="256"]
|
||||
|
||||
extern crate arena;
|
||||
|
@ -9,10 +9,10 @@
|
||||
// except according to those terms.
|
||||
|
||||
#![sanitizer_runtime]
|
||||
#![feature(sanitizer_runtime)]
|
||||
#![feature(alloc_system)]
|
||||
#![cfg_attr(not(stage0), feature(allocator_api))]
|
||||
#![cfg_attr(not(stage0), feature(global_allocator))]
|
||||
#![feature(allocator_api)]
|
||||
#![feature(global_allocator)]
|
||||
#![feature(sanitizer_runtime)]
|
||||
#![feature(staged_api)]
|
||||
#![no_std]
|
||||
#![unstable(feature = "sanitizer_runtime_lib",
|
||||
@ -21,9 +21,7 @@
|
||||
|
||||
extern crate alloc_system;
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
use alloc_system::System;
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
#[global_allocator]
|
||||
static ALLOC: System = System;
|
||||
|
@ -14,8 +14,6 @@
|
||||
#![no_std]
|
||||
#![deny(warnings)]
|
||||
|
||||
#![cfg_attr(stage0, feature(associated_consts))]
|
||||
|
||||
//! A typesafe bitmask flag generator.
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -21,8 +21,6 @@
|
||||
#![feature(quote)]
|
||||
#![feature(rustc_diagnostic_macros)]
|
||||
|
||||
#![cfg_attr(stage0, feature(associated_consts))]
|
||||
|
||||
#[macro_use] extern crate log;
|
||||
#[macro_use] extern crate syntax;
|
||||
extern crate syntax_pos;
|
||||
|
@ -36,9 +36,6 @@
|
||||
#![feature(specialization)]
|
||||
#![feature(manually_drop)]
|
||||
|
||||
#![cfg_attr(stage0, feature(associated_consts))]
|
||||
#![cfg_attr(stage0, feature(struct_field_attributes))]
|
||||
|
||||
#![cfg_attr(unix, feature(libc))]
|
||||
#![cfg_attr(test, feature(test))]
|
||||
|
||||
|
@ -27,8 +27,6 @@
|
||||
#![feature(link_args)]
|
||||
#![feature(static_nobundle)]
|
||||
|
||||
#![cfg_attr(stage0, feature(associated_consts))]
|
||||
|
||||
extern crate libc;
|
||||
#[macro_use]
|
||||
#[no_link]
|
||||
|
@ -11,8 +11,8 @@
|
||||
#![sanitizer_runtime]
|
||||
#![feature(sanitizer_runtime)]
|
||||
#![feature(alloc_system)]
|
||||
#![cfg_attr(not(stage0), feature(allocator_api))]
|
||||
#![cfg_attr(not(stage0), feature(global_allocator))]
|
||||
#![feature(allocator_api)]
|
||||
#![feature(global_allocator)]
|
||||
#![feature(staged_api)]
|
||||
#![no_std]
|
||||
#![unstable(feature = "sanitizer_runtime_lib",
|
||||
@ -21,9 +21,7 @@
|
||||
|
||||
extern crate alloc_system;
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
use alloc_system::System;
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
#[global_allocator]
|
||||
static ALLOC: System = System;
|
||||
|
@ -27,8 +27,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
|
||||
#![feature(collection_placement)]
|
||||
#![feature(nonzero)]
|
||||
|
||||
#![cfg_attr(stage0, feature(associated_consts))]
|
||||
|
||||
#[macro_use] extern crate log;
|
||||
extern crate graphviz as dot;
|
||||
#[macro_use]
|
||||
|
@ -11,8 +11,8 @@
|
||||
#![sanitizer_runtime]
|
||||
#![feature(sanitizer_runtime)]
|
||||
#![feature(alloc_system)]
|
||||
#![cfg_attr(not(stage0), feature(allocator_api))]
|
||||
#![cfg_attr(not(stage0), feature(global_allocator))]
|
||||
#![feature(allocator_api)]
|
||||
#![feature(global_allocator)]
|
||||
#![feature(staged_api)]
|
||||
#![no_std]
|
||||
#![unstable(feature = "sanitizer_runtime_lib",
|
||||
@ -21,9 +21,7 @@
|
||||
|
||||
extern crate alloc_system;
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
use alloc_system::System;
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
#[global_allocator]
|
||||
static ALLOC: System = System;
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
#![feature(rustc_diagnostic_macros)]
|
||||
|
||||
#![cfg_attr(stage0, feature(associated_consts))]
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
|
@ -34,8 +34,6 @@
|
||||
#![feature(slice_patterns)]
|
||||
#![feature(conservative_impl_trait)]
|
||||
|
||||
#![cfg_attr(stage0, feature(associated_consts))]
|
||||
|
||||
use rustc::dep_graph::WorkProduct;
|
||||
use syntax_pos::symbol::Symbol;
|
||||
|
||||
|
@ -13,10 +13,9 @@
|
||||
#![unstable(issue = "32838", feature = "allocator_api")]
|
||||
|
||||
pub use alloc::heap::{Heap, Alloc, Layout, Excess, CannotReallocInPlace, AllocErr};
|
||||
#[cfg(not(stage0))]
|
||||
pub use alloc_system::System;
|
||||
|
||||
#[cfg(all(not(stage0), not(test)))]
|
||||
#[cfg(not(test))]
|
||||
#[doc(hidden)]
|
||||
pub mod __default_lib_allocator {
|
||||
use super::{System, Layout, Alloc, AllocErr};
|
||||
|
@ -318,8 +318,7 @@
|
||||
#![feature(vec_push_all)]
|
||||
#![cfg_attr(test, feature(update_panic_count))]
|
||||
|
||||
#![cfg_attr(not(stage0), default_lib_allocator)]
|
||||
#![cfg_attr(stage0, feature(associated_consts))]
|
||||
#![default_lib_allocator]
|
||||
|
||||
// Explicitly import the prelude. The compiler uses this same unstable attribute
|
||||
// to import the prelude implicitly when building crates that depend on std.
|
||||
|
@ -110,7 +110,6 @@ impl<T: 'static> fmt::Debug for LocalKey<T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
/// Declare a new thread local storage key of type [`std::thread::LocalKey`].
|
||||
///
|
||||
/// # Syntax
|
||||
@ -152,7 +151,6 @@ macro_rules! thread_local {
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
#[doc(hidden)]
|
||||
#[unstable(feature = "thread_local_internals",
|
||||
reason = "should not be necessary",
|
||||
@ -185,71 +183,6 @@ macro_rules! __thread_local_inner {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
/// Declare a new thread local storage key of type `std::thread::LocalKey`.
|
||||
#[macro_export]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow_internal_unstable]
|
||||
macro_rules! thread_local {
|
||||
// rule 0: empty (base case for the recursion)
|
||||
() => {};
|
||||
|
||||
// rule 1: process multiple declarations where the first one is private
|
||||
($(#[$attr:meta])* static $name:ident: $t:ty = $init:expr; $($rest:tt)*) => (
|
||||
thread_local!($(#[$attr])* static $name: $t = $init); // go to rule 2
|
||||
thread_local!($($rest)*);
|
||||
);
|
||||
|
||||
// rule 2: handle a single private declaration
|
||||
($(#[$attr:meta])* static $name:ident: $t:ty = $init:expr) => (
|
||||
$(#[$attr])* static $name: $crate::thread::LocalKey<$t> =
|
||||
__thread_local_inner!($t, $init);
|
||||
);
|
||||
|
||||
// rule 3: handle multiple declarations where the first one is public
|
||||
($(#[$attr:meta])* pub static $name:ident: $t:ty = $init:expr; $($rest:tt)*) => (
|
||||
thread_local!($(#[$attr])* pub static $name: $t = $init); // go to rule 4
|
||||
thread_local!($($rest)*);
|
||||
);
|
||||
|
||||
// rule 4: handle a single public declaration
|
||||
($(#[$attr:meta])* pub static $name:ident: $t:ty = $init:expr) => (
|
||||
$(#[$attr])* pub static $name: $crate::thread::LocalKey<$t> =
|
||||
__thread_local_inner!($t, $init);
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
#[doc(hidden)]
|
||||
#[unstable(feature = "thread_local_internals",
|
||||
reason = "should not be necessary",
|
||||
issue = "0")]
|
||||
#[macro_export]
|
||||
#[allow_internal_unstable]
|
||||
macro_rules! __thread_local_inner {
|
||||
($t:ty, $init:expr) => {{
|
||||
fn __init() -> $t { $init }
|
||||
|
||||
fn __getit() -> $crate::option::Option<
|
||||
&'static $crate::cell::UnsafeCell<
|
||||
$crate::option::Option<$t>>>
|
||||
{
|
||||
#[thread_local]
|
||||
#[cfg(target_thread_local)]
|
||||
static __KEY: $crate::thread::__FastLocalKeyInner<$t> =
|
||||
$crate::thread::__FastLocalKeyInner::new();
|
||||
|
||||
#[cfg(not(target_thread_local))]
|
||||
static __KEY: $crate::thread::__OsLocalKeyInner<$t> =
|
||||
$crate::thread::__OsLocalKeyInner::new();
|
||||
|
||||
__KEY.get()
|
||||
}
|
||||
|
||||
$crate::thread::LocalKey::new(__getit, __init)
|
||||
}}
|
||||
}
|
||||
|
||||
/// Indicator of the state of a thread local storage key.
|
||||
#[unstable(feature = "thread_local_state",
|
||||
reason = "state querying was recently added",
|
||||
|
@ -12,7 +12,7 @@
|
||||
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
|
||||
# `0.x.0` for Cargo where they were released on `date`.
|
||||
|
||||
date: 2017-06-15
|
||||
date: 2017-07-18
|
||||
rustc: beta
|
||||
cargo: beta
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit ffab51954ec32d55631c37a8730bb24915fc090b
|
||||
Subproject commit 88aa6423a164774d09abc78a24e74e8e665f651b
|
Loading…
Reference in New Issue
Block a user