a warning.
- [From the pound escape, lines consisting of multiple `#`s are
now visible][41785]
-- [It is an error to reexport private enum variants][42460]. This is
+- [It is an error to re-export private enum variants][42460]. This is
known to break a number of crates that depend on an older version of
mustache.
- [On Windows, if `VCINSTALLDIR` is set incorrectly, `rustc` will try
-------
* [Fix empty implementation section on some module pages](https://github.com/rust-lang/rust/pull/34536)
-* [Fix inlined renamed reexports in import lists](https://github.com/rust-lang/rust/pull/34479)
+* [Fix inlined renamed re-exports in import lists](https://github.com/rust-lang/rust/pull/34479)
* [Fix search result layout for enum variants and struct fields](https://github.com/rust-lang/rust/pull/34477)
* [Fix issues with source links to external crates](https://github.com/rust-lang/rust/pull/34387)
-* [Fix redirect pages for renamed reexports](https://github.com/rust-lang/rust/pull/34245)
+* [Fix redirect pages for renamed re-exports](https://github.com/rust-lang/rust/pull/34245)
Tooling
-------
* std: The `vec` module has been renamed to `slice`.
* std: A new vector type, `Vec<T>`, has been added in preparation for DST.
This will become the only growable vector in the future.
- * std: `std::io` now has more public-reexports. Types such as `BufferedReader`
+ * std: `std::io` now has more public re-exports. Types such as `BufferedReader`
are now found at `std::io::BufferedReader` instead of
`std::io::buffered::BufferedReader`.
* std: `print` and `println` are no longer in the prelude, the `print!` and
* render standalone markdown files.
* the --test flag tests all code blocks by default.
* exported macros are displayed.
- * reexported types have their documentation inlined at the location of the
- first reexport.
+ * re-exported types have their documentation inlined at the location of the
+ first re-export.
* search works across crates that have been rendered to the same output
directory.
incl. `any`, `all`. removed.
* std: The `finalize` method of `Drop` renamed to `drop`.
* std: The `drop` method now takes `&mut self` instead of `&self`.
- * std: The prelude no longer reexports any modules, only types and traits.
+ * std: The prelude no longer re-exports any modules, only types and traits.
* std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
`Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
* std: New numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
version = "0.0.0"
dependencies = [
"core 0.0.0",
- "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)",
"std_unicode 0.0.0",
]
"alloc 0.0.0",
"alloc_system 0.0.0",
"build_helper 0.1.0",
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
"libc 0.0.0",
]
[[package]]
name = "atty"
-version = "0.2.3"
+version = "0.2.6"
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.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"termion 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)",
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "backtrace"
-version = "0.3.4"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
"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.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.0.0"
dependencies = [
"build_helper 0.1.0",
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
- "filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
name = "build-manifest"
version = "0.1.0"
dependencies = [
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
name = "build_helper"
version = "0.1.0"
dependencies = [
- "filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
[[package]]
name = "cargo"
-version = "0.25.0"
+version = "0.26.0"
dependencies = [
- "atty 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "atty 0.2.6 (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",
"core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "crates-io 0.14.0",
- "crossbeam 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crates-io 0.15.0",
+ "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"crypto-hash 0.3.0 (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)",
+ "curl 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.1 (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.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.11 (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)",
"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)",
+ "hex 0.3.1 (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)",
+ "ignore 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"jobserver 0.1.9 (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.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.1 (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.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "psapi-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "same-file 1.0.2 (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.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_ignored 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.9 (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.14 (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.3 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
dependencies = [
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cargotest"
version = "0.1.0"
dependencies = [
- "cargo 0.25.0",
- "filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cargo 0.26.0",
+ "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.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)",
- "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"tar 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cc"
-version = "1.0.3"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "atty 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"compiletest_rs 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"duct 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
version = "0.1.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "compiler_builtins"
version = "0.0.0"
dependencies = [
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
]
dependencies = [
"diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"core-foundation-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crates-io"
-version = "0.14.0"
+version = "0.15.0"
dependencies = [
- "curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crossbeam"
-version = "0.2.10"
+version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "crossbeam"
-version = "0.3.0"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
[[package]]
name = "curl"
-version = "0.4.8"
+version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "curl-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl-sys 0.4.1 (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.36 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)",
- "socket2 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)",
+ "schannel 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "socket2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "curl-sys"
-version = "0.3.15"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.9.24 (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)",
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "dbghelp-sys"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
[[package]]
name = "docopt"
-version = "0.8.1"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
"strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "backtrace 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "backtrace 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "backtrace 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "filetime"
-version = "0.1.14"
+version = "0.1.15"
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)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "fs2"
-version = "0.4.2"
+version = "0.4.3"
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.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "fuchsia-zircon"
-version = "0.3.2"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "fuchsia-zircon-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "fuchsia-zircon-sys"
-version = "0.3.2"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
[[package]]
name = "git2"
-version = "0.6.10"
+version = "0.6.11"
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.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
+[[package]]
+name = "hex"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "home"
version = "0.3.0"
[[package]]
name = "html-diff"
-version = "0.0.5"
+version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kuchiki 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
[[package]]
name = "ignore"
-version = "0.2.2"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"globset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "walkdir 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rayon 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tar 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "xz2 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "xz2 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
dependencies = [
"futures 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "libc"
-version = "0.2.35"
+version = "0.2.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libgit2-sys"
-version = "0.6.18"
+version = "0.6.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
- "curl-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (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.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (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)",
]
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"pulldown-cmark 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "memchr"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
"cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"compiletest_rs 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
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.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (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)",
]
dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
dependencies = [
"num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num_cpus"
-version = "1.7.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
[[package]]
name = "openssl-sys"
-version = "0.9.23"
+version = "0.9.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (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)",
]
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.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "profiler_builtins"
version = "0.0.0"
dependencies = [
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
]
-[[package]]
-name = "psapi-sys"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
[[package]]
name = "pulldown-cmark"
version = "0.0.15"
[[package]]
name = "rand"
-version = "0.3.19"
+version = "0.3.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "fuchsia-zircon 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
dependencies = [
"coco 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "redox_syscall"
-version = "0.1.32"
+version = "0.1.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
[[package]]
name = "regex"
-version = "0.2.3"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "regex-syntax"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "rls"
version = "0.124.0"
dependencies = [
- "cargo 0.25.0",
+ "cargo 0.26.0",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"json 0.11.12 (registry+https://github.com/rust-lang/crates.io-index)",
"rls-rustc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rls-vfs 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustfmt-nightly 0.3.4",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustfmt-nightly 0.3.6",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
dependencies = [
"rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.0.0"
dependencies = [
"arena 0.0.0",
- "backtrace 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"syntax_pos 0.0.0",
]
+[[package]]
+name = "rustc-ap-rustc_cratesio_shim"
+version = "12.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rustc-ap-rustc_data_structures"
+version = "12.0.0"
+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)",
+ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "parking_lot 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "parking_lot_core 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-ap-serialize 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rustc-ap-rustc_errors"
+version = "12.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rustc-ap-rustc_data_structures 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-ap-serialize 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-ap-syntax_pos 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rustc-ap-serialize"
+version = "12.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "rustc-ap-syntax"
+version = "12.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-ap-rustc_cratesio_shim 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-ap-rustc_data_structures 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-ap-rustc_errors 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-ap-serialize 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-ap-syntax_pos 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rustc-ap-syntax_pos"
+version = "12.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rustc-ap-rustc_data_structures 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-ap-serialize 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
[[package]]
name = "rustc-demangle"
version = "0.1.5"
version = "0.0.0"
dependencies = [
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)",
"serialize 0.0.0",
"syntax 0.0.0",
]
name = "rustc_binaryen"
version = "0.0.0"
dependencies = [
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
dependencies = [
"graphviz 0.0.0",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_data_structures 0.0.0",
"serialize 0.0.0",
dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"build_helper 0.1.0",
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_cratesio_shim 0.0.0",
]
version = "0.0.0"
dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"jobserver 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_allocator 0.0.0",
version = "0.0.0"
dependencies = [
"build_helper 0.1.0",
- "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "html-diff 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "html-diff 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"pulldown-cmark 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rustfmt-nightly"
-version = "0.3.4"
+version = "0.3.6"
dependencies = [
"cargo_metadata 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"derive-new 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.15 (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.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-ap-rustc_errors 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-ap-syntax 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "same-file"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "schannel"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
[[package]]
name = "scoped-tls"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "semver"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
[[package]]
name = "serde"
-version = "1.0.25"
+version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde_derive"
-version = "1.0.25"
+version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive_internals 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_derive_internals"
-version = "0.18.1"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
version = "0.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_json"
-version = "1.0.8"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
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.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "socket2"
-version = "0.2.4"
+version = "0.3.0"
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.35 (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)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
"panic_abort 0.0.0",
"panic_unwind 0.0.0",
"profiler_builtins 0.0.0",
- "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_asan 0.0.0",
"rustc_lsan 0.0.0",
"rustc_msan 0.0.0",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
"precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (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)",
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.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (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)",
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
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.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "walkdir"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
+[[package]]
+name = "winapi"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "wincolor"
version = "0.1.4"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "xz2"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"lzma-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4"
"checksum ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b3568b48b7cefa6b8ce125f9bb4989e52fbcc29ebea88df04cc7c5f12f70455"
"checksum ar 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "35c7a5669cb64f085739387e1308b74e6d44022464b7f1b63bbd4ceb6379ec31"
-"checksum atty 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21e50800ec991574876040fff8ee46b136a53e985286fbe6a3bdfe6421b78860"
-"checksum backtrace 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8709cc7ec06f6f0ae6c2c7e12f6ed41540781f72b488d83734978295ceae182e"
+"checksum atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8352656fd42c30a0c3c89d26dea01e3b77c0ab2af18230835c15e2e13cd51859"
+"checksum backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbbf59b1c43eefa8c3ede390fcc36820b4999f7914104015be25025e0d62af2"
"checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
"checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23"
"checksum cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "be1057b8462184f634c3a208ee35b0f935cfd94b694b26deadccd98732088d7b"
"checksum cargo_metadata 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "20d6fb2b5574726329c85cdba0df0347fddfec3cf9c8b588f9931708280f5643"
-"checksum cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a9b13a57efd6b30ecd6598ebdb302cca617930b5470647570468a65d12ef9719"
+"checksum cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "deaf9ec656256bb25b404c51ef50097207b9cbb29c933d31f92cae5a8a0ffee0"
"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
"checksum clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)" = "110d43e343eb29f4f51c1db31beb879d546db27998577e5715270a54bcf41d3f"
"checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb"
"checksum compiletest_rs 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "562bafeec9aef1e3e08f1c5b0c542220bb80ff2894e5373a1f9d17c346412c66"
"checksum core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8047f547cd6856d45b1cdd75ef8d2f21f3d0e4bf1dab0a0041b0ae9a5dda9c0e"
"checksum core-foundation-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "152195421a2e6497a8179195672e9d4ee8e45ed8c465b626f1606d27a08ebcd5"
-"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"
-"checksum crossbeam 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8837ab96533202c5b610ed44bc7f4183e7957c1c8f56e8cc78bb098593c8ba0a"
+"checksum crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "bd66663db5a988098a89599d4857919b3acf7f61402e61365acfd3919857b9be"
+"checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19"
"checksum crypto-hash 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34903878eec1694faf53cae8473a088df333181de421d4d3d48061d6559fe602"
"checksum cssparser 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ef6124306e5ebc5ab11891d063aeafdd0cdc308079b708c8b566125f3680292b"
"checksum cssparser-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "079adec4af52bb5275eadd004292028c79eb3c5f5b4ee8086a36d4197032f6df"
-"checksum curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7034c534a1d7d22f7971d6088aa9d281d219ef724026c3428092500f41ae9c2c"
-"checksum curl-sys 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "4bee31aa3a079d5f3ff9579ea4dcfb1b1a17a40886f5f467436d383e78134b55"
-"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
+"checksum curl 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b70fd6394677d3c0e239ff4be6f2b3176e171ffd1c23ffdc541e78dea2b8bb5e"
+"checksum curl-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f46e49c7125131f5afaded06944d6888b55cbdf8eba05dae73c954019b907961"
"checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3"
"checksum derive-new 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "415f627ab054041c3eb748c2e1da0ef751989f5f0c386b63a098e545854a98ba"
"checksum diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3c2b69f912779fbb121ceb775d74d51e915af17aaebc38d28a592843a2dd0a3a"
-"checksum docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b5b93718f8b3e5544fcc914c43de828ca6c6ace23e0332c6080a2977b49787a"
+"checksum docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d8acd393692c503b168471874953a2531df0e9ab77d0b6bbc582395743300a4a"
"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab"
"checksum duct 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e45aa15fe0a8a8f511e6d834626afd55e49b62e5c8802e18328a87e8a8f6065c"
"checksum either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "740178ddf48b1a9e878e6d6509a1442a2d42fd2928aae8e7a6f8a36fb01981b3"
"checksum error-chain 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6930e04918388a9a2e41d518c25cf679ccafe26733fb4127dbf21993f2575d46"
"checksum failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "934799b6c1de475a012a02dab0ace1ace43789ee4b99bcfbf1a2e3e8ced5de82"
"checksum failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7cdda555bb90c9bb67a3b670a0f42de8e73f5981524123ad8578aafec8ddb8b"
-"checksum filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "aa75ec8f7927063335a9583e7fa87b0110bb888cf766dc01b54c0ff70d760c8e"
+"checksum filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "714653f3e34871534de23771ac7b26e999651a0a228f47beb324dfdf1dd4b10f"
"checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909"
"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
-"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866"
-"checksum fuchsia-zircon 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bd510087c325af53ba24f3be8f1c081b0982319adcb8b03cad764512923ccc19"
-"checksum fuchsia-zircon-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "08b3a6f13ad6b96572b53ce7af74543132f1a7055ccceb6d073dd36c54481859"
+"checksum fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
+"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
+"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
"checksum futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "51f93f3de6ba1794dcd5810b3546d004600a59a98266487c8407bc4b24e398f3"
"checksum futures 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "118b49cac82e04121117cbd3121ede3147e885627d82c4546b87c702debb90c1"
"checksum getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "65922871abd2f101a2eb0eaebadc66668e54a87ad9c3dd82520b5f86ede5eff9"
-"checksum git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "40a111aecd59985496012976beca164b4f6c930d507a099831e06b07f19d54f1"
+"checksum git2 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ee5b4bb7cd2a44e6e5ee3a26ba6a9ca10d4ce2771cdc3839bbc54b47b7d1be84"
"checksum git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68676bc784bf0bef83278898929bf64a251e87c0340723d0b93fa096c9c5bf8e"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum globset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "464627f948c3190ae3d04b1bc6d7dca2f785bda0ac01278e6db129ad383dbeb6"
"checksum hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf088f042a467089e9baa4972f57f9247e42a0cc549ba264c7a04fbb8ecb89d4"
"checksum handlebars 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fb04af2006ea09d985fef82b81e0eb25337e51b691c76403332378a53d521edc"
"checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa"
+"checksum hex 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "459d3cf58137bb02ad4adeef5036377ff59f066dbb82517b7192e3a5462a2abc"
"checksum home 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9f25ae61099d8f3fee8b483df0bd4ecccf4b2731897aad40d50eca1b641fe6db"
-"checksum html-diff 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9778743e3b3c3679f471f0ed1833c690f19f4a0919e33b281f12ef5f77ad64c6"
+"checksum html-diff 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ee4cfdf62a484a3ac0d9b80f562d37f99366db08a63621b917ea3056565345f7"
"checksum html5ever 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5bfb46978eb757a603b7dfe2dafb1c62cb4dee3428d8ac1de734d83d6b022d06"
"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"
"checksum if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "61bb90bdd39e3af69b0172dfc6130f6cd6332bf040fbb9bdd4401d37adbd48b8"
-"checksum ignore 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b3fcaf2365eb14b28ec7603c98c06cc531f19de9eb283d89a3dff8417c8c99f5"
+"checksum ignore 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb2f0238094bd1b41800fb6eb9b16fdd5e9832ed6053ed91409f0cd5bf28dcfd"
"checksum itertools 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3f2be4da1690a039e9ae5fd575f706a63ad5a2120f161b1d653c9da3930dd21"
"checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c"
"checksum jobserver 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "565f6106bd87b394398f813bea4e5ecad6d6b0f6aa077592d088f882a506481d"
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d"
"checksum lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b585b7a6811fb03aa10e74b278a0f00f8dd9b45dc681f148bb29fa5cb61859b"
-"checksum libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)" = "96264e9b293e95d25bfcbbf8a88ffd1aedc85b754eba8b7d78012f638ba220eb"
-"checksum libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "82fc20bd8beefe7c9f98aae2d3cff78e57f544cdd83d58fe181ec37a5fbe0c77"
+"checksum libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "1e5d97d6708edaa407429faa671b942dc0f2727222fb6b6539bf1db936e4b121"
+"checksum libgit2-sys 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6eeae66e7b1c995de45cb4e65c5ab438a96a7b4077e448645d4048dc753ad357"
"checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75"
"checksum libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "87f737ad6cc6fd6eefe3d9dc5412f1573865bded441300904d2f42269e140f16"
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
"checksum mdbook 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "8a1ac668292d1e5c7b1c6fd64f70d3a85105b8069a89558a0d67bdb2ff298ca1"
"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20"
-"checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a"
"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
"checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4"
"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
"checksum num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "7485fcc84f85b4ecd0ea527b14189281cf27d60e583ae65ebc9c088b13dffe01"
"checksum num-rational 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "0c7cb72a95250d8a370105c828f388932373e0e94414919891a0f945222310fe"
"checksum num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "cacfcab5eb48250ee7d0c7896b51a2c5eec99c1feea5f32025635f5ae4b00070"
-"checksum num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "514f0d73e64be53ff320680ca671b64fe3fb91da01e1ae2ddc99eb51d453b20d"
+"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30"
"checksum open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c281318d992e4432cfa799969467003d05921582a7489a8325e37f8a450d5113"
"checksum openssl 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)" = "169a4b9160baf9b9b1ab975418c673686638995ba921683a7f1e01470dcb8854"
"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
-"checksum openssl-sys 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)" = "2200ffec628e3f14c39fc0131a301db214f1a7d584e36507ee8700b0c7fb7a46"
+"checksum openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "14ba54ac7d5a4eabd1d5f2c1fdeb7e7c14debfa669d94b983d01b465e767ba9e"
"checksum os_pipe 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "998bfbb3042e715190fe2a41abfa047d7e8cb81374d2977d7f100eacd8619cb1"
"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
"checksum parking_lot 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3e7f7c9857874e54afeb950eebeae662b1e51a2493666d2ea4c0a5d91dcf0412"
"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903"
"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
"checksum procedural-masquerade 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "dc1bcafee1590f81acb329ae45ec627b318123f085153913620316ae9a144b2a"
-"checksum psapi-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f71c7e142c25f297077a8ebc21f10847096b5d21ad7619d7bf0c1fcecb40bb0"
"checksum pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "378e941dbd392c101f2cb88097fa4d7167bc421d4b88de3ff7dbee503bc3233b"
"checksum pulldown-cmark 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a656fdb8b6848f896df5e478a0eb9083681663e37dcb77dd16981ff65329fe8b"
"checksum quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4"
"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
"checksum racer 2.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "034f1c4528581c40a60e96875467c03315868084e08ff4ceb46a00f7be3b16b4"
"checksum radix_trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "211c49b6a9995cac0fd1dd9ca60b42cf3a51e151a12eb954b3a9e75513426ee8"
-"checksum rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "9e7944d95d25ace8f377da3ac7068ce517e4c646754c43a1b1849177bbf72e59"
+"checksum rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)" = "512870020642bb8c221bf68baa1b2573da814f6ccfe5c9699b1c303047abe9b1"
"checksum rayon 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed02d09394c94ffbdfdc755ad62a132e94c3224a8354e78a1200ced34df12edf"
"checksum rayon-core 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e64b609139d83da75902f88fd6c01820046840a18471e4dfcd5ac7c0f46bea53"
-"checksum redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "ab105df655884ede59d45b7070c8a65002d921461ee813a024558ca16030eea0"
+"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd"
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f"
-"checksum regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ac6ab4e9218ade5b423358bbd2567d1617418403c7a512603630181813316322"
+"checksum regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "744554e01ccbd98fff8c457c3b092cd67af62a555a43bfe97ae8a0451f7799fa"
"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957"
-"checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"
+"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e"
"checksum rls-analysis 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "38841e3c5271715a574ac220d9b408b59ed9e2626909c3bc54b5853b4eaadb7b"
"checksum rls-data 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8024f1feaca72d0aa4ae1e2a8d454a31b9a33ed02f8d0e9c8559bf53c267ec3c"
"checksum rls-rustc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b21ea952e9bf1569929abf1bb920262cde04b7b1b26d8e0260286302807299d2"
"checksum rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d7c7046dc6a92f2ae02ed302746db4382e75131b9ce20ce967259f6b5867a6a"
"checksum rls-vfs 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ffd34691a510938bb67fe0444fb363103c73ffb31c121d1e16bc92d8945ea8ff"
+"checksum rustc-ap-rustc_cratesio_shim 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f1a51c10af5abd5d698b7e3487e869e6d15f6feb04cbedb5c792e2824f9d845e"
+"checksum rustc-ap-rustc_data_structures 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1aa227490501072780d57f74b1164d361833ff8e172f817da0da2cdf2e4280cc"
+"checksum rustc-ap-rustc_errors 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "21ff6c6e13ac4fc04b7d4d398828b024c4b6577045cb3175b33d35fea35ff6d0"
+"checksum rustc-ap-serialize 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b4e7f51e298675c2bf830f7265621a8936fb09e63b825b58144cbaac969e604"
+"checksum rustc-ap-syntax 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8bf5639869ba2f7fa581939cd217cb71a85506b82ad0ea520614fb0dceb2386c"
+"checksum rustc-ap-syntax_pos 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1c020cdb7379e1c733ae0a311ae47c748337ba584d2dd7b7f53baaae78de6f8b"
"checksum rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aee45432acc62f7b9a108cc054142dac51f979e69e71ddce7d6fc7adf29e817e"
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
"checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7"
+"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637"
+"checksum schannel 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "acece75e0f987c48863a6c792ec8b7d6c4177d4a027f8ccc72f849794f437016"
"checksum scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f417c22df063e9450888a7561788e9bd46d3bb3c1466435b4eccb903807f147d"
"checksum scopeguard 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "59a076157c1e2dc561d8de585151ee6965d910dd4dcb5dabb7ae3e83981a6c57"
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
"checksum selectors 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3c89b1c6a3c029c82263f7dd2d44d0005ee7374eb09e254ab59dede4353a8c0"
"checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537"
"checksum semver 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bee2bc909ab2d8d60dab26e8cad85b25d795b14603a0dcb627b78b9d30b6454b"
+"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
-"checksum serde 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "386122ba68c214599c44587e0c0b411e8d90894503a95425b4f9508e4317901f"
-"checksum serde_derive 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "ec0bfa6c5784e7d110514448da0e1dbad41ea5514c3e68be755b23858b83a399"
-"checksum serde_derive_internals 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "730fe9f29fe8db69a601837f416e46cba07792031ed6b27557a43e49d62d89ae"
+"checksum serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "db99f3919e20faa51bb2996057f5031d8685019b5a06139b1ce761da671b8526"
+"checksum serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "f4ba7591cfe93755e89eeecdbcc668885624829b020050e6aec99c2a03bd3fd0"
+"checksum serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e03f1c9530c3fb0a0a5c9b826bdd9246a5921ae995d75f512ac917fc4dd55b5"
"checksum serde_ignored 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "190e9765dcedb56be63b6e0993a006c7e3b071a016a304736e4a315dc01fb142"
-"checksum serde_json 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7cf5b0b5b4bd22eeecb7e01ac2e1225c7ef5e4272b79ee28a8392a8c8489c839"
+"checksum serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c9db7266c7d63a4c4b7fe8719656ccdd51acf1bed6124b174f933b009fb10bcb"
"checksum shared_child 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "099b38928dbe4a0a01fcd8c233183072f14a7d126a34bed05880869be66e14cc"
"checksum shell-escape 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dd5cc96481d54583947bfe88bf30c23d53f883c6cd0145368b69989d97b84ef8"
"checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537"
"checksum smallvec 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4f8266519bc1d17d0b5b16f6c21295625d562841c708f6376f49028a43e9c11e"
"checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9"
-"checksum socket2 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "36b4896961171cd3317c7e9603d88f379f8c6e45342212235d356496680c68fd"
+"checksum socket2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf5d5aa364bf61a0d744a293da20381617b6445b89eb524800fab857c5aed2d8"
"checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
"checksum string_cache 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "413fc7852aeeb5472f1986ef755f561ddf0c789d3d796e65f0b6fe293ecd4ef8"
"checksum string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "479cde50c3539481f33906a387f2bd17c8e87cb848c35b6021d41fb81ff9b4d7"
"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff"
+"checksum walkdir 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b6d201f4f8998a837196b6de9c73e35af14c992cbb92c4ab641d2c2dce52de"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
+"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
+"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
"checksum wincolor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a39ee4464208f6430992ff20154216ab2357772ac871d994c51628d60e58b8b0"
"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
"checksum xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "5f04de8a1346489a2f9e9bd8526b73d135ec554227b17568456e86aa35b6f3fc"
-"checksum xz2 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e9510bdf100731599107c61f77daf46713a69a568f75458999c1f9dbf6ba25b0"
+"checksum xz2 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "98df591c3504d014dd791d998123ed00a476c7e26dc6b2e873cb55c6ac9e59fa"
"checksum yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992"
debug = false
debug-assertions = false
+# We want the RLS to use the version of Cargo that we've got vendored in this
+# repository to ensure that the same exact version of Cargo is used by both the
+# RLS and the Cargo binary itself. The RLS depends on Cargo as a git repository
+# so we use a `[patch]` here to override the github repository with our local
+# vendored copy.
[patch."https://github.com/rust-lang/cargo"]
cargo = { path = "tools/cargo" }
[patch.crates-io]
+# Similar to Cargo above we want the RLS to use a vendored version of `rustfmt`
+# that we're shipping as well (to ensure that the rustfmt in RLS and the
+# `rustfmt` executable are the same exact vesion). Unlike Cargo, however, the
+# RLS depends on `rustfmt` from crates.io, so we put this in a `[patch]` section
+# for crates.io
rustfmt-nightly = { path = "tools/rustfmt" }
with open(self.rustc_stamp(), 'w') as rust_stamp:
rust_stamp.write(self.date)
- if "pc-windows-gnu" in self.build:
- filename = "rust-mingw-{}-{}.tar.gz".format(
- rustc_channel, self.build)
- self._download_stage0_helper(filename, "rust-mingw")
-
if self.cargo().startswith(self.bin_root()) and \
(not os.path.exists(self.cargo()) or
self.program_out_of_date(self.cargo_stamp())):
Kind::Test => describe!(check::Tidy, check::Bootstrap, check::DefaultCompiletest,
check::HostCompiletest, check::Crate, check::CrateLibrustc, check::Rustdoc,
check::Linkcheck, check::Cargotest, check::Cargo, check::Rls, check::Docs,
- check::ErrorIndex, check::Distcheck, check::Rustfmt, check::Miri, check::Clippy),
+ check::ErrorIndex, check::Distcheck, check::Rustfmt, check::Miri, check::Clippy,
+ check::RustdocJS),
+
Kind::Bench => describe!(check::Crate, check::CrateLibrustc),
Kind::Doc => describe!(doc::UnstableBook, doc::UnstableBookGen, doc::TheBook,
doc::Standalone, doc::Std, doc::Test, doc::Rustc, doc::ErrorIndex, doc::Nomicon,
let out_dir = self.stage_out(compiler, mode);
cargo.env("CARGO_TARGET_DIR", out_dir)
.arg(cmd)
- .arg("--target").arg(target);
+ .arg("--target")
+ .arg(target);
// If we were invoked from `make` then that's already got a jobserver
// set up for us so no need to tell Cargo about jobs all over again.
// Set this for all builds to make sure doc builds also get it.
cargo.env("CFG_RELEASE_CHANNEL", &self.build.config.channel);
+ // This one's a bit tricky. As of the time of this writing the compiler
+ // links to the `winapi` crate on crates.io. This crate provides raw
+ // bindings to Windows system functions, sort of like libc does for
+ // Unix. This crate also, however, provides "import libraries" for the
+ // MinGW targets. There's an import library per dll in the windows
+ // distribution which is what's linked to. These custom import libraries
+ // are used because the winapi crate can reference Windows functions not
+ // present in the MinGW import libraries.
+ //
+ // For example MinGW may ship libdbghelp.a, but it may not have
+ // references to all the functions in the dbghelp dll. Instead the
+ // custom import library for dbghelp in the winapi crates has all this
+ // information.
+ //
+ // Unfortunately for us though the import libraries are linked by
+ // default via `-ldylib=winapi_foo`. That is, they're linked with the
+ // `dylib` type with a `winapi_` prefix (so the winapi ones don't
+ // conflict with the system MinGW ones). This consequently means that
+ // the binaries we ship of things like rustc_trans (aka the rustc_trans
+ // DLL) when linked against *again*, for example with procedural macros
+ // or plugins, will trigger the propagation logic of `-ldylib`, passing
+ // `-lwinapi_foo` to the linker again. This isn't actually available in
+ // our distribution, however, so the link fails.
+ //
+ // To solve this problem we tell winapi to not use its bundled import
+ // libraries. This means that it will link to the system MinGW import
+ // libraries by default, and the `-ldylib=foo` directives will still get
+ // passed to the final linker, but they'll look like `-lfoo` which can
+ // be resolved because MinGW has the import library. The downside is we
+ // don't get newer functions from Windows, but we don't use any of them
+ // anyway.
+ cargo.env("WINAPI_NO_BUNDLED_LIBRARIES", "1");
+
if self.is_very_verbose() {
cargo.arg("-v");
}
env::join_paths(iter::once(path).chain(env::split_paths(&old_path))).expect("")
}
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct RustdocJS {
+ pub host: Interned<String>,
+ pub target: Interned<String>,
+}
+
+impl Step for RustdocJS {
+ type Output = ();
+ const DEFAULT: bool = true;
+ const ONLY_HOSTS: bool = true;
+
+ fn should_run(run: ShouldRun) -> ShouldRun {
+ run.path("src/test/rustdoc-js")
+ }
+
+ fn make_run(run: RunConfig) {
+ run.builder.ensure(RustdocJS {
+ host: run.host,
+ target: run.target,
+ });
+ }
+
+ fn run(self, builder: &Builder) {
+ if let Some(ref nodejs) = builder.config.nodejs {
+ let mut command = Command::new(nodejs);
+ command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
+ builder.ensure(::doc::Std {
+ target: self.target,
+ stage: builder.top_stage,
+ });
+ builder.run(&mut command);
+ } else {
+ println!("No nodejs found, skipping \"src/test/rustdoc-js\" tests");
+ }
+ }
+}
+
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct Tidy {
host: Interned<String>,
mode: "compile-fail",
suite: "compile-fail-fulldeps",
},
+ Test {
+ path: "src/test/incremental-fulldeps",
+ mode: "incremental",
+ suite: "incremental-fulldeps",
+ },
Test { path: "src/test/run-make", mode: "run-make", suite: "run-make" },
Test { path: "src/test/rustdoc", mode: "rustdoc", suite: "rustdoc" },
"libwinspool.a",
"libws2_32.a",
"libwsock32.a",
+ "libdbghelp.a",
+ "libmsimg32.a",
];
//Find mingw artifacts we want to bundle
let target = self.target;
let name = self.name;
- let src = build.src.join("src/tools/cargo/src/doc/book");
+ let src = build.src.join("src/tools/cargo/src/doc");
let out = build.doc_out(target);
t!(fs::create_dir_all(&out));
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Std {
- stage: u32,
- target: Interned<String>,
+ pub stage: u32,
+ pub target: Interned<String>,
}
impl Step for Std {
-FROM ubuntu:16.04
+FROM ubuntu:17.10
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh
RUN add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2-testing main'
WORKDIR /tmp
-COPY dist-various-2/shared.sh dist-various-2/build-fuchsia-toolchain.sh /tmp/
-COPY dist-various-2/build-solaris-toolchain.sh /tmp/
+COPY dist-various-2/shared.sh /tmp/
+COPY dist-various-2/build-cloudabi-toolchain.sh /tmp/
+RUN /tmp/build-cloudabi-toolchain.sh x86_64-unknown-cloudabi
+COPY dist-various-2/build-fuchsia-toolchain.sh /tmp/
RUN /tmp/build-fuchsia-toolchain.sh
+COPY dist-various-2/build-solaris-toolchain.sh /tmp/
RUN /tmp/build-solaris-toolchain.sh x86_64 amd64 solaris-i386
RUN /tmp/build-solaris-toolchain.sh sparcv9 sparcv9 solaris-sparc
CC_x86_64_sun_solaris=x86_64-sun-solaris2.10-gcc \
CXX_x86_64_sun_solaris=x86_64-sun-solaris2.10-g++
+# FIXME(EdSchouten): Remove this once cc ≥1.0.4 has been merged. It can
+# automatically pick the right compiler path.
+ENV \
+ AR_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-ar \
+ CC_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-clang \
+ CXX_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-clang++
+
ENV TARGETS=x86_64-unknown-fuchsia
ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia
ENV TARGETS=$TARGETS,sparcv9-sun-solaris
ENV TARGETS=$TARGETS,wasm32-unknown-unknown
ENV TARGETS=$TARGETS,x86_64-sun-solaris
ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32
+ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi
ENV RUST_CONFIGURE_ARGS --target=$TARGETS --enable-extended
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
--- /dev/null
+#!/bin/bash
+# Copyright 2018 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.
+
+set -eux
+
+# Install prerequisites.
+apt-get update
+apt-get install -y --no-install-recommends \
+ apt-transport-https \
+ ca-certificates \
+ clang-5.0 \
+ cmake \
+ curl \
+ file \
+ g++ \
+ gdb \
+ git \
+ lld-5.0 \
+ make \
+ python \
+ sudo \
+ xz-utils
+
+# Set up a Clang-based cross compiler toolchain.
+# Based on the steps described at https://nuxi.nl/cloudabi/debian/
+target=$1
+for tool in ar nm objdump ranlib size; do
+ ln -s ../lib/llvm-5.0/bin/llvm-${tool} /usr/bin/${target}-${tool}
+done
+ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-cc
+ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-c++
+ln -s ../lib/llvm-5.0/bin/lld /usr/bin/${target}-ld
+ln -s ../../${target} /usr/lib/llvm-5.0/${target}
+
+# FIXME(EdSchouten): Remove this once cc ≥1.0.4 has been merged. It
+# can make use of ${target}-cc and ${target}-c++, without incorrectly
+# assuming it's MSVC.
+ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-clang
+ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-clang++
+
+# Install the C++ runtime libraries from CloudABI Ports.
+echo deb https://nuxi.nl/distfiles/cloudabi-ports/debian/ cloudabi cloudabi > \
+ /etc/apt/sources.list.d/cloudabi.list
+curl 'https://pgp.mit.edu/pks/lookup?op=get&search=0x0DA51B8531344B15' | \
+ apt-key add -
+apt-get update
+apt-get install -y $(echo ${target} | sed -e s/_/-/g)-cxx-runtime
nicknamed 'The Rust Bookshelf.'
* [The Rust Programming Language][book] teaches you how to program in Rust.
+* [Rust By Example][rbe] teaches you how to program in Rust using editable examples.
* [The Cargo Book][cargo-book] is a guide to Cargo, Rust's build tool and dependency manager.
* [The Unstable Book][unstable-book] has documentation for unstable features.
* [The Rustonomicon][nomicon] is your guidebook to the dark arts of unsafe Rust.
[refchecklist]: https://github.com/rust-lang-nursery/reference/issues/9
[err]: error-index.html
[book]: book/index.html
+[rbe]: rust-by-example/index.html
[nomicon]: nomicon/index.html
[unstable-book]: unstable-book/index.html
[rustdoc-book]: rustdoc/index.html
-Subproject commit 2f7b05fd5939aa49d52c4ab309b9a47776ba7bd8
+Subproject commit fec3182d0b0a3cf8122e192b3270064a5b19be5b
# The `#[doc]` attribute
The `#[doc]` attribute lets you control various aspects of how `rustdoc` does
-its job.
+its job.
The most basic function of `#[doc]` is to handle the actual documentation
text. That is, `///` is syntax sugar for `#[doc]`. This means that these two
}
```
-The documentation will generate a "Reexports" section, and say `pub use bar::Bar;`, where
+The documentation will generate a "Re-exports" section, and say `pub use bar::Bar;`, where
`Bar` is a link to its page.
If we change the `use` line like this:
}
```
-Now we'll have a `Reexports` line, and `Bar` will not link to anywhere.
+Now we'll have a `Re-exports` line, and `Bar` will not link to anywhere.
## `#[doc(hidden)]`
use core::fmt;
use core::mem;
use core::usize;
-use core::ptr::{self, Unique};
+use core::ptr::{self, NonNull};
/// Represents the combination of a starting address and
/// a total capacity of the returned block.
/// Clients wishing to abort computation in response to an
/// allocation error are encouraged to call the allocator's `oom`
/// method, rather than directly invoking `panic!` or similar.
- fn alloc_one<T>(&mut self) -> Result<Unique<T>, AllocErr>
+ fn alloc_one<T>(&mut self) -> Result<NonNull<T>, AllocErr>
where Self: Sized
{
let k = Layout::new::<T>();
if k.size() > 0 {
- unsafe { self.alloc(k).map(|p| Unique::new_unchecked(p as *mut T)) }
+ unsafe { self.alloc(k).map(|p| NonNull::new_unchecked(p as *mut T)) }
} else {
Err(AllocErr::invalid_input("zero-sized type invalid for alloc_one"))
}
/// * `ptr` must denote a block of memory currently allocated via this allocator
///
/// * the layout of `T` must *fit* that block of memory.
- unsafe fn dealloc_one<T>(&mut self, ptr: Unique<T>)
+ unsafe fn dealloc_one<T>(&mut self, ptr: NonNull<T>)
where Self: Sized
{
let raw_ptr = ptr.as_ptr() as *mut u8;
/// Clients wishing to abort computation in response to an
/// allocation error are encouraged to call the allocator's `oom`
/// method, rather than directly invoking `panic!` or similar.
- fn alloc_array<T>(&mut self, n: usize) -> Result<Unique<T>, AllocErr>
+ fn alloc_array<T>(&mut self, n: usize) -> Result<NonNull<T>, AllocErr>
where Self: Sized
{
match Layout::array::<T>(n) {
unsafe {
self.alloc(layout.clone())
.map(|p| {
- Unique::new_unchecked(p as *mut T)
+ NonNull::new_unchecked(p as *mut T)
})
}
}
/// reallocation error are encouraged to call the allocator's `oom`
/// method, rather than directly invoking `panic!` or similar.
unsafe fn realloc_array<T>(&mut self,
- ptr: Unique<T>,
+ ptr: NonNull<T>,
n_old: usize,
- n_new: usize) -> Result<Unique<T>, AllocErr>
+ n_new: usize) -> Result<NonNull<T>, AllocErr>
where Self: Sized
{
match (Layout::array::<T>(n_old), Layout::array::<T>(n_new), ptr.as_ptr()) {
(Some(ref k_old), Some(ref k_new), ptr) if k_old.size() > 0 && k_new.size() > 0 => {
self.realloc(ptr as *mut u8, k_old.clone(), k_new.clone())
- .map(|p|Unique::new_unchecked(p as *mut T))
+ .map(|p| NonNull::new_unchecked(p as *mut T))
}
_ => {
Err(AllocErr::invalid_input("invalid layout for realloc_array"))
/// constraints.
///
/// Always returns `Err` on arithmetic overflow.
- unsafe fn dealloc_array<T>(&mut self, ptr: Unique<T>, n: usize) -> Result<(), AllocErr>
+ unsafe fn dealloc_array<T>(&mut self, ptr: NonNull<T>, n: usize) -> Result<(), AllocErr>
where Self: Sized
{
let raw_ptr = ptr.as_ptr() as *mut u8;
use core::mem::{self, align_of_val, size_of_val, uninitialized};
use core::ops::Deref;
use core::ops::CoerceUnsized;
-use core::ptr::{self, Shared};
+use core::ptr::{self, NonNull};
use core::marker::{Unsize, PhantomData};
use core::hash::{Hash, Hasher};
use core::{isize, usize};
/// [rc_examples]: ../../std/rc/index.html#examples
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Arc<T: ?Sized> {
- ptr: Shared<ArcInner<T>>,
+ ptr: NonNull<ArcInner<T>>,
phantom: PhantomData<T>,
}
/// [`None`]: ../../std/option/enum.Option.html#variant.None
#[stable(feature = "arc_weak", since = "1.4.0")]
pub struct Weak<T: ?Sized> {
- ptr: Shared<ArcInner<T>>,
+ ptr: NonNull<ArcInner<T>>,
}
#[stable(feature = "arc_weak", since = "1.4.0")]
weak: atomic::AtomicUsize::new(1),
data,
};
- Arc { ptr: Shared::from(Box::into_unique(x)), phantom: PhantomData }
+ Arc { ptr: Box::into_raw_non_null(x), phantom: PhantomData }
}
/// Returns the contained value, if the `Arc` has exactly one strong reference.
let arc_ptr = set_data_ptr(fake_ptr, (ptr as *mut u8).offset(-offset));
Arc {
- ptr: Shared::new_unchecked(arc_ptr),
+ ptr: NonNull::new_unchecked(arc_ptr),
phantom: PhantomData,
}
}
// Free the allocation without dropping its contents
box_free(bptr);
- Arc { ptr: Shared::new_unchecked(ptr), phantom: PhantomData }
+ Arc { ptr: NonNull::new_unchecked(ptr), phantom: PhantomData }
}
}
}
&mut (*ptr).data as *mut [T] as *mut T,
v.len());
- Arc { ptr: Shared::new_unchecked(ptr), phantom: PhantomData }
+ Arc { ptr: NonNull::new_unchecked(ptr), phantom: PhantomData }
}
}
// All clear. Forget the guard so it doesn't free the new ArcInner.
mem::forget(guard);
- Arc { ptr: Shared::new_unchecked(ptr), phantom: PhantomData }
+ Arc { ptr: NonNull::new_unchecked(ptr), phantom: PhantomData }
}
}
}
pub fn new() -> Weak<T> {
unsafe {
Weak {
- ptr: Shared::from(Box::into_unique(box ArcInner {
+ ptr: Box::into_raw_non_null(box ArcInner {
strong: atomic::AtomicUsize::new(0),
weak: atomic::AtomicUsize::new(1),
data: uninitialized(),
- })),
+ }),
}
}
}
use core::mem;
use core::ops::{CoerceUnsized, Deref, DerefMut, Generator, GeneratorState};
use core::ops::{BoxPlace, Boxed, InPlace, Place, Placer};
-use core::ptr::{self, Unique};
+use core::ptr::{self, NonNull, Unique};
use core::convert::From;
use str::from_boxed_utf8_unchecked;
#[stable(feature = "box_raw", since = "1.4.0")]
#[inline]
pub unsafe fn from_raw(raw: *mut T) -> Self {
- Box::from_unique(Unique::new_unchecked(raw))
- }
-
- /// Constructs a `Box` from a `Unique<T>` pointer.
- ///
- /// After calling this function, the memory is owned by a `Box` and `T` can
- /// then be destroyed and released upon drop.
- ///
- /// # Safety
- ///
- /// A `Unique<T>` can be safely created via [`Unique::new`] and thus doesn't
- /// necessarily own the data pointed to nor is the data guaranteed to live
- /// as long as the pointer.
- ///
- /// [`Unique::new`]: ../../core/ptr/struct.Unique.html#method.new
- ///
- /// # Examples
- ///
- /// ```
- /// #![feature(unique)]
- ///
- /// fn main() {
- /// let x = Box::new(5);
- /// let ptr = Box::into_unique(x);
- /// let x = unsafe { Box::from_unique(ptr) };
- /// }
- /// ```
- #[unstable(feature = "unique", reason = "needs an RFC to flesh out design",
- issue = "27730")]
- #[inline]
- pub unsafe fn from_unique(u: Unique<T>) -> Self {
- Box(u)
+ Box(Unique::new_unchecked(raw))
}
/// Consumes the `Box`, returning the wrapped raw pointer.
#[stable(feature = "box_raw", since = "1.4.0")]
#[inline]
pub fn into_raw(b: Box<T>) -> *mut T {
- Box::into_unique(b).as_ptr()
+ Box::into_raw_non_null(b).as_ptr()
}
- /// Consumes the `Box`, returning the wrapped pointer as `Unique<T>`.
+ /// Consumes the `Box`, returning the wrapped pointer as `NonNull<T>`.
///
/// After calling this function, the caller is responsible for the
/// memory previously managed by the `Box`. In particular, the
/// caller should properly destroy `T` and release the memory. The
- /// proper way to do so is to either convert the `Unique<T>` pointer:
- ///
- /// - Into a `Box` with the [`Box::from_unique`] function.
- ///
- /// - Into a raw pointer and back into a `Box` with the [`Box::from_raw`]
- /// function.
+ /// proper way to do so is to convert the `NonNull<T>` pointer
+ /// into a raw pointer and back into a `Box` with the [`Box::from_raw`]
+ /// function.
///
/// Note: this is an associated function, which means that you have
- /// to call it as `Box::into_unique(b)` instead of `b.into_unique()`. This
+ /// to call it as `Box::into_raw_non_null(b)`
+ /// instead of `b.into_raw_non_null()`. This
/// is so that there is no conflict with a method on the inner type.
///
- /// [`Box::from_unique`]: struct.Box.html#method.from_unique
/// [`Box::from_raw`]: struct.Box.html#method.from_raw
///
/// # Examples
///
/// ```
- /// #![feature(unique)]
+ /// #![feature(box_into_raw_non_null)]
///
/// fn main() {
/// let x = Box::new(5);
- /// let ptr = Box::into_unique(x);
+ /// let ptr = Box::into_raw_non_null(x);
/// }
/// ```
- #[unstable(feature = "unique", reason = "needs an RFC to flesh out design",
- issue = "27730")]
+ #[unstable(feature = "box_into_raw_non_null", issue = "47336")]
+ #[inline]
+ pub fn into_raw_non_null(b: Box<T>) -> NonNull<T> {
+ Box::into_unique(b).into()
+ }
+
+ #[unstable(feature = "ptr_internals", issue = "0", reason = "use into_raw_non_null instead")]
#[inline]
pub fn into_unique(b: Box<T>) -> Unique<T> {
let unique = b.0;
///
/// This preserves the non-null invariant for types like `Box<T>`. The address
/// may overlap with non-zero-size memory allocations.
-#[rustc_deprecated(since = "1.19", reason = "Use Unique/Shared::empty() instead")]
+#[rustc_deprecated(since = "1.19", reason = "Use Unique/NonNull::empty() instead")]
#[unstable(feature = "heap_api", issue = "27700")]
pub const EMPTY: *mut () = 1 as *mut ();
//!
//! This library, like libcore, is not intended for general usage, but rather as
//! a building block of other libraries. The types and interfaces in this
-//! library are reexported through the [standard library](../std/index.html),
+//! library are re-exported through the [standard library](../std/index.html),
//! and should not be used through this library.
//!
//! ## Boxed values
//! ## Collections
//!
//! Implementations of the most common general purpose data structures are
-//! defined in this library. They are reexported through the
+//! defined in this library. They are re-exported through the
//! [standard collections library](../std/collections/index.html).
//!
//! ## Heap interfaces
#![cfg_attr(test, feature(rand, test))]
#![feature(allow_internal_unstable)]
#![feature(ascii_ctype)]
+#![feature(box_into_raw_non_null)]
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(cfg_target_has_atomic)]
#![feature(pattern)]
#![feature(placement_in_syntax)]
#![feature(placement_new_protocol)]
+#![feature(ptr_internals)]
#![feature(rustc_attrs)]
-#![feature(shared)]
#![feature(slice_get_slice)]
#![feature(slice_patterns)]
#![feature(slice_rsplit)]
#![feature(trusted_len)]
#![feature(unboxed_closures)]
#![feature(unicode)]
-#![feature(unique)]
#![feature(unsize)]
#![feature(allocator_internals)]
#![feature(on_unimplemented)]
use core::marker::PhantomData;
use core::mem;
use core::ops::{BoxPlace, InPlace, Place, Placer};
-use core::ptr::{self, Shared};
+use core::ptr::{self, NonNull};
use boxed::{Box, IntermediateBox};
use super::SpecExtend;
/// more memory efficient and make better use of CPU cache.
#[stable(feature = "rust1", since = "1.0.0")]
pub struct LinkedList<T> {
- head: Option<Shared<Node<T>>>,
- tail: Option<Shared<Node<T>>>,
+ head: Option<NonNull<Node<T>>>,
+ tail: Option<NonNull<Node<T>>>,
len: usize,
marker: PhantomData<Box<Node<T>>>,
}
struct Node<T> {
- next: Option<Shared<Node<T>>>,
- prev: Option<Shared<Node<T>>>,
+ next: Option<NonNull<Node<T>>>,
+ prev: Option<NonNull<Node<T>>>,
element: T,
}
/// [`LinkedList`]: struct.LinkedList.html
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Iter<'a, T: 'a> {
- head: Option<Shared<Node<T>>>,
- tail: Option<Shared<Node<T>>>,
+ head: Option<NonNull<Node<T>>>,
+ tail: Option<NonNull<Node<T>>>,
len: usize,
marker: PhantomData<&'a Node<T>>,
}
#[stable(feature = "rust1", since = "1.0.0")]
pub struct IterMut<'a, T: 'a> {
list: &'a mut LinkedList<T>,
- head: Option<Shared<Node<T>>>,
- tail: Option<Shared<Node<T>>>,
+ head: Option<NonNull<Node<T>>>,
+ tail: Option<NonNull<Node<T>>>,
len: usize,
}
unsafe {
node.next = self.head;
node.prev = None;
- let node = Some(Shared::from(Box::into_unique(node)));
+ let node = Some(Box::into_raw_non_null(node));
match self.head {
None => self.tail = node,
unsafe {
node.next = None;
node.prev = self.tail;
- let node = Some(Shared::from(Box::into_unique(node)));
+ let node = Some(Box::into_raw_non_null(node));
match self.tail {
None => self.head = node,
///
/// Warning: this will not check that the provided node belongs to the current list.
#[inline]
- unsafe fn unlink_node(&mut self, mut node: Shared<Node<T>>) {
+ unsafe fn unlink_node(&mut self, mut node: NonNull<Node<T>>) {
let node = node.as_mut();
match node.prev {
Some(prev) => prev,
};
- let node = Some(Shared::from(Box::into_unique(box Node {
+ let node = Some(Box::into_raw_non_null(box Node {
next: Some(head),
prev: Some(prev),
element,
- })));
+ }));
prev.as_mut().next = node;
head.as_mut().prev = node;
where F: FnMut(&mut T) -> bool,
{
list: &'a mut LinkedList<T>,
- it: Option<Shared<Node<T>>>,
+ it: Option<NonNull<Node<T>>>,
pred: F,
idx: usize,
old_len: usize,
// would cause overflow
let new_cap = if elem_size > (!0) / 8 { 1 } else { 4 };
match self.a.alloc_array::<T>(new_cap) {
- Ok(ptr) => (new_cap, ptr),
+ Ok(ptr) => (new_cap, ptr.into()),
Err(e) => self.a.oom(e),
}
}
use core::mem::{self, align_of_val, forget, size_of_val, uninitialized};
use core::ops::Deref;
use core::ops::CoerceUnsized;
-use core::ptr::{self, Shared};
+use core::ptr::{self, NonNull};
use core::convert::From;
use heap::{Heap, Alloc, Layout, box_free};
/// [get_mut]: #method.get_mut
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Rc<T: ?Sized> {
- ptr: Shared<RcBox<T>>,
+ ptr: NonNull<RcBox<T>>,
phantom: PhantomData<T>,
}
// pointers, which ensures that the weak destructor never frees
// the allocation while the strong destructor is running, even
// if the weak pointer is stored inside the strong one.
- ptr: Shared::from(Box::into_unique(box RcBox {
+ ptr: Box::into_raw_non_null(box RcBox {
strong: Cell::new(1),
weak: Cell::new(1),
value,
- })),
+ }),
phantom: PhantomData,
}
}
let rc_ptr = set_data_ptr(fake_ptr, (ptr as *mut u8).offset(-offset));
Rc {
- ptr: Shared::new_unchecked(rc_ptr),
+ ptr: NonNull::new_unchecked(rc_ptr),
phantom: PhantomData,
}
}
let raw: *const RcBox<Any> = self.ptr.as_ptr();
forget(self);
Ok(Rc {
- ptr: Shared::new_unchecked(raw as *const RcBox<T> as *mut _),
+ ptr: NonNull::new_unchecked(raw as *const RcBox<T> as *mut _),
phantom: PhantomData,
})
}
// Free the allocation without dropping its contents
box_free(bptr);
- Rc { ptr: Shared::new_unchecked(ptr), phantom: PhantomData }
+ Rc { ptr: NonNull::new_unchecked(ptr), phantom: PhantomData }
}
}
}
&mut (*ptr).value as *mut [T] as *mut T,
v.len());
- Rc { ptr: Shared::new_unchecked(ptr), phantom: PhantomData }
+ Rc { ptr: NonNull::new_unchecked(ptr), phantom: PhantomData }
}
}
// All clear. Forget the guard so it doesn't free the new RcBox.
forget(guard);
- Rc { ptr: Shared::new_unchecked(ptr), phantom: PhantomData }
+ Rc { ptr: NonNull::new_unchecked(ptr), phantom: PhantomData }
}
}
}
/// [`None`]: ../../std/option/enum.Option.html#variant.None
#[stable(feature = "rc_weak", since = "1.4.0")]
pub struct Weak<T: ?Sized> {
- ptr: Shared<RcBox<T>>,
+ ptr: NonNull<RcBox<T>>,
}
#[stable(feature = "rc_weak", since = "1.4.0")]
pub fn new() -> Weak<T> {
unsafe {
Weak {
- ptr: Shared::from(Box::into_unique(box RcBox {
+ ptr: Box::into_raw_non_null(box RcBox {
strong: Cell::new(0),
weak: Cell::new(1),
value: uninitialized(),
- })),
+ }),
}
}
}
use core::ops::{InPlace, Index, IndexMut, Place, Placer};
use core::ops;
use core::ptr;
-use core::ptr::Shared;
+use core::ptr::NonNull;
use core::slice;
use borrow::ToOwned;
tail_start: end,
tail_len: len - end,
iter: range_slice.iter(),
- vec: Shared::from(self),
+ vec: NonNull::from(self),
}
}
}
let cap = self.buf.cap();
mem::forget(self);
IntoIter {
- buf: Shared::new_unchecked(begin),
+ buf: NonNull::new_unchecked(begin),
phantom: PhantomData,
cap,
ptr: begin,
/// [`IntoIterator`]: ../../std/iter/trait.IntoIterator.html
#[stable(feature = "rust1", since = "1.0.0")]
pub struct IntoIter<T> {
- buf: Shared<T>,
+ buf: NonNull<T>,
phantom: PhantomData<T>,
cap: usize,
ptr: *const T,
tail_len: usize,
/// Current remaining range to remove
iter: slice::Iter<'a, T>,
- vec: Shared<Vec<T>>,
+ vec: NonNull<Vec<T>>,
}
#[stable(feature = "collection_debug", since = "1.17.0")]
use core::mem;
use core::ops::{Index, IndexMut, Place, Placer, InPlace};
use core::ptr;
-use core::ptr::Shared;
+use core::ptr::NonNull;
use core::slice;
use core::hash::{Hash, Hasher};
self.head = drain_tail;
Drain {
- deque: Shared::from(&mut *self),
+ deque: NonNull::from(&mut *self),
after_tail: drain_head,
after_head: head,
iter: Iter {
after_tail: usize,
after_head: usize,
iter: Iter<'a, T>,
- deque: Shared<VecDeque<T>>,
+ deque: NonNull<VecDeque<T>>,
}
#[stable(feature = "collection_debug", since = "1.17.0")]
if other.is_contiguous() {
ptr::copy(buf.offset(tail as isize), buf, len);
} else {
- if (tail - head) >= cmp::min((cap - tail), head) {
+ if (tail - head) >= cmp::min(cap - tail, head) {
// There is enough free space in the centre for the shortest block so we can
// do this in at most three copy moves.
if (cap - tail) > head {
}
/// Applies a function to the contained value (if any),
- /// or returns a [`default`][] (if not).
- ///
- /// [`default`]: ../default/trait.Default.html#tymethod.default
+ /// or returns the provided default (if not).
///
/// # Examples
///
}
/// Applies a function to the contained value (if any),
- /// or computes a [`default`][] (if not).
- ///
- /// [`default`]: ../default/trait.Default.html#tymethod.default
+ /// or computes a default (if not).
///
/// # Examples
///
/// Returns the contained value or a default
///
/// Consumes the `self` argument then, if [`Some`], returns the contained
- /// value, otherwise if [`None`], returns the default value for that
+ /// value, otherwise if [`None`], returns the [default value] for that
/// type.
///
/// # Examples
///
/// [`Some`]: #variant.Some
/// [`None`]: #variant.None
+ /// [default value]: ../default/trait.Default.html#tymethod.default
/// [`parse`]: ../../std/primitive.str.html#method.parse
/// [`FromStr`]: ../../std/str/trait.FromStr.html
#[inline]
}
}
+impl<T, E> Option<Result<T, E>> {
+ /// Transposes an `Option` of a `Result` into a `Result` of an `Option`.
+ ///
+ /// `None` will be mapped to `Ok(None)`.
+ /// `Some(Ok(_))` and `Some(Err(_))` will be mapped to `Ok(Some(_))` and `Err(_)`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// #![feature(transpose_result)]
+ ///
+ /// #[derive(Debug, Eq, PartialEq)]
+ /// struct SomeErr;
+ ///
+ /// let x: Result<Option<i32>, SomeErr> = Ok(Some(5));
+ /// let y: Option<Result<i32, SomeErr>> = Some(Ok(5));
+ /// assert_eq!(x, y.transpose());
+ /// ```
+ #[inline]
+ #[unstable(feature = "transpose_result", issue = "47338")]
+ pub fn transpose(self) -> Result<Option<T>, E> {
+ match self {
+ Some(Ok(x)) => Ok(Some(x)),
+ Some(Err(e)) => Err(e),
+ None => Ok(None),
+ }
+ }
+}
+
// This is a separate function to reduce the code size of .expect() itself.
#[inline(never)]
#[cold]
#![stable(feature = "core_prelude", since = "1.4.0")]
-// Reexported core operators
+// Re-exported core operators
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use marker::{Copy, Send, Sized, Sync};
#[doc(no_inline)]
pub use ops::{Drop, Fn, FnMut, FnOnce};
-// Reexported functions
+// Re-exported functions
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use mem::drop;
-// Reexported types and traits
+// Re-exported types and traits
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use clone::Clone;
#[doc(no_inline)]
pub use result::Result::{self, Ok, Err};
-// Reexported extension traits for primitive types
+// Re-exported extension traits for primitive types
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use slice::SliceExt;
/// its owning Unique.
///
/// If you're uncertain of whether it's correct to use `Unique` for your purposes,
-/// consider using `Shared`, which has weaker semantics.
+/// consider using `NonNull`, which has weaker semantics.
///
/// Unlike `*mut T`, the pointer must always be non-null, even if the pointer
/// is never dereferenced. This is so that enums may use this forbidden value
///
/// Unlike `*mut T`, `Unique<T>` is covariant over `T`. This should always be correct
/// for any type which upholds Unique's aliasing requirements.
-#[allow(missing_debug_implementations)]
-#[unstable(feature = "unique", reason = "needs an RFC to flesh out design",
- issue = "27730")]
+#[unstable(feature = "ptr_internals", issue = "0",
+ reason = "use NonNull instead and consider PhantomData<T> \
+ (if you also use #[may_dangle]), Send, and/or Sync")]
pub struct Unique<T: ?Sized> {
pointer: NonZero<*const T>,
// NOTE: this marker has no consequences for variance, but is necessary
_marker: PhantomData<T>,
}
+#[unstable(feature = "ptr_internals", issue = "0")]
+impl<T: ?Sized> fmt::Debug for Unique<T> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fmt::Pointer::fmt(&self.as_ptr(), f)
+ }
+}
+
/// `Unique` pointers are `Send` if `T` is `Send` because the data they
/// reference is unaliased. Note that this aliasing invariant is
/// unenforced by the type system; the abstraction using the
/// `Unique` must enforce it.
-#[unstable(feature = "unique", issue = "27730")]
+#[unstable(feature = "ptr_internals", issue = "0")]
unsafe impl<T: Send + ?Sized> Send for Unique<T> { }
/// `Unique` pointers are `Sync` if `T` is `Sync` because the data they
/// reference is unaliased. Note that this aliasing invariant is
/// unenforced by the type system; the abstraction using the
/// `Unique` must enforce it.
-#[unstable(feature = "unique", issue = "27730")]
+#[unstable(feature = "ptr_internals", issue = "0")]
unsafe impl<T: Sync + ?Sized> Sync for Unique<T> { }
-#[unstable(feature = "unique", issue = "27730")]
+#[unstable(feature = "ptr_internals", issue = "0")]
impl<T: Sized> Unique<T> {
/// Creates a new `Unique` that is dangling, but well-aligned.
///
/// This is useful for initializing types which lazily allocate, like
/// `Vec::new` does.
+ // FIXME: rename to dangling() to match NonNull?
pub fn empty() -> Self {
unsafe {
let ptr = mem::align_of::<T>() as *mut T;
}
}
-#[unstable(feature = "unique", issue = "27730")]
+#[unstable(feature = "ptr_internals", issue = "0")]
impl<T: ?Sized> Unique<T> {
/// Creates a new `Unique`.
///
/// # Safety
///
/// `ptr` must be non-null.
- #[unstable(feature = "unique", issue = "27730")]
pub const unsafe fn new_unchecked(ptr: *mut T) -> Self {
Unique { pointer: NonZero::new_unchecked(ptr), _marker: PhantomData }
}
///
/// The resulting lifetime is bound to self so this behaves "as if"
/// it were actually an instance of T that is getting borrowed. If a longer
- /// (unbound) lifetime is needed, use `&*my_ptr.ptr()`.
+ /// (unbound) lifetime is needed, use `&*my_ptr.as_ptr()`.
pub unsafe fn as_ref(&self) -> &T {
&*self.as_ptr()
}
///
/// The resulting lifetime is bound to self so this behaves "as if"
/// it were actually an instance of T that is getting borrowed. If a longer
- /// (unbound) lifetime is needed, use `&mut *my_ptr.ptr()`.
+ /// (unbound) lifetime is needed, use `&mut *my_ptr.as_ptr()`.
pub unsafe fn as_mut(&mut self) -> &mut T {
&mut *self.as_ptr()
}
}
-#[unstable(feature = "unique", issue = "27730")]
+#[unstable(feature = "ptr_internals", issue = "0")]
impl<T: ?Sized> Clone for Unique<T> {
fn clone(&self) -> Self {
*self
}
}
-#[unstable(feature = "unique", issue = "27730")]
+#[unstable(feature = "ptr_internals", issue = "0")]
impl<T: ?Sized> Copy for Unique<T> { }
-#[unstable(feature = "unique", issue = "27730")]
+#[unstable(feature = "ptr_internals", issue = "0")]
impl<T: ?Sized, U: ?Sized> CoerceUnsized<Unique<U>> for Unique<T> where T: Unsize<U> { }
-#[unstable(feature = "unique", issue = "27730")]
+#[unstable(feature = "ptr_internals", issue = "0")]
impl<T: ?Sized> fmt::Pointer for Unique<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Pointer::fmt(&self.as_ptr(), f)
}
}
-#[unstable(feature = "unique", issue = "27730")]
+#[unstable(feature = "ptr_internals", issue = "0")]
impl<'a, T: ?Sized> From<&'a mut T> for Unique<T> {
fn from(reference: &'a mut T) -> Self {
Unique { pointer: NonZero::from(reference), _marker: PhantomData }
}
}
-#[unstable(feature = "unique", issue = "27730")]
+#[unstable(feature = "ptr_internals", issue = "0")]
impl<'a, T: ?Sized> From<&'a T> for Unique<T> {
fn from(reference: &'a T) -> Self {
Unique { pointer: NonZero::from(reference), _marker: PhantomData }
}
}
+#[unstable(feature = "ptr_internals", issue = "0")]
+impl<'a, T: ?Sized> From<NonNull<T>> for Unique<T> {
+ fn from(p: NonNull<T>) -> Self {
+ Unique { pointer: p.pointer, _marker: PhantomData }
+ }
+}
+
+/// Previous name of `NonNull`.
+#[rustc_deprecated(since = "1.24", reason = "renamed to `NonNull`")]
+#[unstable(feature = "shared", issue = "27730")]
+pub type Shared<T> = NonNull<T>;
+
/// `*mut T` but non-zero and covariant.
///
/// This is often the correct thing to use when building data structures using
/// raw pointers, but is ultimately more dangerous to use because of its additional
-/// properties. If you're not sure if you should use `Shared<T>`, just use `*mut T`!
+/// properties. If you're not sure if you should use `NonNull<T>`, just use `*mut T`!
///
/// Unlike `*mut T`, the pointer must always be non-null, even if the pointer
/// is never dereferenced. This is so that enums may use this forbidden value
-/// as a discriminant -- `Option<Shared<T>>` has the same size as `Shared<T>`.
+/// as a discriminant -- `Option<NonNull<T>>` has the same size as `NonNull<T>`.
/// However the pointer may still dangle if it isn't dereferenced.
///
-/// Unlike `*mut T`, `Shared<T>` is covariant over `T`. If this is incorrect
+/// Unlike `*mut T`, `NonNull<T>` is covariant over `T`. If this is incorrect
/// for your use case, you should include some PhantomData in your type to
/// provide invariance, such as `PhantomData<Cell<T>>` or `PhantomData<&'a mut T>`.
/// Usually this won't be necessary; covariance is correct for most safe abstractions,
/// such as Box, Rc, Arc, Vec, and LinkedList. This is the case because they
/// provide a public API that follows the normal shared XOR mutable rules of Rust.
-#[allow(missing_debug_implementations)]
-#[unstable(feature = "shared", reason = "needs an RFC to flesh out design",
- issue = "27730")]
-pub struct Shared<T: ?Sized> {
+#[stable(feature = "nonnull", since = "1.24.0")]
+pub struct NonNull<T: ?Sized> {
pointer: NonZero<*const T>,
}
-/// `Shared` pointers are not `Send` because the data they reference may be aliased.
+#[stable(feature = "nonnull", since = "1.24.0")]
+impl<T: ?Sized> fmt::Debug for NonNull<T> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fmt::Pointer::fmt(&self.as_ptr(), f)
+ }
+}
+
+/// `NonNull` pointers are not `Send` because the data they reference may be aliased.
// NB: This impl is unnecessary, but should provide better error messages.
-#[unstable(feature = "shared", issue = "27730")]
-impl<T: ?Sized> !Send for Shared<T> { }
+#[stable(feature = "nonnull", since = "1.24.0")]
+impl<T: ?Sized> !Send for NonNull<T> { }
-/// `Shared` pointers are not `Sync` because the data they reference may be aliased.
+/// `NonNull` pointers are not `Sync` because the data they reference may be aliased.
// NB: This impl is unnecessary, but should provide better error messages.
-#[unstable(feature = "shared", issue = "27730")]
-impl<T: ?Sized> !Sync for Shared<T> { }
+#[stable(feature = "nonnull", since = "1.24.0")]
+impl<T: ?Sized> !Sync for NonNull<T> { }
-#[unstable(feature = "shared", issue = "27730")]
-impl<T: Sized> Shared<T> {
- /// Creates a new `Shared` that is dangling, but well-aligned.
+impl<T: Sized> NonNull<T> {
+ /// Creates a new `NonNull` that is dangling, but well-aligned.
///
/// This is useful for initializing types which lazily allocate, like
/// `Vec::new` does.
- pub fn empty() -> Self {
+ #[stable(feature = "nonnull", since = "1.24.0")]
+ pub fn dangling() -> Self {
unsafe {
let ptr = mem::align_of::<T>() as *mut T;
- Shared::new_unchecked(ptr)
+ NonNull::new_unchecked(ptr)
}
}
}
-#[unstable(feature = "shared", issue = "27730")]
-impl<T: ?Sized> Shared<T> {
- /// Creates a new `Shared`.
+impl<T: ?Sized> NonNull<T> {
+ /// Creates a new `NonNull`.
///
/// # Safety
///
/// `ptr` must be non-null.
- #[unstable(feature = "shared", issue = "27730")]
+ #[stable(feature = "nonnull", since = "1.24.0")]
pub const unsafe fn new_unchecked(ptr: *mut T) -> Self {
- Shared { pointer: NonZero::new_unchecked(ptr) }
+ NonNull { pointer: NonZero::new_unchecked(ptr) }
}
- /// Creates a new `Shared` if `ptr` is non-null.
+ /// Creates a new `NonNull` if `ptr` is non-null.
+ #[stable(feature = "nonnull", since = "1.24.0")]
pub fn new(ptr: *mut T) -> Option<Self> {
- NonZero::new(ptr as *const T).map(|nz| Shared { pointer: nz })
+ NonZero::new(ptr as *const T).map(|nz| NonNull { pointer: nz })
}
/// Acquires the underlying `*mut` pointer.
+ #[stable(feature = "nonnull", since = "1.24.0")]
pub fn as_ptr(self) -> *mut T {
self.pointer.get() as *mut T
}
///
/// The resulting lifetime is bound to self so this behaves "as if"
/// it were actually an instance of T that is getting borrowed. If a longer
- /// (unbound) lifetime is needed, use `&*my_ptr.ptr()`.
+ /// (unbound) lifetime is needed, use `&*my_ptr.as_ptr()`.
+ #[stable(feature = "nonnull", since = "1.24.0")]
pub unsafe fn as_ref(&self) -> &T {
&*self.as_ptr()
}
///
/// The resulting lifetime is bound to self so this behaves "as if"
/// it were actually an instance of T that is getting borrowed. If a longer
- /// (unbound) lifetime is needed, use `&mut *my_ptr.ptr_mut()`.
+ /// (unbound) lifetime is needed, use `&mut *my_ptr.as_ptr()`.
+ #[stable(feature = "nonnull", since = "1.24.0")]
pub unsafe fn as_mut(&mut self) -> &mut T {
&mut *self.as_ptr()
}
-
- /// Acquires the underlying pointer as a `*mut` pointer.
- #[rustc_deprecated(since = "1.19", reason = "renamed to `as_ptr` for ergonomics/consistency")]
- #[unstable(feature = "shared", issue = "27730")]
- pub unsafe fn as_mut_ptr(&self) -> *mut T {
- self.as_ptr()
- }
}
-#[unstable(feature = "shared", issue = "27730")]
-impl<T: ?Sized> Clone for Shared<T> {
+#[stable(feature = "nonnull", since = "1.24.0")]
+impl<T: ?Sized> Clone for NonNull<T> {
fn clone(&self) -> Self {
*self
}
}
-#[unstable(feature = "shared", issue = "27730")]
-impl<T: ?Sized> Copy for Shared<T> { }
+#[stable(feature = "nonnull", since = "1.24.0")]
+impl<T: ?Sized> Copy for NonNull<T> { }
-#[unstable(feature = "shared", issue = "27730")]
-impl<T: ?Sized, U: ?Sized> CoerceUnsized<Shared<U>> for Shared<T> where T: Unsize<U> { }
+#[stable(feature = "nonnull", since = "1.24.0")]
+impl<T: ?Sized, U: ?Sized> CoerceUnsized<NonNull<U>> for NonNull<T> where T: Unsize<U> { }
-#[unstable(feature = "shared", issue = "27730")]
-impl<T: ?Sized> fmt::Pointer for Shared<T> {
+#[stable(feature = "nonnull", since = "1.24.0")]
+impl<T: ?Sized> fmt::Pointer for NonNull<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Pointer::fmt(&self.as_ptr(), f)
}
}
-#[unstable(feature = "shared", issue = "27730")]
-impl<T: ?Sized> From<Unique<T>> for Shared<T> {
+#[stable(feature = "nonnull", since = "1.24.0")]
+impl<T: ?Sized> From<Unique<T>> for NonNull<T> {
fn from(unique: Unique<T>) -> Self {
- Shared { pointer: unique.pointer }
+ NonNull { pointer: unique.pointer }
}
}
-#[unstable(feature = "shared", issue = "27730")]
-impl<'a, T: ?Sized> From<&'a mut T> for Shared<T> {
+#[stable(feature = "nonnull", since = "1.24.0")]
+impl<'a, T: ?Sized> From<&'a mut T> for NonNull<T> {
fn from(reference: &'a mut T) -> Self {
- Shared { pointer: NonZero::from(reference) }
+ NonNull { pointer: NonZero::from(reference) }
}
}
-#[unstable(feature = "shared", issue = "27730")]
-impl<'a, T: ?Sized> From<&'a T> for Shared<T> {
+#[stable(feature = "nonnull", since = "1.24.0")]
+impl<'a, T: ?Sized> From<&'a T> for NonNull<T> {
fn from(reference: &'a T) -> Self {
- Shared { pointer: NonZero::from(reference) }
+ NonNull { pointer: NonZero::from(reference) }
}
}
}
}
+impl<T, E> Result<Option<T>, E> {
+ /// Transposes a `Result` of an `Option` into an `Option` of a `Result`.
+ ///
+ /// `Ok(None)` will be mapped to `None`.
+ /// `Ok(Some(_))` and `Err(_)` will be mapped to `Some(Ok(_))` and `Some(Err(_))`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// #![feature(transpose_result)]
+ ///
+ /// #[derive(Debug, Eq, PartialEq)]
+ /// struct SomeErr;
+ ///
+ /// let x: Result<Option<i32>, SomeErr> = Ok(Some(5));
+ /// let y: Option<Result<i32, SomeErr>> = Some(Ok(5));
+ /// assert_eq!(x.transpose(), y);
+ /// ```
+ #[inline]
+ #[unstable(feature = "transpose_result", issue = "47338")]
+ pub fn transpose(self) -> Option<Result<T, E>> {
+ match self {
+ Ok(Some(x)) => Some(Ok(x)),
+ Ok(None) => None,
+ Err(e) => Some(Err(e)),
+ }
+ }
+}
+
// This is a separate function to reduce the code size of the methods
#[inline(never)]
#[cold]
// a lot of stuff defined here. Let's keep it clean.
//
// Since slices don't support inherent methods; all operations
-// on them are defined on traits, which are then reexported from
+// on them are defined on traits, which are then re-exported from
// the prelude for convenience. So there are a lot of traits here.
//
// The layout of this file is thus:
}
accum
}
+
+ #[inline]
+ #[rustc_inherit_overflow_checks]
+ fn position<P>(&mut self, mut predicate: P) -> Option<usize> where
+ Self: Sized,
+ P: FnMut(Self::Item) -> bool,
+ {
+ // The addition might panic on overflow
+ let n = self.len();
+ self.try_fold(0, move |i, x| {
+ if predicate(x) { Err(i) }
+ else { Ok(i + 1) }
+ }).err()
+ .map(|i| {
+ unsafe { assume(i < n) };
+ i
+ })
+ }
+
+ #[inline]
+ fn rposition<P>(&mut self, mut predicate: P) -> Option<usize> where
+ P: FnMut(Self::Item) -> bool,
+ Self: Sized + ExactSizeIterator + DoubleEndedIterator
+ {
+ // No need for an overflow check here, because `ExactSizeIterator`
+ // implies that the number of elements fits into a `usize`.
+ let n = self.len();
+ self.try_rfold(n, move |i, x| {
+ let i = i - 1;
+ if predicate(x) { Err(i) }
+ else { Ok(i) }
+ }).err()
+ .map(|i| {
+ unsafe { assume(i < n) };
+ i
+ })
+ }
}
#[stable(feature = "rust1", since = "1.0.0")]
#![feature(trusted_len)]
#![feature(try_from)]
#![feature(try_trait)]
-#![feature(unique)]
#![feature(exact_chunks)]
extern crate core;
}
#[test]
-fn test_unsized_unique() {
+fn test_unsized_nonnull() {
let xs: &[i32] = &[1, 2, 3];
- let ptr = unsafe { Unique::new_unchecked(xs as *const [i32] as *mut [i32]) };
+ let ptr = unsafe { NonNull::new_unchecked(xs as *const [i32] as *mut [i32]) };
let ys = unsafe { ptr.as_ref() };
let zs: &[i32] = &[1, 2, 3];
assert!(ys == zs);
use core::result::Result::{Ok, Err};
+
+#[test]
+fn test_position() {
+ let b = [1, 2, 3, 5, 5];
+ assert!(b.iter().position(|&v| v == 9) == None);
+ assert!(b.iter().position(|&v| v == 5) == Some(3));
+ assert!(b.iter().position(|&v| v == 3) == Some(2));
+ assert!(b.iter().position(|&v| v == 0) == None);
+}
+
+#[test]
+fn test_rposition() {
+ let b = [1, 2, 3, 5, 5];
+ assert!(b.iter().rposition(|&v| v == 9) == None);
+ assert!(b.iter().rposition(|&v| v == 5) == Some(4));
+ assert!(b.iter().rposition(|&v| v == 3) == Some(2));
+ assert!(b.iter().rposition(|&v| v == 0) == None);
+}
+
#[test]
fn test_binary_search() {
let b: [i32; 0] = [];
// Privatize the degenerate import base, used only to check
// the stability of `use a::{};`, to avoid it showing up as
- // a reexport by accident when `pub`, e.g. in documentation.
+ // a re-export by accident when `pub`, e.g. in documentation.
let path = P(self.lower_path(id, &prefix, ParamMode::Explicit, true));
*vis = hir::Inherited;
hir::ItemUse(path, hir::UseKind::ListStem)
declare_lint! {
pub PUB_USE_OF_PRIVATE_EXTERN_CRATE,
Deny,
- "detect public reexports of private extern crates"
+ "detect public re-exports of private extern crates"
}
declare_lint! {
/// Declare a static `LintArray` and return it as an expression.
#[macro_export]
-macro_rules! lint_array { ($( $lint:expr ),*) => (
- {
- static ARRAY: LintArray = &[ $( &$lint ),* ];
- ARRAY
- }
-) }
+macro_rules! lint_array {
+ ($( $lint:expr ),*,) => { lint_array!( $( $lint ),* ) };
+ ($( $lint:expr ),*) => {{
+ static ARRAY: LintArray = &[ $( &$lint ),* ];
+ ARRAY
+ }}
+}
pub type LintArray = &'static [&'static &'static Lint];
// public, then type `T` is reachable. Its values can be obtained by other crates
// even if the type itself is not nameable.
Reachable,
- // Public items + items accessible to other crates with help of `pub use` reexports
+ // Public items + items accessible to other crates with help of `pub use` re-exports
Exported,
- // Items accessible to other crates directly, without help of reexports
+ // Items accessible to other crates directly, without help of re-exports
Public,
}
"emit noalias metadata for mutable references"),
dump_mir: Option<String> = (None, parse_opt_string, [UNTRACKED],
"dump MIR state at various points in translation"),
- dump_mir_dir: Option<String> = (None, parse_opt_string, [UNTRACKED],
+ dump_mir_dir: String = (String::from("mir_dump"), parse_string, [UNTRACKED],
"the directory the MIR is dumped into"),
dump_mir_graphviz: bool = (false, parse_bool, [UNTRACKED],
"in addition to `.mir` files, create graphviz `.dot` files"),
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.dump_mir = Some(String::from("abc"));
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
- opts.debugging_opts.dump_mir_dir = Some(String::from("abc"));
+ opts.debugging_opts.dump_mir_dir = String::from("abc");
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
opts.debugging_opts.dump_mir_graphviz = true;
assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
pub use self::code_stats::{CodeStats, DataTypeKind, FieldInfo};
pub use self::code_stats::{SizeKind, TypeSizeInfo, VariantInfo};
-use hir::def_id::{CrateNum, DefIndex};
+use hir::def_id::CrateNum;
use ich::Fingerprint;
use lint;
/// Returns the symbol name for the registrar function,
/// given the crate Svh and the function DefIndex.
- pub fn generate_plugin_registrar_symbol(&self, disambiguator: CrateDisambiguator,
- index: DefIndex)
+ pub fn generate_plugin_registrar_symbol(&self,
+ disambiguator: CrateDisambiguator)
-> String {
- format!("__rustc_plugin_registrar__{}_{}", disambiguator.to_fingerprint().to_hex(),
- index.to_proc_macro_index())
+ format!("__rustc_plugin_registrar_{}__", disambiguator.to_fingerprint().to_hex())
}
- pub fn generate_derive_registrar_symbol(&self, disambiguator: CrateDisambiguator,
- index: DefIndex)
+ pub fn generate_derive_registrar_symbol(&self,
+ disambiguator: CrateDisambiguator)
-> String {
- format!("__rustc_derive_registrar__{}_{}", disambiguator.to_fingerprint().to_hex(),
- index.to_proc_macro_index())
+ format!("__rustc_derive_registrar_{}__", disambiguator.to_fingerprint().to_hex())
}
pub fn sysroot<'a>(&'a self) -> &'a Path {
}
ObligationCauseCode::ItemObligation(item_def_id) => {
let item_name = tcx.item_path_str(item_def_id);
- err.note(&format!("required by `{}`", item_name));
+ let msg = format!("required by `{}`", item_name);
+ if let Some(sp) = tcx.hir.span_if_local(item_def_id) {
+ let sp = tcx.sess.codemap().def_span(sp);
+ err.span_note(sp, &msg);
+ } else {
+ err.note(&msg);
+ }
}
ObligationCauseCode::ObjectCastObligation(object_ty) => {
err.note(&format!("required for the cast to the object type `{}`",
let max_change = S::MAX_EXP as i32 - (S::MIN_EXP as i32 - sig_bits) + 1;
// Clamp to one past the range ends to let normalize handle overflow.
- let exp_change = cmp::min(cmp::max(exp as i32, (-max_change - 1)), max_change);
+ let exp_change = cmp::min(cmp::max(exp as i32, -max_change - 1), max_change);
self.exp = self.exp.saturating_add(exp_change as ExpInt);
self = self.normalize(round, Loss::ExactlyZero).value;
if self.is_nan() {
"-lmingw32".to_string(),
"-lgcc".to_string(), // alas, mingw* libraries above depend on libgcc
"-lmsvcrt".to_string(),
+ // mingw's msvcrt is a weird hybrid import library and static library.
+ // And it seems that the linker fails to use import symbols from msvcrt
+ // that are required from functions in msvcrt in certain cases. For example
+ // `_fmode` that is used by an implementation of `__p__fmode` in x86_64.
+ // Listing the library twice seems to fix that, and seems to also be done
+ // by mingw's gcc (Though not sure if it's done on purpose, or by mistake).
+ //
+ // See https://github.com/rust-lang/rust/pull/47483
+ "-lmsvcrt".to_string(),
"-luser32".to_string(),
"-lkernel32".to_string(),
]);
if let mc::NoteClosureEnv(upvar_id) = err.cmt.note {
let node_id = self.tcx.hir.hir_to_node_id(upvar_id.var_id);
let sp = self.tcx.hir.span(node_id);
- match self.tcx.sess.codemap().span_to_snippet(sp) {
- Ok(snippet) => {
+ let fn_closure_msg = "`Fn` closures cannot capture their enclosing \
+ environment for modifications";
+ match (self.tcx.sess.codemap().span_to_snippet(sp), &err.cmt.cat) {
+ (_, &Categorization::Upvar(mc::Upvar {
+ kind: ty::ClosureKind::Fn, ..
+ })) => {
+ db.note(fn_closure_msg);
+ // we should point at the cause for this closure being
+ // identified as `Fn` (like in signature of method this
+ // closure was passed into)
+ }
+ (Ok(ref snippet), ref cat) => {
let msg = &format!("consider making `{}` mutable", snippet);
- db.span_suggestion(sp, msg, format!("mut {}", snippet));
+ let suggestion = format!("mut {}", snippet);
+
+ if let &Categorization::Deref(ref cmt, _) = cat {
+ if let Categorization::Upvar(mc::Upvar {
+ kind: ty::ClosureKind::Fn, ..
+ }) = cmt.cat {
+ db.note(fn_closure_msg);
+ } else {
+ db.span_suggestion(sp, msg, suggestion);
+ }
+ } else {
+ db.span_suggestion(sp, msg, suggestion);
+ }
}
_ => {
db.span_help(sp, "consider making this binding mutable");
use std::marker::Unsize;
use std::iter::Extend;
-use std::ptr::{self, drop_in_place, Shared};
+use std::ptr::{self, drop_in_place, NonNull};
use std::ops::{Deref, DerefMut, Range};
use std::hash::{Hash, Hasher};
use std::slice;
tail_start: end,
tail_len: len - end,
iter: range_slice.iter(),
- array_vec: Shared::from(self),
+ array_vec: NonNull::from(self),
}
}
}
tail_start: usize,
tail_len: usize,
iter: slice::Iter<'a, ManuallyDrop<A::Element>>,
- array_vec: Shared<ArrayVec<A>>,
+ array_vec: NonNull<ArrayVec<A>>,
}
impl<'a, A: Array> Iterator for Drain<'a, A> {
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(warnings)]
-#![feature(shared)]
#![feature(collections_range)]
#![feature(nonzero)]
#![feature(unboxed_closures)]
let sub_len = parts[0].snippet.trim().chars().fold(0, |acc, ch| {
acc + unicode_width::UnicodeWidthChar::width(ch).unwrap_or(0)
});
- let underline_start = span_start_pos.col.0 + start;
- let underline_end = span_start_pos.col.0 + start + sub_len;
+ let underline_start = span_start_pos.col_display + start;
+ let underline_end = span_start_pos.col_display + start + sub_len;
for p in underline_start..underline_end {
buffer.putc(row_num,
max_line_num_len + 3 + p,
let msg = "function is marked #[no_mangle], but not exported";
let mut err = cx.struct_span_lint(PRIVATE_NO_MANGLE_FNS, it.span, msg);
let insertion_span = it.span.with_hi(it.span.lo());
- err.span_suggestion(insertion_span,
- "try making it public",
- "pub ".to_owned());
+ if it.vis == hir::Visibility::Inherited {
+ err.span_suggestion(insertion_span,
+ "try making it public",
+ "pub ".to_owned());
+ }
err.emit();
}
if generics.is_type_parameterized() {
let msg = "static is marked #[no_mangle], but not exported";
let mut err = cx.struct_span_lint(PRIVATE_NO_MANGLE_STATICS, it.span, msg);
let insertion_span = it.span.with_hi(it.span.lo());
- err.span_suggestion(insertion_span,
- "try making it public",
- "pub ".to_owned());
+ if it.vis == hir::Visibility::Inherited {
+ err.span_suggestion(insertion_span,
+ "try making it public",
+ "pub ".to_owned());
+ }
err.emit();
}
}
Assign(_, ref value) => (value, "assigned value", false),
AssignOp(.., ref value) => (value, "assigned value", false),
InPlace(_, ref value) => (value, "emplacement value", false),
+ Call(_, ref args) => {
+ for arg in args {
+ self.check_unused_parens_core(cx, arg, "function argument", false)
+ }
+ return;
+ },
+ MethodCall(_, ref args) => {
+ for arg in &args[1..] { // first "argument" is self (which sometimes needs parens)
+ self.check_unused_parens_core(cx, arg, "method argument", false)
+ }
+ return;
+ }
_ => return,
};
self.check_unused_parens_core(cx, &value, msg, struct_lit_needs_parens);
use native_libs::relevant_lib;
use schema::CrateRoot;
-use rustc::hir::def_id::{CrateNum, DefIndex, CRATE_DEF_INDEX};
+use rustc::hir::def_id::{CrateNum, CRATE_DEF_INDEX};
use rustc::hir::svh::Svh;
use rustc::middle::allocator::AllocatorKind;
use rustc::middle::cstore::DepKind;
Err(err) => self.sess.span_fatal(span, &err),
};
- let sym = self.sess.generate_derive_registrar_symbol(root.disambiguator,
- root.macro_derive_registrar.unwrap());
+ let sym = self.sess.generate_derive_registrar_symbol(root.disambiguator);
let registrar = unsafe {
let sym = match lib.symbol(&sym) {
Ok(f) => f,
pub fn find_plugin_registrar(&mut self,
span: Span,
name: &str)
- -> Option<(PathBuf, CrateDisambiguator, DefIndex)> {
+ -> Option<(PathBuf, CrateDisambiguator)> {
let name = Symbol::intern(name);
let ekrate = self.read_extension_crate(span, name, name);
}
let root = ekrate.metadata.get_root();
- match (ekrate.dylib.as_ref(), root.plugin_registrar_fn) {
- (Some(dylib), Some(reg)) => {
- Some((dylib.to_path_buf(), root.disambiguator, reg))
+ match ekrate.dylib.as_ref() {
+ Some(dylib) => {
+ Some((dylib.to_path_buf(), root.disambiguator))
}
- (None, Some(_)) => {
+ None => {
span_err!(self.sess, span, E0457,
"plugin `{}` only found in rlib format, but must be available \
in dylib format",
// empty dylib.
None
}
- _ => None,
}
}
let vis = self.get_visibility(child_index);
let is_import = false;
callback(def::Export { def, ident, vis, span, is_import });
- // For non-reexport structs and variants add their constructors to children.
- // Reexport lists automatically contain constructors when necessary.
+ // For non-re-export structs and variants add their constructors to children.
+ // Re-export lists automatically contain constructors when necessary.
match def {
Def::Struct(..) => {
if let Some(ctor_def_id) = self.get_struct_ctor_def_id(child_index) {
}
}
+ /// Convert a byte array or byte slice to a byte slice.
+ fn to_slice_operand(&mut self,
+ block: BasicBlock,
+ source_info: SourceInfo,
+ operand: Operand<'tcx>)
+ -> Operand<'tcx>
+ {
+ let tcx = self.hir.tcx();
+ let ty = operand.ty(&self.local_decls, tcx);
+ debug!("to_slice_operand({:?}, {:?}: {:?})", block, operand, ty);
+ match ty.sty {
+ ty::TyRef(region, mt) => match mt.ty.sty {
+ ty::TyArray(ety, _) => {
+ let ty = tcx.mk_imm_ref(region, tcx.mk_slice(ety));
+ let temp = self.temp(ty, source_info.span);
+ self.cfg.push_assign(block, source_info, &temp,
+ Rvalue::Cast(CastKind::Unsize, operand, ty));
+ Operand::Move(temp)
+ }
+ ty::TySlice(_) => operand,
+ _ => {
+ span_bug!(source_info.span,
+ "bad operand {:?}: {:?} to `to_slice_operand`", operand, ty)
+ }
+ }
+ _ => {
+ span_bug!(source_info.span,
+ "bad operand {:?}: {:?} to `to_slice_operand`", operand, ty)
+ }
+ }
+
+ }
+
/// Generates the code to perform a test.
pub fn perform_test(&mut self,
block: BasicBlock,
place: &Place<'tcx>,
test: &Test<'tcx>)
-> Vec<BasicBlock> {
+ debug!("perform_test({:?}, {:?}: {:?}, {:?})",
+ block,
+ place,
+ place.ty(&self.local_decls, self.hir.tcx()),
+ test);
let source_info = self.source_info(test.span);
match test.kind {
TestKind::Switch { adt_def, ref variants } => {
ret
}
- TestKind::Eq { value, mut ty } => {
+ TestKind::Eq { value, ty } => {
+ let tcx = self.hir.tcx();
let mut val = Operand::Copy(place.clone());
// If we're using b"..." as a pattern, we need to insert an
// unsizing coercion, as the byte string has the type &[u8; N].
- let expect = if let ConstVal::ByteStr(bytes) = value.val {
- let tcx = self.hir.tcx();
-
- // Unsize the place to &[u8], too, if necessary.
- if let ty::TyRef(region, mt) = ty.sty {
- if let ty::TyArray(_, _) = mt.ty.sty {
- ty = tcx.mk_imm_ref(region, tcx.mk_slice(tcx.types.u8));
- let val_slice = self.temp(ty, test.span);
- self.cfg.push_assign(block, source_info, &val_slice,
- Rvalue::Cast(CastKind::Unsize, val, ty));
- val = Operand::Move(val_slice);
- }
- }
-
- assert!(ty.is_slice());
-
+ //
+ // We want to do this even when the scrutinee is a reference to an
+ // array, so we can call `<[u8]>::eq` rather than having to find an
+ // `<[u8; N]>::eq`.
+ let (expect, val) = if let ConstVal::ByteStr(bytes) = value.val {
let array_ty = tcx.mk_array(tcx.types.u8, bytes.data.len() as u64);
let array_ref = tcx.mk_imm_ref(tcx.types.re_static, array_ty);
let array = self.literal_operand(test.span, array_ref, Literal::Value {
value
});
- let slice = self.temp(ty, test.span);
- self.cfg.push_assign(block, source_info, &slice,
- Rvalue::Cast(CastKind::Unsize, array, ty));
- Operand::Move(slice)
+ let val = self.to_slice_operand(block, source_info, val);
+ let slice = self.to_slice_operand(block, source_info, array);
+ (slice, val)
} else {
- self.literal_operand(test.span, ty, Literal::Value {
+ (self.literal_operand(test.span, ty, Literal::Value {
value
- })
+ }), val)
};
// Use PartialEq::eq for &str and &[u8] slices, instead of BinOp::Eq.
let fail = self.cfg.start_new_block();
+ let ty = expect.ty(&self.local_decls, tcx);
if let ty::TyRef(_, mt) = ty.sty {
assert!(ty.is_slice());
let eq_def_id = self.hir.tcx().lang_items().eq_trait().unwrap();
}
impl ReserveOrActivateIndex {
- fn reserved(i: BorrowIndex) -> Self { ReserveOrActivateIndex::new((i.index() * 2)) }
+ fn reserved(i: BorrowIndex) -> Self { ReserveOrActivateIndex::new(i.index() * 2) }
fn active(i: BorrowIndex) -> Self { ReserveOrActivateIndex::new((i.index() * 2) + 1) }
pub(crate) fn is_reservation(self) -> bool { self.index() % 2 == 0 }
use std::iter;
use transform::{add_moves_for_packed_drops, add_call_guards};
-use transform::{no_landing_pads, simplify};
+use transform::{remove_noop_landing_pads, no_landing_pads, simplify};
use util::elaborate_drops::{self, DropElaborator, DropStyle, DropFlagMode};
use util::patch::MirPatch;
add_moves_for_packed_drops::add_moves_for_packed_drops(
tcx, &mut result, instance.def_id());
no_landing_pads::no_landing_pads(tcx, &mut result);
+ remove_noop_landing_pads::remove_noop_landing_pads(tcx, &mut result);
simplify::simplify_cfg(&mut result);
add_call_guards::CriticalCallEdges.add_call_guards(&mut result);
debug!("make_shim({:?}) = {:?}", instance, result);
/// code for these.
pub struct RemoveNoopLandingPads;
+pub fn remove_noop_landing_pads<'a, 'tcx>(
+ tcx: TyCtxt<'a, 'tcx, 'tcx>,
+ mir: &mut Mir<'tcx>)
+{
+ if tcx.sess.no_landing_pads() {
+ return
+ }
+ debug!("remove_noop_landing_pads({:?})", mir);
+
+ RemoveNoopLandingPads.remove_nop_landing_pads(mir)
+}
+
impl MirPass for RemoveNoopLandingPads {
fn run_pass<'a, 'tcx>(&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
_src: MirSource,
mir: &mut Mir<'tcx>) {
- if tcx.sess.no_landing_pads() {
- return
- }
-
- debug!("remove_noop_landing_pads({:?})", mir);
- self.remove_nop_landing_pads(mir);
+ remove_noop_landing_pads(tcx, mir);
}
}
result: &LivenessResult,
) {
let mut file_path = PathBuf::new();
- if let Some(ref file_dir) = tcx.sess.opts.debugging_opts.dump_mir_dir {
- let p = Path::new(file_dir);
- file_path.push(p);
- };
+ file_path.push(Path::new(&tcx.sess.opts.debugging_opts.dump_mir_dir));
let item_id = tcx.hir.as_local_node_id(source.def_id).unwrap();
let file_name = format!("rustc.node{}{}-liveness.mir", item_id, pass_name);
file_path.push(&file_name);
};
let mut file_path = PathBuf::new();
-
- if let Some(ref file_dir) = tcx.sess.opts.debugging_opts.dump_mir_dir {
- let p = Path::new(file_dir);
- file_path.push(p);
- };
+ file_path.push(Path::new(&tcx.sess.opts.debugging_opts.dump_mir_dir));
let item_name = tcx.hir
.def_path(source.def_id)
fn load_plugin(&mut self, span: Span, name: &str, args: Vec<ast::NestedMetaItem>) {
let registrar = self.reader.find_plugin_registrar(span, name);
- if let Some((lib, disambiguator, index)) = registrar {
- let symbol = self.sess.generate_plugin_registrar_symbol(disambiguator, index);
+ if let Some((lib, disambiguator)) = registrar {
+ let symbol = self.sess.generate_plugin_registrar_symbol(disambiguator);
let fun = self.dylink_registrar(span, lib, symbol);
self.plugins.push(PluginRegistrar {
fun,
hir::ItemExternCrate(..) => {}
// All nested items are checked by visit_item
hir::ItemMod(..) => {}
- // Reexports are handled in visit_mod
+ // Re-exports are handled in visit_mod
hir::ItemUse(..) => {}
// The interface is empty
hir::ItemGlobalAsm(..) => {}
fn visit_item(&mut self, item: &'tcx hir::Item) {
match item.node {
- // contents of a private mod can be reexported, so we need
+ // contents of a private mod can be re-exported, so we need
// to check internals.
hir::ItemMod(_) => {}
let (def, vis) = (binding.def(), binding.vis);
self.macro_exports.push(Export { ident, def, vis, span, is_import: true });
} else {
- span_err!(self.session, span, E0470, "reexported macro not found");
+ span_err!(self.session, span, E0470, "re-exported macro not found");
}
}
used
}
} else if attr.check_name("macro_reexport") {
let bad_macro_reexport = |this: &mut Self, span| {
- span_err!(this.session, span, E0467, "bad macro reexport");
+ span_err!(this.session, span, E0467, "bad macro re-export");
};
if let Some(names) = attr.meta_item_list() {
for attr in names {
"##,
E0467: r##"
-Macro reexport declarations were empty or malformed.
+Macro re-export declarations were empty or malformed.
Erroneous code examples:
This is a syntax error at the level of attribute declarations.
Currently, `macro_reexport` requires at least one macro name to be listed.
-Unlike `macro_use`, listing no names does not reexport all macros from the
+Unlike `macro_use`, listing no names does not re-export all macros from the
given crate.
Decide which macros you would like to export and list them properly.
-These are proper reexport declarations:
+These are proper re-export declarations:
```ignore (cannot-doctest-multicrate-project)
#[macro_reexport(some_macro, another_macro)]
"##,
E0470: r##"
-A macro listed for reexport was not found.
+A macro listed for re-export was not found.
Erroneous code example:
This could be caused by a typo. Did you misspell the macro's name?
-Double-check the names of the macros listed for reexport, and that the crate
+Double-check the names of the macros listed for re-export, and that the crate
in question exports them.
A working version:
unresolved_invocations: RefCell::new(FxHashSet()),
no_implicit_prelude: false,
glob_importers: RefCell::new(Vec::new()),
- globs: RefCell::new((Vec::new())),
+ globs: RefCell::new(Vec::new()),
traits: RefCell::new(None),
populated: Cell::new(normal_ancestor_id.is_local()),
span,
let lint = lint::builtin::LEGACY_CONSTRUCTOR_VISIBILITY;
self.session.buffer_lint(lint, id, span,
"private struct constructors are not usable through \
- reexports in outer modules",
+ re-exports in outer modules",
);
res = Some(PathResolution::new(ctor_def));
}
}
/// A somewhat inefficient routine to obtain the name of a module.
-fn module_to_string(module: Module) -> String {
+fn module_to_string(module: Module) -> Option<String> {
let mut names = Vec::new();
fn collect_mod(names: &mut Vec<Ident>, module: Module) {
collect_mod(&mut names, module);
if names.is_empty() {
- return "???".to_string();
+ return None;
}
- names_to_string(&names.into_iter()
+ Some(names_to_string(&names.into_iter()
.rev()
.map(|n| dummy_spanned(n))
- .collect::<Vec<_>>())
+ .collect::<Vec<_>>()))
}
fn err_path_resolution() -> PathResolution {
if let Some(suggestion) = suggestion {
if suggestion != name {
if let MacroKind::Bang = kind {
- err.span_suggestion(span, "you could try the macro",
- format!("{}!", suggestion));
+ err.span_suggestion(span, "you could try the macro", suggestion.to_string());
} else {
err.span_suggestion(span, "try", suggestion.to_string());
}
},
GlobImport {
is_prelude: bool,
- max_vis: Cell<ty::Visibility>, // The visibility of the greatest reexport.
- // n.b. `max_vis` is only used in `finalize_import` to check for reexport errors.
+ max_vis: Cell<ty::Visibility>, // The visibility of the greatest re-export.
+ // n.b. `max_vis` is only used in `finalize_import` to check for re-export errors.
},
ExternCrate(Option<Name>),
MacroUse,
fn resolve_import(&mut self, directive: &'b ImportDirective<'b>) -> bool {
debug!("(resolving import for module) resolving import `{}::...` in `{}`",
names_to_string(&directive.module_path[..]),
- module_to_string(self.current_module));
+ module_to_string(self.current_module).unwrap_or("???".to_string()));
self.current_module = directive.parent;
None => "".to_owned(),
};
let module_str = module_to_string(module);
- let msg = if &module_str == "???" {
- format!("no `{}` in the root{}", ident, lev_suggestion)
- } else {
+ let msg = if let Some(module_str) = module_str {
format!("no `{}` in `{}`{}", ident, module_str, lev_suggestion)
+ } else {
+ format!("no `{}` in the root{}", ident, lev_suggestion)
};
Some((span, msg))
} else {
if !any_successful_reexport {
let (ns, binding) = reexport_error.unwrap();
if ns == TypeNS && binding.is_extern_crate() {
- let msg = format!("extern crate `{}` is private, and cannot be reexported \
- (error E0365), consider declaring with `pub`",
+ let msg = format!("extern crate `{}` is private, and cannot be \
+ re-exported (error E0365), consider declaring with \
+ `pub`",
ident);
self.session.buffer_lint(PUB_USE_OF_PRIVATE_EXTERN_CRATE,
directive.id,
&msg);
} else if ns == TypeNS {
struct_span_err!(self.session, directive.span, E0365,
- "`{}` is private, and cannot be reexported", ident)
- .span_label(directive.span, format!("reexport of private `{}`", ident))
+ "`{}` is private, and cannot be re-exported", ident)
+ .span_label(directive.span, format!("re-export of private `{}`", ident))
.note(&format!("consider declaring type or module `{}` with `pub`", ident))
.emit();
} else {
- let msg = format!("`{}` is private, and cannot be reexported", ident);
+ let msg = format!("`{}` is private, and cannot be re-exported", ident);
let note_msg =
format!("consider marking `{}` as `pub` in the imported module", ident);
struct_span_err!(self.session, directive.span, E0364, "{}", &msg)
self.record_def(directive.id, PathResolution::new(module.def().unwrap()));
}
- // Miscellaneous post-processing, including recording reexports,
+ // Miscellaneous post-processing, including recording re-exports,
// reporting conflicts, and reporting unresolved imports.
fn finalize_resolutions_in(&mut self, module: Module<'b>) {
// Since import resolution is finished, globs will not define any more names.
!orig_binding.vis.is_at_least(binding.vis, &*self) {
let msg = match directive.subclass {
ImportDirectiveSubclass::SingleImport { .. } => {
- format!("variant `{}` is private and cannot be reexported",
+ format!("variant `{}` is private and cannot be re-exported",
ident)
},
ImportDirectiveSubclass::GlobImport { .. } => {
let msg = "enum is private and its variants \
- cannot be reexported".to_owned();
+ cannot be re-exported".to_owned();
let error_id = (DiagnosticMessageId::ErrorId(0), // no code?!
Some(binding.span),
msg.clone());
}
pub fn store_fn_arg(&self, bx: &Builder<'a, 'tcx>, idx: &mut usize, dst: PlaceRef<'tcx>) {
- if self.pad.is_some() {
- *idx += 1;
- }
let mut next = || {
let val = llvm::get_param(bx.llfn(), *idx as c_uint);
*idx += 1;
// was tagged as #42791) and some more info can be found on #44443 for
// emscripten itself.
let cmd = |linker: &Path| {
- if cfg!(windows) && linker.ends_with(".bat") {
- let mut cmd = Command::new("cmd");
- cmd.arg("/c").arg(linker);
- cmd
- } else {
- Command::new(linker)
+ if let Some(linker) = linker.to_str() {
+ if cfg!(windows) && linker.ends_with(".bat") {
+ let mut cmd = Command::new("cmd");
+ cmd.arg("/c").arg(linker);
+ return cmd
+ }
}
+ Command::new(linker)
};
if let Some(ref linker) = sess.opts.cg.linker {
if let Some(id) = tcx.sess.derive_registrar_fn.get() {
let def_id = tcx.hir.local_def_id(id);
- let idx = def_id.index;
let disambiguator = tcx.sess.local_crate_disambiguator();
- let registrar = tcx.sess.generate_derive_registrar_symbol(disambiguator, idx);
+ let registrar = tcx.sess.generate_derive_registrar_symbol(disambiguator);
local_crate.push((registrar, Some(def_id), SymbolExportLevel::C));
}
if let Some(id) = node_id {
if tcx.sess.plugin_registrar_fn.get() == Some(id) {
- let idx = def_id.index;
let disambiguator = tcx.sess.local_crate_disambiguator();
- return tcx.sess.generate_plugin_registrar_symbol(disambiguator, idx);
+ return tcx.sess.generate_plugin_registrar_symbol(disambiguator);
}
if tcx.sess.derive_registrar_fn.get() == Some(id) {
- let idx = def_id.index;
let disambiguator = tcx.sess.local_crate_disambiguator();
- return tcx.sess.generate_derive_registrar_symbol(disambiguator, idx);
+ return tcx.sess.generate_derive_registrar_symbol(disambiguator);
}
}
let sess = tcx.sess;
// First up, convert our jobserver into a helper thread so we can use normal
- // mpsc channels to manage our messages and such. Once we've got the helper
- // thread then request `n-1` tokens because all of our work items are ready
- // to go.
- //
- // Note that the `n-1` is here because we ourselves have a token (our
- // process) and we'll use that token to execute at least one unit of work.
- //
- // After we've requested all these tokens then we'll, when we can, get
- // tokens on `rx` above which will get managed in the main loop below.
+ // mpsc channels to manage our messages and such.
+ // After we've requested tokens then we'll, when we can,
+ // get tokens on `coordinator_receive` which will
+ // get managed in the main loop below.
let coordinator_send2 = coordinator_send.clone();
let helper = jobserver.into_helper_thread(move |token| {
drop(coordinator_send2.send(Box::new(Message::Token(token))));
"avx512dq\0", "avx512er\0",
"avx512f\0", "avx512ifma\0",
"avx512pf\0", "avx512vbmi\0",
- "avx512vl\0", "avx512vpopcntdq\0", "mmx\0"];
+ "avx512vl\0", "avx512vpopcntdq\0",
+ "mmx\0", "fxsr\0"];
const HEXAGON_WHITELIST: &'static [&'static str] = &["hvx\0", "hvx-double\0"];
for i in 0..tupled_arg_tys.len() {
let arg = &fx.fn_ty.args[idx];
idx += 1;
+ if arg.pad.is_some() {
+ llarg_idx += 1;
+ }
arg.store_fn_arg(bx, &mut llarg_idx, place.project_field(bx, i));
}
[dependencies]
pulldown-cmark = { version = "0.1.0", default-features = false }
-html-diff = "0.0.5"
+html-diff = "0.0.6"
tempdir = "0.3"
[build-dependencies]
ret.extend(build_impls(cx, did));
clean::ForeignTypeItem
}
- // Never inline enum variants but leave them shown as reexports.
+ // Never inline enum variants but leave them shown as re-exports.
Def::Variant(..) => return None,
- // Assume that enum variants and struct types are reexported next to
+ // Assume that enum variants and struct types are re-exported next to
// their constructors.
Def::VariantCtor(..) |
Def::StructCtor(..) => return Some(Vec::new()),
if trait_.def_id() == tcx.lang_items().deref_trait() {
super::build_deref_target_impls(cx, &trait_items, ret);
}
+ if let Some(trait_did) = trait_.def_id() {
+ record_extern_trait(cx, trait_did);
+ }
let provided = trait_.def_id().map(|did| {
tcx.provided_trait_methods(did)
};
fn fill_in(cx: &DocContext, did: DefId, items: &mut Vec<clean::Item>) {
- // If we're reexporting a reexport it may actually reexport something in
+ // If we're re-exporting a re-export it may actually re-export something in
// two namespaces, so the target may be listed twice. Make sure we only
// visit each node at most once.
let mut visited = FxHashSet();
});
(g, ty_bounds)
}
+
+pub fn record_extern_trait(cx: &DocContext, did: DefId) {
+ cx.external_traits.borrow_mut().entry(did).or_insert_with(|| {
+ build_external_trait(cx, did)
+ });
+}
if did.is_local() { return did }
inline::record_extern_fqn(cx, did, kind);
if let TypeKind::Trait = kind {
- let t = inline::build_external_trait(cx, did);
- cx.external_traits.borrow_mut().insert(did, t);
+ inline::record_extern_trait(cx, did);
}
did
}
<h2>Keyboard Shortcuts</h2>
<dl>
- <dt>?</dt>
+ <dt><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
- <dt>S</dt>
+ <dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
- <dt>↑</dt>
+ <dt><kbd>↑</kbd></dt>
<dd>Move up in search results</dd>
- <dt>↓</dt>
+ <dt><kbd>↓</kbd></dt>
<dd>Move down in search results</dd>
- <dt>↹</dt>
+ <dt><kbd>↹</kbd></dt>
<dd>Switch tab</dd>
- <dt>⏎</dt>
+ <dt><kbd>⏎</kbd></dt>
<dd>Go to active search result</dd>
- <dt style="width:31px;">+ / -</dt>
- <dd>Collapse/expand all sections</dd>
+ <dt><kbd>+</kbd></dt>
+ <dd>Expand all sections</dd>
+ <dt><kbd>-</kbd></dt>
+ <dd>Collapse all sections</dd>
</dl>
</div>
clean::ConstantItem(..) | clean::StaticItem(..) |
clean::UnionItem(..) | clean::ForeignTypeItem
if !self.stripped_mod => {
- // Reexported items mean that the same id can show up twice
+ // Re-exported items mean that the same id can show up twice
// in the rustdoc ast that we're looking at. We know,
- // however, that a reexported item doesn't show up in the
+ // however, that a re-exported item doesn't show up in the
// `public_items` map, so we can skip inserting into the
// paths map if there was already an entry present and we're
// not a public item.
{
// Stripped modules survive the rustdoc passes (i.e. `strip-private`)
// if they contain impls for public types. These modules can also
- // contain items such as publicly reexported structures.
+ // contain items such as publicly re-exported structures.
//
// External crates will provide links to these structures, so
// these modules are recursed into, but not rendered normally
if cx.shared.sort_modules_alphabetically {
indices.sort_by(|&i1, &i2| cmp(&items[i1], &items[i2], i1, i2));
}
- // This call is to remove reexport duplicates in cases such as:
+ // This call is to remove re-export duplicates in cases such as:
//
// ```
// pub mod foo {
curty = myty;
let (short, name) = match myty.unwrap() {
ItemType::ExternCrate |
- ItemType::Import => ("reexports", "Reexports"),
+ ItemType::Import => ("reexports", "Re-exports"),
ItemType::Module => ("modules", "Modules"),
ItemType::Struct => ("structs", "Structs"),
ItemType::Union => ("unions", "Unions"),
if let Some(impls) = c.impls.get(&did) {
for i in impls {
let impl_ = i.inner_impl();
- if impl_.trait_.def_id().and_then(|d| c.traits.get(&d))
- .map_or(false, |t| t.is_spotlight) {
+ if impl_.trait_.def_id().map_or(false, |d| c.traits[&d].is_spotlight) {
if out.is_empty() {
out.push_str(
&format!("<h3 class=\"important\">Important traits for {}</h3>\
}
let traits = &cache().traits;
- let trait_ = i.trait_did().and_then(|did| traits.get(&did));
+ let trait_ = i.trait_did().map(|did| &traits[&did]);
if !show_def_docs {
write!(w, "<span class='docblock autohide'>")?;
it.type_() == ItemType::Import) {
sidebar.push_str(&format!("<li><a href=\"#{id}\">{name}</a></li>",
id = "reexports",
- name = "Reexports"));
+ name = "Re-exports"));
}
// ordering taken from item_module, reorder, where it prioritized elements in a certain order
if items.iter().any(|it| !it.is_stripped() && it.type_() == myty) {
let (short, name) = match myty {
ItemType::ExternCrate |
- ItemType::Import => ("reexports", "Reexports"),
+ ItemType::Import => ("reexports", "Re-exports"),
ItemType::Module => ("modules", "Modules"),
ItemType::Struct => ("structs", "Structs"),
ItemType::Union => ("unions", "Unions"),
* This code is an unmodified version of the code written by Marco de Wit
* and was found at http://stackoverflow.com/a/18514751/745719
*/
- var levenshtein = (function() {
- var row2 = [];
- return function(s1, s2) {
- if (s1 === s2) {
- return 0;
+ var levenshtein_row2 = [];
+ function levenshtein(s1, s2) {
+ if (s1 === s2) {
+ return 0;
+ }
+ var s1_len = s1.length, s2_len = s2.length;
+ if (s1_len && s2_len) {
+ var i1 = 0, i2 = 0, a, b, c, c2, row = levenshtein_row2;
+ while (i1 < s1_len) {
+ row[i1] = ++i1;
}
- var s1_len = s1.length, s2_len = s2.length;
- if (s1_len && s2_len) {
- var i1 = 0, i2 = 0, a, b, c, c2, row = row2;
- while (i1 < s1_len) {
- row[i1] = ++i1;
- }
- while (i2 < s2_len) {
- c2 = s2.charCodeAt(i2);
- a = i2;
- ++i2;
- b = i2;
- for (i1 = 0; i1 < s1_len; ++i1) {
- c = a + (s1.charCodeAt(i1) !== c2 ? 1 : 0);
- a = row[i1];
- b = b < a ? (b < c ? b + 1 : c) : (a < c ? a + 1 : c);
- row[i1] = b;
- }
+ while (i2 < s2_len) {
+ c2 = s2.charCodeAt(i2);
+ a = i2;
+ ++i2;
+ b = i2;
+ for (i1 = 0; i1 < s1_len; ++i1) {
+ c = a + (s1.charCodeAt(i1) !== c2 ? 1 : 0);
+ a = row[i1];
+ b = b < a ? (b < c ? b + 1 : c) : (a < c ? a + 1 : c);
+ row[i1] = b;
}
- return b;
}
- return s1_len + s2_len;
- };
- })();
+ return b;
+ }
+ return s1_len + s2_len;
+ }
function initSearch(rawSearchIndex) {
var currentResults, index, searchIndex;
/**
* Executes the query and builds an index of results
* @param {[Object]} query [The user query]
- * @param {[type]} max [The maximum results returned]
* @param {[type]} searchWords [The list of search words to query
* against]
* @return {[type]} [A search index of results]
*/
- function execQuery(query, max, searchWords) {
+ function execQuery(query, searchWords) {
+ function itemTypeFromName(typename) {
+ for (var i = 0; i < itemTypes.length; ++i) {
+ if (itemTypes[i] === typename) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
var valLower = query.query.toLowerCase(),
val = valLower,
typeFilter = itemTypeFromName(query.type),
return true;
}
- function getQuery() {
- var matches, type, query, raw =
- document.getElementsByClassName('search-input')[0].value;
+ function getQuery(raw) {
+ var matches, type, query;
query = raw;
matches = query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);
}
function showResults(results) {
- var output, query = getQuery();
+ var output, query = getQuery(document.getElementsByClassName('search-input')[0].value);
currentResults = query.id;
output = '<h1>Results for ' + escape(query.query) +
resultIndex;
var params = getQueryStringParams();
- query = getQuery();
+ query = getQuery(document.getElementsByClassName('search-input')[0].value);
if (e) {
e.preventDefault();
}
}
}
- results = execQuery(query, 20000, index);
+ results = execQuery(query, index);
showResults(results);
}
- function itemTypeFromName(typename) {
- for (var i = 0; i < itemTypes.length; ++i) {
- if (itemTypes[i] === typename) {
- return i;
- }
- }
- return -1;
- }
-
function buildIndex(rawSearchIndex) {
searchIndex = [];
var searchWords = [];
flex: 0 0 auto;
box-shadow: 0 0 6px rgba(0,0,0,.2);
width: 550px;
- height: 354px;
+ height: auto;
border: 1px solid;
}
#help dt {
float: left;
- border-radius: 4px;
- border: 1px solid;
- width: 23px;
- text-align: center;
clear: left;
display: block;
- margin-top: -1px;
}
#help dd { margin: 5px 35px; }
#help .infos { padding-left: 0; }
left: -42px;
margin-top: 2px;
}
+
+kbd {
+ display: inline-block;
+ padding: 3px 5px;
+ font: 15px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ line-height: 10px;
+ vertical-align: middle;
+ border: solid 1px;
+ border-radius: 3px;
+ box-shadow: inset 0 -1px 0;
+}
border-color: #bfbfbf;
}
-#help dt {
- border-color: #bfbfbf;
- background: #fff;
-}
-
.since {
color: grey;
}
border-bottom-color: #e0e0e0;
}
}
+
+kbd {
+ color: #444d56;
+ background-color: #fafbfc;
+ border-color: #d1d5da;
+ border-bottom-color: #c6cbd1;
+ box-shadow-color: #c6cbd1;
+}
or `#![doc(html_playground_url=...)]`",
"URL")
}),
- unstable("enable-commonmark", |o| {
- o.optflag("", "enable-commonmark", "to enable commonmark doc rendering/testing")
+ unstable("disable-commonmark", |o| {
+ o.optflag("", "disable-commonmark", "to disable commonmark doc rendering/testing")
}),
unstable("display-warnings", |o| {
o.optflag("", "display-warnings", "to print code warnings when testing doc")
let css_file_extension = matches.opt_str("e").map(|s| PathBuf::from(&s));
let cfgs = matches.opt_strs("cfg");
- let render_type = if matches.opt_present("enable-commonmark") {
- RenderType::Pulldown
- } else {
+ let render_type = if matches.opt_present("disable-commonmark") {
RenderType::Hoedown
+ } else {
+ RenderType::Pulldown
};
if let Some(ref p) = css_file_extension {
impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
pub fn new(cstore: &'tcx CrateStore,
cx: &'a core::DocContext<'a, 'tcx>) -> RustdocVisitor<'a, 'tcx> {
- // If the root is reexported, terminate all recursion.
+ // If the root is re-exported, terminate all recursion.
let mut stack = FxHashSet();
stack.insert(ast::CRATE_NODE_ID);
RustdocVisitor {
let imported_from = self.cx.tcx.original_crate_name(def_id.krate);
let def = match self.cstore.load_macro_untracked(def_id, self.cx.sess()) {
LoadedMacro::MacroDef(macro_def) => macro_def,
- // FIXME(jseyfried): document proc macro reexports
+ // FIXME(jseyfried): document proc macro re-exports
LoadedMacro::ProcMacro(..) => continue,
};
// except according to those terms.
#[inline]
-fn write_to_vec(vec: &mut Vec<u8>, position: usize, byte: u8) {
+pub fn write_to_vec(vec: &mut Vec<u8>, position: usize, byte: u8) {
if position == vec.len() {
vec.push(byte);
} else {
}
}
-#[inline]
-/// encodes an integer using unsigned leb128 encoding and stores
-/// the result using a callback function.
-///
-/// The callback `write` is called once for each position
-/// that is to be written to with the byte to be encoded
-/// at that position.
-pub fn write_unsigned_leb128_to<W>(mut value: u128, mut write: W) -> usize
- where W: FnMut(usize, u8)
-{
- let mut position = 0;
- loop {
- let mut byte = (value & 0x7F) as u8;
- value >>= 7;
- if value != 0 {
- byte |= 0x80;
- }
-
- write(position, byte);
- position += 1;
+#[cfg(target_pointer_width = "32")]
+const USIZE_LEB128_SIZE: usize = 5;
+#[cfg(target_pointer_width = "64")]
+const USIZE_LEB128_SIZE: usize = 10;
+
+macro_rules! leb128_size {
+ (u16) => (3);
+ (u32) => (5);
+ (u64) => (10);
+ (u128) => (19);
+ (usize) => (USIZE_LEB128_SIZE);
+}
- if value == 0 {
- break;
+macro_rules! impl_write_unsigned_leb128 {
+ ($fn_name:ident, $int_ty:ident) => (
+ #[inline]
+ pub fn $fn_name(out: &mut Vec<u8>, start_position: usize, mut value: $int_ty) -> usize {
+ let mut position = start_position;
+ for _ in 0 .. leb128_size!($int_ty) {
+ let mut byte = (value & 0x7F) as u8;
+ value >>= 7;
+ if value != 0 {
+ byte |= 0x80;
+ }
+
+ write_to_vec(out, position, byte);
+ position += 1;
+
+ if value == 0 {
+ break;
+ }
+ }
+
+ position - start_position
}
- }
-
- position
+ )
}
-pub fn write_unsigned_leb128(out: &mut Vec<u8>, start_position: usize, value: u128) -> usize {
- write_unsigned_leb128_to(value, |i, v| write_to_vec(out, start_position+i, v))
+impl_write_unsigned_leb128!(write_u16_leb128, u16);
+impl_write_unsigned_leb128!(write_u32_leb128, u32);
+impl_write_unsigned_leb128!(write_u64_leb128, u64);
+impl_write_unsigned_leb128!(write_u128_leb128, u128);
+impl_write_unsigned_leb128!(write_usize_leb128, usize);
+
+
+macro_rules! impl_read_unsigned_leb128 {
+ ($fn_name:ident, $int_ty:ident) => (
+ #[inline]
+ pub fn $fn_name(slice: &[u8]) -> ($int_ty, usize) {
+ let mut result: $int_ty = 0;
+ let mut shift = 0;
+ let mut position = 0;
+
+ for _ in 0 .. leb128_size!($int_ty) {
+ let byte = unsafe {
+ *slice.get_unchecked(position)
+ };
+ position += 1;
+ result |= ((byte & 0x7F) as $int_ty) << shift;
+ if (byte & 0x80) == 0 {
+ break;
+ }
+ shift += 7;
+ }
+
+ // Do a single bounds check at the end instead of for every byte.
+ assert!(position <= slice.len());
+
+ (result, position)
+ }
+ )
}
-#[inline]
-pub fn read_unsigned_leb128(data: &[u8], start_position: usize) -> (u128, usize) {
- let mut result = 0;
- let mut shift = 0;
- let mut position = start_position;
- loop {
- let byte = data[position];
- position += 1;
- result |= ((byte & 0x7F) as u128) << shift;
- if (byte & 0x80) == 0 {
- break;
- }
- shift += 7;
- }
+impl_read_unsigned_leb128!(read_u16_leb128, u16);
+impl_read_unsigned_leb128!(read_u32_leb128, u32);
+impl_read_unsigned_leb128!(read_u64_leb128, u64);
+impl_read_unsigned_leb128!(read_u128_leb128, u128);
+impl_read_unsigned_leb128!(read_usize_leb128, usize);
+
- (result, position - start_position)
-}
#[inline]
/// encodes an integer using signed leb128 encoding and stores
(result, position - start_position)
}
-#[test]
-fn test_unsigned_leb128() {
- let mut stream = Vec::with_capacity(10000);
-
- for x in 0..62 {
- let pos = stream.len();
- let bytes_written = write_unsigned_leb128(&mut stream, pos, 3 << x);
- assert_eq!(stream.len(), pos + bytes_written);
- }
-
- let mut position = 0;
- for x in 0..62 {
- let expected = 3 << x;
- let (actual, bytes_read) = read_unsigned_leb128(&stream, position);
- assert_eq!(expected, actual);
- position += bytes_read;
- }
- assert_eq!(stream.len(), position);
+macro_rules! impl_test_unsigned_leb128 {
+ ($test_name:ident, $write_fn_name:ident, $read_fn_name:ident, $int_ty:ident) => (
+ #[test]
+ fn $test_name() {
+ let mut stream = Vec::new();
+
+ for x in 0..62 {
+ let pos = stream.len();
+ let bytes_written = $write_fn_name(&mut stream, pos, (3u64 << x) as $int_ty);
+ assert_eq!(stream.len(), pos + bytes_written);
+ }
+
+ let mut position = 0;
+ for x in 0..62 {
+ let expected = (3u64 << x) as $int_ty;
+ let (actual, bytes_read) = $read_fn_name(&stream[position ..]);
+ assert_eq!(expected, actual);
+ position += bytes_read;
+ }
+ assert_eq!(stream.len(), position);
+ }
+ )
}
+impl_test_unsigned_leb128!(test_u16_leb128, write_u16_leb128, read_u16_leb128, u16);
+impl_test_unsigned_leb128!(test_u32_leb128, write_u32_leb128, read_u32_leb128, u32);
+impl_test_unsigned_leb128!(test_u64_leb128, write_u64_leb128, read_u64_leb128, u64);
+impl_test_unsigned_leb128!(test_u128_leb128, write_u128_leb128, read_u128_leb128, u128);
+impl_test_unsigned_leb128!(test_usize_leb128, write_usize_leb128, read_usize_leb128, usize);
+
#[test]
fn test_signed_leb128() {
let values: Vec<_> = (-500..500).map(|i| i * 0x12345789ABCDEF).collect();
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use leb128::{read_signed_leb128, read_unsigned_leb128, write_signed_leb128, write_unsigned_leb128};
+use leb128::{self, read_signed_leb128, write_signed_leb128};
use std::borrow::Cow;
use std::io::{self, Write};
use serialize;
macro_rules! write_uleb128 {
- ($enc:expr, $value:expr) => {{
+ ($enc:expr, $value:expr, $fun:ident) => {{
let pos = $enc.cursor.position() as usize;
- let bytes_written = write_unsigned_leb128($enc.cursor.get_mut(), pos, $value as u128);
+ let bytes_written = leb128::$fun($enc.cursor.get_mut(), pos, $value);
$enc.cursor.set_position((pos + bytes_written) as u64);
Ok(())
}}
impl<'a> serialize::Encoder for Encoder<'a> {
type Error = io::Error;
+ #[inline]
fn emit_nil(&mut self) -> EncodeResult {
Ok(())
}
+ #[inline]
fn emit_usize(&mut self, v: usize) -> EncodeResult {
- write_uleb128!(self, v)
+ write_uleb128!(self, v, write_usize_leb128)
}
+ #[inline]
fn emit_u128(&mut self, v: u128) -> EncodeResult {
- write_uleb128!(self, v)
+ write_uleb128!(self, v, write_u128_leb128)
}
+ #[inline]
fn emit_u64(&mut self, v: u64) -> EncodeResult {
- write_uleb128!(self, v)
+ write_uleb128!(self, v, write_u64_leb128)
}
+ #[inline]
fn emit_u32(&mut self, v: u32) -> EncodeResult {
- write_uleb128!(self, v)
+ write_uleb128!(self, v, write_u32_leb128)
}
+ #[inline]
fn emit_u16(&mut self, v: u16) -> EncodeResult {
- write_uleb128!(self, v)
+ write_uleb128!(self, v, write_u16_leb128)
}
+ #[inline]
fn emit_u8(&mut self, v: u8) -> EncodeResult {
- let _ = self.cursor.write_all(&[v]);
+ let pos = self.cursor.position() as usize;
+ leb128::write_to_vec(self.cursor.get_mut(), pos, v);
+ self.cursor.set_position((pos + 1) as u64);
Ok(())
}
+ #[inline]
fn emit_isize(&mut self, v: isize) -> EncodeResult {
write_sleb128!(self, v)
}
+ #[inline]
fn emit_i128(&mut self, v: i128) -> EncodeResult {
write_sleb128!(self, v)
}
+ #[inline]
fn emit_i64(&mut self, v: i64) -> EncodeResult {
write_sleb128!(self, v)
}
+ #[inline]
fn emit_i32(&mut self, v: i32) -> EncodeResult {
write_sleb128!(self, v)
}
+ #[inline]
fn emit_i16(&mut self, v: i16) -> EncodeResult {
write_sleb128!(self, v)
}
+ #[inline]
fn emit_i8(&mut self, v: i8) -> EncodeResult {
let as_u8: u8 = unsafe { ::std::mem::transmute(v) };
- let _ = self.cursor.write_all(&[as_u8]);
- Ok(())
+ self.emit_u8(as_u8)
}
+ #[inline]
fn emit_bool(&mut self, v: bool) -> EncodeResult {
self.emit_u8(if v {
1
})
}
+ #[inline]
fn emit_f64(&mut self, v: f64) -> EncodeResult {
let as_u64: u64 = unsafe { ::std::mem::transmute(v) };
self.emit_u64(as_u64)
}
+ #[inline]
fn emit_f32(&mut self, v: f32) -> EncodeResult {
let as_u32: u32 = unsafe { ::std::mem::transmute(v) };
self.emit_u32(as_u32)
}
+ #[inline]
fn emit_char(&mut self, v: char) -> EncodeResult {
self.emit_u32(v as u32)
}
+ #[inline]
fn emit_str(&mut self, v: &str) -> EncodeResult {
self.emit_usize(v.len())?;
let _ = self.cursor.write_all(v.as_bytes());
}
impl<'a> Encoder<'a> {
+ #[inline]
pub fn position(&self) -> usize {
self.cursor.position() as usize
}
}
}
+ #[inline]
pub fn position(&self) -> usize {
self.position
}
+ #[inline]
pub fn set_position(&mut self, pos: usize) {
self.position = pos
}
+ #[inline]
pub fn advance(&mut self, bytes: usize) {
self.position += bytes;
}
}
macro_rules! read_uleb128 {
- ($dec:expr, $t:ty) => ({
- let (value, bytes_read) = read_unsigned_leb128($dec.data, $dec.position);
+ ($dec:expr, $t:ty, $fun:ident) => ({
+ let (value, bytes_read) = leb128::$fun(&$dec.data[$dec.position ..]);
$dec.position += bytes_read;
- Ok(value as $t)
+ Ok(value)
})
}
#[inline]
fn read_u128(&mut self) -> Result<u128, Self::Error> {
- read_uleb128!(self, u128)
+ read_uleb128!(self, u128, read_u128_leb128)
}
#[inline]
fn read_u64(&mut self) -> Result<u64, Self::Error> {
- read_uleb128!(self, u64)
+ read_uleb128!(self, u64, read_u64_leb128)
}
#[inline]
fn read_u32(&mut self) -> Result<u32, Self::Error> {
- read_uleb128!(self, u32)
+ read_uleb128!(self, u32, read_u32_leb128)
}
#[inline]
fn read_u16(&mut self) -> Result<u16, Self::Error> {
- read_uleb128!(self, u16)
+ read_uleb128!(self, u16, read_u16_leb128)
}
#[inline]
#[inline]
fn read_usize(&mut self) -> Result<usize, Self::Error> {
- read_uleb128!(self, usize)
+ read_uleb128!(self, usize, read_usize_leb128)
}
#[inline]
use mem::{align_of, size_of, needs_drop};
use mem;
use ops::{Deref, DerefMut};
-use ptr::{self, Unique, Shared};
+use ptr::{self, Unique, NonNull};
use self::BucketState::*;
elems_left,
marker: marker::PhantomData,
},
- table: Shared::from(self),
+ table: NonNull::from(self),
marker: marker::PhantomData,
}
}
/// Iterator over the entries in a table, clearing the table.
pub struct Drain<'a, K: 'a, V: 'a> {
- table: Shared<RawTable<K, V>>,
+ table: NonNull<RawTable<K, V>>,
iter: RawBuckets<'static, K, V>,
marker: marker::PhantomData<&'a RawTable<K, V>>,
}
recursive: bool,
}
-/// How large a buffer to pre-allocate before reading the entire file at `path`.
-fn initial_buffer_size<P: AsRef<Path>>(path: P) -> usize {
+/// How large a buffer to pre-allocate before reading the entire file.
+fn initial_buffer_size(file: &File) -> usize {
// Allocate one extra byte so the buffer doesn't need to grow before the
// final `read` call at the end of the file. Don't worry about `usize`
// overflow because reading will fail regardless in that case.
- metadata(path).map(|m| m.len() as usize + 1).unwrap_or(0)
+ file.metadata().map(|m| m.len() as usize + 1).unwrap_or(0)
}
/// Read the entire contents of a file into a bytes vector.
/// ```
#[unstable(feature = "fs_read_write", issue = "46588")]
pub fn read<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
- let mut bytes = Vec::with_capacity(initial_buffer_size(&path));
- File::open(path)?.read_to_end(&mut bytes)?;
+ let mut file = File::open(path)?;
+ let mut bytes = Vec::with_capacity(initial_buffer_size(&file));
+ file.read_to_end(&mut bytes)?;
Ok(bytes)
}
/// ```
#[unstable(feature = "fs_read_write", issue = "46588")]
pub fn read_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
- let mut string = String::with_capacity(initial_buffer_size(&path));
- File::open(path)?.read_to_string(&mut string)?;
+ let mut file = File::open(path)?;
+ let mut string = String::with_capacity(initial_buffer_size(&file));
+ file.read_to_string(&mut string)?;
Ok(string)
}
#![feature(placement_in_syntax)]
#![feature(placement_new_protocol)]
#![feature(prelude_import)]
+#![feature(ptr_internals)]
#![feature(rand)]
#![feature(raw)]
#![feature(repr_align)]
#![feature(rustc_attrs)]
-#![feature(shared)]
#![feature(sip_hash_13)]
#![feature(slice_bytes)]
#![feature(slice_concat_ext)]
#![feature(try_from)]
#![feature(unboxed_closures)]
#![feature(unicode)]
-#![feature(unique)]
#![feature(untagged_unions)]
#![feature(unwind_attributes)]
#![feature(vec_push_all)]
#[cfg(test)] extern crate test;
#[cfg(test)] extern crate rand;
-// We want to reexport a few macros from core but libcore has already been
+// We want to re-export a few macros from core but libcore has already been
// imported by the compiler (via our #[no_std] attribute) In this case we just
-// add a new crate name so we can attach the reexports to it.
+// add a new crate name so we can attach the re-exports to it.
#[macro_reexport(assert, assert_eq, assert_ne, debug_assert, debug_assert_eq,
debug_assert_ne, unreachable, unimplemented, write, writeln, try)]
extern crate core as __core;
// The Rust prelude
pub mod prelude;
-// Public module declarations and reexports
+// Public module declarations and re-exports
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::any;
#[stable(feature = "rust1", since = "1.0.0")]
use hash;
use io;
use mem;
-use net::{lookup_host, ntoh, hton, IpAddr, Ipv4Addr, Ipv6Addr};
+use net::{ntoh, hton, IpAddr, Ipv4Addr, Ipv6Addr};
+#[allow(deprecated)]
+use net::lookup_host;
use option;
use sys::net::netc as c;
use sys_common::{FromInner, AsInner, IntoInner};
}
}
+#[allow(deprecated)]
fn resolve_socket_addr(s: &str, p: u16) -> io::Result<vec::IntoIter<SocketAddr>> {
let ips = lookup_host(s)?;
let v: Vec<_> = ips.map(|mut a| { a.set_port(p); a }).collect();
iterator and returning socket \
addresses",
issue = "27705")]
+#[rustc_deprecated(since = "1.25", reason = "Use the ToSocketAddrs trait instead")]
pub struct LookupHost(net_imp::LookupHost);
#[unstable(feature = "lookup_host", reason = "unsure about the returned \
iterator and returning socket \
addresses",
issue = "27705")]
+#[rustc_deprecated(since = "1.25", reason = "Use the ToSocketAddrs trait instead")]
+#[allow(deprecated)]
impl Iterator for LookupHost {
type Item = SocketAddr;
fn next(&mut self) -> Option<SocketAddr> { self.0.next() }
iterator and returning socket \
addresses",
issue = "27705")]
+#[rustc_deprecated(since = "1.25", reason = "Use the ToSocketAddrs trait instead")]
+#[allow(deprecated)]
impl fmt::Debug for LookupHost {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.pad("LookupHost { .. }")
iterator and returning socket \
addresses",
issue = "27705")]
+#[rustc_deprecated(since = "1.25", reason = "Use the ToSocketAddrs trait instead")]
+#[allow(deprecated)]
pub fn lookup_host(host: &str) -> io::Result<LookupHost> {
net_imp::lookup_host(host).map(LookupHost)
}
use fmt;
use ops::{Deref, DerefMut};
use panicking;
-use ptr::{Unique, Shared};
+use ptr::{Unique, NonNull};
use rc::Rc;
use sync::{Arc, Mutex, RwLock, atomic};
use thread::Result;
impl<T: RefUnwindSafe + ?Sized> UnwindSafe for *const T {}
#[stable(feature = "catch_unwind", since = "1.9.0")]
impl<T: RefUnwindSafe + ?Sized> UnwindSafe for *mut T {}
-#[unstable(feature = "unique", issue = "27730")]
+#[unstable(feature = "ptr_internals", issue = "0")]
impl<T: UnwindSafe + ?Sized> UnwindSafe for Unique<T> {}
-#[unstable(feature = "shared", issue = "27730")]
-impl<T: RefUnwindSafe + ?Sized> UnwindSafe for Shared<T> {}
+#[stable(feature = "nonnull", since = "1.24.0")]
+impl<T: RefUnwindSafe + ?Sized> UnwindSafe for NonNull<T> {}
#[stable(feature = "catch_unwind", since = "1.9.0")]
impl<T: ?Sized> UnwindSafe for Mutex<T> {}
#[stable(feature = "catch_unwind", since = "1.9.0")]
//! # Prelude contents
//!
//! The current version of the prelude (version 1) lives in
-//! [`std::prelude::v1`], and reexports the following.
+//! [`std::prelude::v1`], and re-exports the following.
//!
//! * [`std::marker`]::{[`Copy`], [`Send`], [`Sized`], [`Sync`]}. The marker
//! traits indicate fundamental properties of types.
#![stable(feature = "rust1", since = "1.0.0")]
-// Reexported core operators
+// Re-exported core operators
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)] pub use marker::{Copy, Send, Sized, Sync};
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)] pub use ops::{Drop, Fn, FnMut, FnOnce};
-// Reexported functions
+// Re-exported functions
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)] pub use mem::drop;
-// Reexported types and traits
+// Re-exported types and traits
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)] pub use boxed::Box;
#[stable(feature = "rust1", since = "1.0.0")]
#![doc(hidden)]
-// Reexport some of our utilities which are expected by other crates.
+// Re-export some of our utilities which are expected by other crates.
pub use panicking::{begin_panic, begin_panic_fmt, update_panic_count};
// To reduce the generated code of the new `lang_start`, this function is doing
#[cfg(target_os = "macos")]
pub unsafe fn current() -> Option<usize> {
- Some((libc::pthread_get_stackaddr_np(libc::pthread_self()) as usize -
- libc::pthread_get_stacksize_np(libc::pthread_self())))
+ Some(libc::pthread_get_stackaddr_np(libc::pthread_self()) as usize -
+ libc::pthread_get_stacksize_np(libc::pthread_self()))
}
#[cfg(any(target_os = "openbsd", target_os = "bitrig"))]
use core::fmt::{self, Write};
use tables::{conversions, derived_property, general_category, property};
-// stable reexports
+// stable re-exports
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::char::{MAX, from_digit, from_u32, from_u32_unchecked};
#[stable(feature = "rust1", since = "1.0.0")]
#[stable(feature = "char_from_str", since = "1.20.0")]
pub use core::char::ParseCharError;
-// unstable reexports
+// unstable re-exports
#[unstable(feature = "try_from", issue = "33417")]
pub use core::char::CharTryFromError;
#[unstable(feature = "decode_utf8", issue = "33906")]
use ast::{self, Attribute, Name, PatKind, MetaItem};
use attr::HasAttrs;
use codemap::{self, CodeMap, Spanned, respan};
-use syntax_pos::{Span, DUMMY_SP};
+use syntax_pos::{Span, MultiSpan, DUMMY_SP};
use errors::DiagnosticBuilder;
use ext::expand::{self, Expansion, Invocation};
use ext::hygiene::{Mark, SyntaxContext};
last_macro
}
- pub fn struct_span_warn(&self,
- sp: Span,
- msg: &str)
- -> DiagnosticBuilder<'a> {
+ pub fn struct_span_warn<S: Into<MultiSpan>>(&self,
+ sp: S,
+ msg: &str)
+ -> DiagnosticBuilder<'a> {
self.parse_sess.span_diagnostic.struct_span_warn(sp, msg)
}
- pub fn struct_span_err(&self,
- sp: Span,
- msg: &str)
- -> DiagnosticBuilder<'a> {
+ pub fn struct_span_err<S: Into<MultiSpan>>(&self,
+ sp: S,
+ msg: &str)
+ -> DiagnosticBuilder<'a> {
self.parse_sess.span_diagnostic.struct_span_err(sp, msg)
}
- pub fn struct_span_fatal(&self,
- sp: Span,
- msg: &str)
- -> DiagnosticBuilder<'a> {
+ pub fn struct_span_fatal<S: Into<MultiSpan>>(&self,
+ sp: S,
+ msg: &str)
+ -> DiagnosticBuilder<'a> {
self.parse_sess.span_diagnostic.struct_span_fatal(sp, msg)
}
/// in most cases one can construct a dummy expression/item to
/// substitute; we never hit resolve/type-checking so the dummy
/// value doesn't have to match anything)
- pub fn span_fatal(&self, sp: Span, msg: &str) -> ! {
+ pub fn span_fatal<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> ! {
panic!(self.parse_sess.span_diagnostic.span_fatal(sp, msg));
}
///
/// Compilation will be stopped in the near future (at the end of
/// the macro expansion phase).
- pub fn span_err(&self, sp: Span, msg: &str) {
+ pub fn span_err<S: Into<MultiSpan>>(&self, sp: S, msg: &str) {
self.parse_sess.span_diagnostic.span_err(sp, msg);
}
- pub fn mut_span_err(&self, sp: Span, msg: &str)
+ pub fn mut_span_err<S: Into<MultiSpan>>(&self, sp: S, msg: &str)
-> DiagnosticBuilder<'a> {
self.parse_sess.span_diagnostic.mut_span_err(sp, msg)
}
- pub fn span_warn(&self, sp: Span, msg: &str) {
+ pub fn span_warn<S: Into<MultiSpan>>(&self, sp: S, msg: &str) {
self.parse_sess.span_diagnostic.span_warn(sp, msg);
}
- pub fn span_unimpl(&self, sp: Span, msg: &str) -> ! {
+ pub fn span_unimpl<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> ! {
self.parse_sess.span_diagnostic.span_unimpl(sp, msg);
}
- pub fn span_bug(&self, sp: Span, msg: &str) -> ! {
+ pub fn span_bug<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> ! {
self.parse_sess.span_diagnostic.span_bug(sp, msg);
}
pub fn trace_macros_diag(&mut self) {
use ptr::P;
use symbol::{Symbol, keywords};
-// Transitional reexports so qquote can find the paths it is looking for
+// Transitional re-exports so qquote can find the paths it is looking for
mod syntax {
pub use ext;
pub use parse;
// OIBIT specific features
(active, optin_builtin_traits, "1.0.0", Some(13231)),
- // macro reexport needs more discussion and stabilization
+ // macro re-export needs more discussion and stabilization
(active, macro_reexport, "1.0.0", Some(29638)),
// Allows use of #[staged_api]
ast::ItemKind::ExternCrate(_) => {
if let Some(attr) = attr::find_by_name(&i.attrs[..], "macro_reexport") {
gate_feature_post!(&self, macro_reexport, attr.span,
- "macros reexports are experimental \
+ "macros re-exports are experimental \
and possibly buggy");
}
}
use ast::{RangeEnd, RangeSyntax};
use {ast, attr};
use codemap::{self, CodeMap, Spanned, respan};
-use syntax_pos::{self, Span, BytePos, FileName, DUMMY_SP};
+use syntax_pos::{self, Span, MultiSpan, BytePos, FileName, DUMMY_SP};
use errors::{self, DiagnosticBuilder};
use parse::{self, classify, token};
use parse::common::SeqSep;
}
impl Error {
- pub fn span_err(self, sp: Span, handler: &errors::Handler) -> DiagnosticBuilder {
+ pub fn span_err<S: Into<MultiSpan>>(self,
+ sp: S,
+ handler: &errors::Handler) -> DiagnosticBuilder {
match self {
Error::FileNotFoundForModule { ref mod_name,
ref default_path,
pub fn fatal(&self, m: &str) -> DiagnosticBuilder<'a> {
self.sess.span_diagnostic.struct_span_fatal(self.span, m)
}
- pub fn span_fatal(&self, sp: Span, m: &str) -> DiagnosticBuilder<'a> {
+ pub fn span_fatal<S: Into<MultiSpan>>(&self, sp: S, m: &str) -> DiagnosticBuilder<'a> {
self.sess.span_diagnostic.struct_span_fatal(sp, m)
}
- pub fn span_fatal_err(&self, sp: Span, err: Error) -> DiagnosticBuilder<'a> {
+ pub fn span_fatal_err<S: Into<MultiSpan>>(&self, sp: S, err: Error) -> DiagnosticBuilder<'a> {
err.span_err(sp, self.diagnostic())
}
- pub fn span_fatal_help(&self, sp: Span, m: &str, help: &str) -> DiagnosticBuilder<'a> {
+ pub fn span_fatal_help<S: Into<MultiSpan>>(&self,
+ sp: S,
+ m: &str,
+ help: &str) -> DiagnosticBuilder<'a> {
let mut err = self.sess.span_diagnostic.struct_span_fatal(sp, m);
err.help(help);
err
pub fn warn(&self, m: &str) {
self.sess.span_diagnostic.span_warn(self.span, m)
}
- pub fn span_warn(&self, sp: Span, m: &str) {
+ pub fn span_warn<S: Into<MultiSpan>>(&self, sp: S, m: &str) {
self.sess.span_diagnostic.span_warn(sp, m)
}
- pub fn span_err(&self, sp: Span, m: &str) {
+ pub fn span_err<S: Into<MultiSpan>>(&self, sp: S, m: &str) {
self.sess.span_diagnostic.span_err(sp, m)
}
- pub fn struct_span_err(&self, sp: Span, m: &str) -> DiagnosticBuilder<'a> {
+ pub fn struct_span_err<S: Into<MultiSpan>>(&self, sp: S, m: &str) -> DiagnosticBuilder<'a> {
self.sess.span_diagnostic.struct_span_err(sp, m)
}
- pub fn span_err_help(&self, sp: Span, m: &str, h: &str) {
+ pub fn span_err_help<S: Into<MultiSpan>>(&self, sp: S, m: &str, h: &str) {
let mut err = self.sess.span_diagnostic.mut_span_err(sp, m);
err.help(h);
err.emit();
}
- pub fn span_bug(&self, sp: Span, m: &str) -> ! {
+ pub fn span_bug<S: Into<MultiSpan>>(&self, sp: S, m: &str) -> ! {
self.sess.span_diagnostic.span_bug(sp, m)
}
pub fn abort_if_errors(&self) {
let (sp, msg) = errs.into_iter().next().unwrap();
cx.ecx.struct_span_err(sp, msg)
} else {
- let mut diag = cx.ecx.struct_span_err(cx.fmtsp,
- "multiple unused formatting arguments");
-
- // Ignoring message, as it gets repetitive
- // Then use MultiSpan to not clutter up errors
- for (sp, _) in errs {
- diag.span_label(sp, "unused");
- }
-
+ let mut diag = cx.ecx.struct_span_err(
+ errs.iter().map(|&(sp, _)| sp).collect::<Vec<Span>>(),
+ "multiple unused formatting arguments"
+ );
+ diag.span_label(cx.fmtsp, "multiple unused arguments in this statement");
diag
}
};
--- /dev/null
+// Copyright 2018 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.
+
+// -C no-prepopulate-passes
+#![crate_type="staticlib"]
+
+#[repr(C)]
+pub struct Foo(u64);
+
+// CHECK: define {{.*}} @foo(
+#[no_mangle]
+pub extern fn foo(_: Foo) -> Foo { loop {} }
--- /dev/null
+// 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.
+
+// check that we don't emit unneeded `resume` cleanup blocks for every
+// destructor.
+
+// CHECK-NOT: Unwind
+
+#![feature(test)]
+#![crate_type="rlib"]
+
+extern crate test;
+
+struct Foo {}
+
+impl Drop for Foo {
+ fn drop(&mut self) {
+ test::black_box(());
+ }
+}
+
+#[no_mangle]
+pub fn foo() {
+ let _foo = Foo {};
+}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// Test that macro reexports item are gated by `macro_reexport` feature gate.
+// Test that macro re-exports item are gated by `macro_reexport` feature gate.
// aux-build:macro_reexport_1.rs
// gate-test-macro_reexport
#![crate_type = "dylib"]
#[macro_reexport(reexported)]
-//~^ ERROR macros reexports are experimental and possibly buggy
+//~^ ERROR macros re-exports are experimental and possibly buggy
#[macro_use] #[no_link]
extern crate macro_reexport_1;
}
pub use foo as foo2;
-//~^ ERROR `foo` is private, and cannot be reexported [E0365]
+//~^ ERROR `foo` is private, and cannot be re-exported [E0365]
fn main() {}
fn foo() {}
}
- // these are public so the parent can reexport them.
+ // these are public so the parent can re-export them.
pub static reexported_a: isize = 0;
pub fn reexported_b() {}
pub struct reexported_c;
mod foo {}
mod a {
- pub use super::foo; //~ ERROR cannot be reexported
+ pub use super::foo; //~ ERROR cannot be re-exported
pub use super::*; //~ ERROR must import something with the glob's visibility
}
}
pub mod a {
pub use super::foo; // This is OK since the value `foo` is visible enough.
- fn f(_: foo::S) {} // `foo` is imported in the type namespace (but not `pub` reexported).
+ fn f(_: foo::S) {} // `foo` is imported in the type namespace (but not `pub` re-exported).
}
pub mod b {
pub use super::*; // This is also OK since the value `foo` is visible enough.
- fn f(_: foo::S) {} // Again, the module `foo` is imported (but not `pub` reexported).
+ fn f(_: foo::S) {} // Again, the module `foo` is imported (but not `pub` re-exported).
}
}
mod c {
- // Test that `foo` is not reexported.
+ // Test that `foo` is not re-exported.
use b::a::foo::S; //~ ERROR `foo`
use b::b::foo::S as T; //~ ERROR `foo`
}
mod rank {
pub use self::Professor::*;
- //~^ ERROR enum is private and its variants cannot be reexported
+ //~^ ERROR enum is private and its variants cannot be re-exported
pub use self::Lieutenant::{JuniorGrade, Full};
- //~^ ERROR variant `JuniorGrade` is private and cannot be reexported
- //~| ERROR variant `Full` is private and cannot be reexported
+ //~^ ERROR variant `JuniorGrade` is private and cannot be re-exported
+ //~| ERROR variant `Full` is private and cannot be re-exported
pub use self::PettyOfficer::*;
- //~^ ERROR enum is private and its variants cannot be reexported
+ //~^ ERROR enum is private and its variants cannot be re-exported
pub use self::Crewman::*;
- //~^ ERROR enum is private and its variants cannot be reexported
+ //~^ ERROR enum is private and its variants cannot be re-exported
enum Professor {
Adjunct,
#[derive(Eq, PartialEq)]
struct X { y: bool }
impl X {
- fn foo(&self) -> bool { self.y }
+ fn foo(&self, conjunct: bool) -> bool { self.y && conjunct }
}
fn foo() -> isize {
return (1); //~ ERROR unnecessary parentheses around `return` value
}
-fn bar() -> X {
- return (X { y: true }); //~ ERROR unnecessary parentheses around `return` value
+fn bar(y: bool) -> X {
+ return (X { y }); //~ ERROR unnecessary parentheses around `return` value
}
fn main() {
foo();
- bar();
+ bar((true)); //~ ERROR unnecessary parentheses around function argument
if (true) {} //~ ERROR unnecessary parentheses around `if` condition
while (true) {} //~ ERROR unnecessary parentheses around `while` condition
if (X { y: true } == v) {}
if (X { y: false }.y) {}
- while (X { y: false }.foo()) {}
+ while (X { y: false }.foo(true)) {}
while (true | X { y: false }.y) {}
match (X { y: false }) {
_ => {}
}
+ X { y: false }.foo((true)); //~ ERROR unnecessary parentheses around method argument
+
let mut _a = (0); //~ ERROR unnecessary parentheses around assigned value
_a = (0); //~ ERROR unnecessary parentheses around assigned value
_a += (1); //~ ERROR unnecessary parentheses around assigned value
extern crate lint_unused_extern_crate5; //~ ERROR: unused extern crate
-pub extern crate lint_unused_extern_crate4; // no error, it is reexported
+pub extern crate lint_unused_extern_crate4; // no error, it is re-exported
extern crate lint_unused_extern_crate3; // no error, it is used
#![feature(macro_reexport)]
#[allow(unused_extern_crates)]
-#[macro_reexport] //~ ERROR bad macro reexport
+#[macro_reexport] //~ ERROR bad macro re-export
extern crate std;
#![feature(macro_reexport)]
#[allow(unused_extern_crates)]
-#[macro_reexport="foo"] //~ ERROR bad macro reexport
+#[macro_reexport="foo"] //~ ERROR bad macro re-export
extern crate std;
#![feature(macro_reexport)]
#[allow(unused_extern_crates)]
-#[macro_reexport(foo="bar")] //~ ERROR bad macro reexport
+#[macro_reexport(foo="bar")] //~ ERROR bad macro re-export
extern crate std;
#![feature(macro_reexport)]
#[macro_use(macro_two)]
-#[macro_reexport(no_way)] //~ ERROR reexported macro not found
+#[macro_reexport(no_way)] //~ ERROR re-exported macro not found
extern crate two_macros;
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-tidy-linelength
+
#![allow(unused)]
use m::S;
use S;
fn f() {
S(10);
- //~^ ERROR private struct constructors are not usable through reexports in outer modules
+ //~^ ERROR private struct constructors are not usable through re-exports in outer modules
//~| WARN this was previously accepted
}
}
fn f() {
use foo::bar::S;
pub(self) use foo::bar::f; // ok
- pub(super) use foo::bar::f as g; //~ ERROR cannot be reexported
+ pub(super) use foo::bar::f as g; //~ ERROR cannot be re-exported
S::default().x; // ok
S::default().f(); // ok
S::g(); // ok
// except according to those terms.
mod m1 {
- pub use ::E::V; //~ ERROR variant `V` is private and cannot be reexported
+ pub use ::E::V; //~ ERROR variant `V` is private and cannot be re-exported
}
mod m2 {
- pub use ::E::{V}; //~ ERROR variant `V` is private and cannot be reexported
+ pub use ::E::{V}; //~ ERROR variant `V` is private and cannot be re-exported
}
mod m3 {
- pub use ::E::V::{self}; //~ ERROR variant `V` is private and cannot be reexported
+ pub use ::E::V::{self}; //~ ERROR variant `V` is private and cannot be re-exported
}
mod m4 {
- pub use ::E::*; //~ ERROR enum is private and its variants cannot be reexported
+ pub use ::E::*; //~ ERROR enum is private and its variants cannot be re-exported
}
enum E { V }
#![allow(unused)]
extern crate core;
-pub use core as reexported_core; //~ ERROR `core` is private, and cannot be reexported
+pub use core as reexported_core; //~ ERROR `core` is private, and cannot be re-exported
//~^ WARN this was previously accepted
mod foo1 {
}
mod foo2 {
- use foo1::core; //~ ERROR `core` is private, and cannot be reexported
+ use foo1::core; //~ ERROR `core` is private, and cannot be re-exported
//~^ WARN this was previously accepted
pub mod bar {
extern crate core;
}
mod baz {
- pub use foo2::bar::core; //~ ERROR `core` is private, and cannot be reexported
+ pub use foo2::bar::core; //~ ERROR `core` is private, and cannot be re-exported
//~^ WARN this was previously accepted
}
--- /dev/null
+// Copyright 2018 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-prefer-dynamic
+
+#![crate_type = "proc-macro"]
+
+extern crate proc_macro;
+
+use proc_macro::TokenStream;
+
+// Add a function to shift DefIndex of registrar function
+#[cfg(cfail2)]
+fn foo() {}
+
+#[proc_macro_derive(IncrementalMacro)]
+pub fn derive(input: TokenStream) -> TokenStream {
+ #[cfg(cfail2)]
+ {
+ foo();
+ }
+
+ "".parse().unwrap()
+}
--- /dev/null
+// Copyright 2018 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.
+
+// aux-build:incremental_proc_macro_aux.rs
+// ignore-stage1
+// revisions: cfail1 cfail2
+// must-compile-successfully
+
+// This test makes sure that we still find the proc-macro registrar function
+// when we compile proc-macros incrementally (see #47292).
+
+#![crate_type = "rlib"]
+
+#[macro_use]
+extern crate incremental_proc_macro_aux;
+
+#[derive(IncrementalMacro)]
+pub struct Foo {
+ x: u32
+}
// compile-fail/type-mismatch-same-crate-name.rs
// but deals with the case where one of the crates
// is only introduced as an indirect dependency.
-// and the type is accessed via a reexport.
+// and the type is accessed via a re-export.
// This is similar to how the error can be introduced
// when using cargo's automatic dependency resolution.
use rustc::hir;
use syntax::attr;
-declare_lint!(CRATE_NOT_OKAY, Warn, "crate not marked with #![crate_okay]");
+macro_rules! fake_lint_pass {
+ ($struct:ident, $lints:expr, $($attr:expr),*) => {
+ struct $struct;
+
+ impl LintPass for $struct {
+ fn get_lints(&self) -> LintArray {
+ $lints
+ }
+ }
-struct Pass;
+ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for $struct {
+ fn check_crate(&mut self, cx: &LateContext, krate: &hir::Crate) {
+ $(
+ if !attr::contains_name(&krate.attrs, $attr) {
+ cx.span_lint(CRATE_NOT_OKAY, krate.span,
+ &format!("crate is not marked with #![{}]", $attr));
+ }
+ )*
+ }
+ }
-impl LintPass for Pass {
- fn get_lints(&self) -> LintArray {
- lint_array!(CRATE_NOT_OKAY)
}
}
-impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
- fn check_crate(&mut self, cx: &LateContext, krate: &hir::Crate) {
- if !attr::contains_name(&krate.attrs, "crate_okay") {
- cx.span_lint(CRATE_NOT_OKAY, krate.span,
- "crate is not marked with #![crate_okay]");
- }
- }
+declare_lint!(CRATE_NOT_OKAY, Warn, "crate not marked with #![crate_okay]");
+declare_lint!(CRATE_NOT_RED, Warn, "crate not marked with #![crate_red]");
+declare_lint!(CRATE_NOT_BLUE, Warn, "crate not marked with #![crate_blue]");
+declare_lint!(CRATE_NOT_GREY, Warn, "crate not marked with #![crate_grey]");
+declare_lint!(CRATE_NOT_GREEN, Warn, "crate not marked with #![crate_green]");
+
+fake_lint_pass! {
+ PassOkay,
+ lint_array!(CRATE_NOT_OKAY), // Single lint
+ "crate_okay"
+}
+
+fake_lint_pass! {
+ PassRedBlue,
+ lint_array!(CRATE_NOT_RED, CRATE_NOT_BLUE), // Multiple lints
+ "crate_red", "crate_blue"
+}
+
+fake_lint_pass! {
+ PassGreyGreen,
+ lint_array!(CRATE_NOT_GREY, CRATE_NOT_GREEN, ), // Trailing comma
+ "crate_grey", "crate_green"
}
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
- reg.register_late_lint_pass(box Pass);
+ reg.register_late_lint_pass(box PassOkay);
+ reg.register_late_lint_pass(box PassRedBlue);
+ reg.register_late_lint_pass(box PassGreyGreen);
}
#![feature(plugin, custom_attribute)]
#![plugin(lint_for_crate)]
#![crate_okay]
+#![crate_blue]
+#![crate_red]
+#![crate_grey]
+#![crate_green]
pub fn main() { }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(allocator_api, unique)]
+#![feature(allocator_api, nonnull)]
use std::heap::{Heap, Alloc};
// Don't fail if we encounter a NonZero<*T> where T is an unsized type
-#![feature(unique)]
-
-use std::ptr::Unique;
+use std::ptr::NonNull;
fn main() {
let mut a = [0u8; 5];
- let b: Option<Unique<[u8]>> = Some(Unique::from(&mut a));
+ let b: Option<NonNull<[u8]>> = Some(NonNull::from(&mut a));
match b {
Some(_) => println!("Got `Some`"),
None => panic!("Unexpected `None`"),
--- /dev/null
+// 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.
+
+const CURSOR_PARTITION_LABEL: &'static [u8] = b"partition";
+const CURSOR_EVENT_TYPE_LABEL: &'static [u8] = b"event_type";
+const BYTE_PATTERN: &'static [u8; 5] = b"hello";
+
+fn match_slice(x: &[u8]) -> u32 {
+ match x {
+ CURSOR_PARTITION_LABEL => 0,
+ CURSOR_EVENT_TYPE_LABEL => 1,
+ _ => 2,
+ }
+}
+
+fn match_array(x: &[u8; 5]) -> bool {
+ match x {
+ BYTE_PATTERN => true,
+ _ => false
+ }
+}
+
+fn main() {
+ assert_eq!(match_slice(b"abcde"), 2);
+ assert_eq!(match_slice(b"event_type"), 1);
+ assert_eq!(match_slice(b"partition"), 0);
+
+ assert_eq!(match_array(b"hello"), true);
+ assert_eq!(match_array(b"hella"), false);
+}
--- /dev/null
+// Copyright 2018 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.
+
+#![feature(transpose_result)]
+
+#[derive(Copy, Clone, Debug, PartialEq)]
+struct BadNumErr;
+
+fn try_num(x: i32) -> Result<i32, BadNumErr> {
+ if x <= 5 {
+ Ok(x + 1)
+ } else {
+ Err(BadNumErr)
+ }
+}
+
+type ResOpt = Result<Option<i32>, BadNumErr>;
+type OptRes = Option<Result<i32, BadNumErr>>;
+
+fn main() {
+ let mut x: ResOpt = Ok(Some(5));
+ let mut y: OptRes = Some(Ok(5));
+ assert_eq!(x, y.transpose());
+ assert_eq!(x.transpose(), y);
+
+ x = Ok(None);
+ y = None;
+ assert_eq!(x, y.transpose());
+ assert_eq!(x.transpose(), y);
+
+ x = Err(BadNumErr);
+ y = Some(Err(BadNumErr));
+ assert_eq!(x, y.transpose());
+ assert_eq!(x.transpose(), y);
+
+ let res: Result<Vec<i32>, BadNumErr> =
+ (0..10)
+ .map(|x| {
+ let y = try_num(x)?;
+ Ok(if y % 2 == 0 {
+ Some(y - 1)
+ } else {
+ None
+ })
+ })
+ .filter_map(Result::transpose)
+ .collect();
+
+ assert_eq!(res, Err(BadNumErr))
+}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// Tests that the reexports of `FnOnce` et al from the prelude work.
+// Tests that the re-exports of `FnOnce` et al from the prelude work.
// pretty-expanded FIXME #23616
--- /dev/null
+// Copyright 2018 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.
+
+const QUERY = 'String';
+
+const EXPECTED = {
+ 'others': [
+ { 'path': 'std::string', 'name': 'String' },
+ { 'path': 'std::ffi', 'name': 'OsString' },
+ { 'path': 'std::ffi', 'name': 'CString' },
+ ],
+ 'in_args': [
+ { 'path': 'std::str', 'name': 'eq' },
+ ],
+ 'returned': [
+ { 'path': 'std::string::String', 'name': 'add' },
+ ],
+};
--- /dev/null
+// Copyright 2018 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.
+
+const QUERY = 'enum:Option';
+
+const EXPECTED = {
+ 'others': [
+ { 'path': 'std::option', 'name': 'Option' },
+ ],
+};
--- /dev/null
+// Copyright 2018 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.
+
+const QUERY = 'fn:forget';
+
+const EXPECTED = {
+ 'others': [
+ { 'path': 'std::mem', 'name': 'forget' },
+ { 'path': 'std::fmt', 'name': 'format' },
+ ],
+};
--- /dev/null
+// Copyright 2018 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.
+
+const QUERY = 'from_u';
+
+const EXPECTED = {
+ 'others': [
+ { 'path': 'std::char', 'name': 'from_u32' },
+ { 'path': 'std::str', 'name': 'from_utf8' },
+ { 'path': 'std::string::String', 'name': 'from_utf8' },
+ { 'path': 'std::i32', 'name': 'from_unsigned' },
+ { 'path': 'std::i128', 'name': 'from_unsigned' },
+ ],
+};
--- /dev/null
+// Copyright 2018 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.
+
+const QUERY = 'macro:print';
+
+const EXPECTED = {
+ 'others': [
+ { 'path': 'std', 'name': 'print' },
+ { 'path': 'std', 'name': 'eprint' },
+ { 'path': 'std', 'name': 'println' },
+ { 'path': 'std', 'name': 'eprintln' },
+ ],
+};
--- /dev/null
+// Copyright 2018 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.
+
+const QUERY = 'String::from_ut';
+
+const EXPECTED = {
+ 'others': [
+ { 'path': 'std::string::String', 'name': 'from_utf8' },
+ { 'path': 'std::string::String', 'name': 'from_utf8' },
+ { 'path': 'std::string::String', 'name': 'from_utf8_lossy' },
+ { 'path': 'std::string::String', 'name': 'from_utf16_lossy' },
+ { 'path': 'std::string::String', 'name': 'from_utf8_unchecked' },
+ ],
+};
--- /dev/null
+// Copyright 2018 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.
+
+const QUERY = 'struct:Vec';
+
+const EXPECTED = {
+ 'others': [
+ { 'path': 'std::vec', 'name': 'Vec' },
+ { 'path': 'std::collections', 'name': 'VecDeque' },
+ { 'path': 'alloc::raw_vec', 'name': 'RawVec' },
+ ],
+};
--- /dev/null
+// Copyright 2018 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.
+
+pub trait MyTrait {
+ /// docs for my_trait_method
+ fn my_trait_method() {}
+}
+
+pub struct MyStruct;
+
+impl MyTrait for MyStruct {}
pub struct Wobble;
- // these should only be shown if they're reexported correctly
+ // these should only be shown if they're re-exported correctly
impl Qux for ::Foo {}
impl Qux for Wobble {}
impl ::Bark for Wobble {}
--- /dev/null
+// Copyright 2018 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.
+
+// aux-build:impl-inline-without-trait.rs
+// build-aux-docs
+// ignore-cross-compile
+
+#![crate_name = "foo"]
+
+extern crate impl_inline_without_trait;
+
+// @has 'foo/struct.MyStruct.html'
+// @has - '//*[@id="method.my_trait_method"]' 'fn my_trait_method()'
+// @has - '//*[@class="docblock"]' 'docs for my_trait_method'
+pub use impl_inline_without_trait::MyStruct;
--> $DIR/resolve-error.rs:62:5
|
62 | FooWithLongNama!();
- | ^^^^^^^^^^^^^^^ help: you could try the macro: `FooWithLongNam!`
+ | ^^^^^^^^^^^^^^^ help: you could try the macro: `FooWithLongNam`
error: cannot find macro `attr_proc_macra!` in this scope
--> $DIR/resolve-error.rs:65:5
|
65 | attr_proc_macra!();
- | ^^^^^^^^^^^^^^^ help: you could try the macro: `attr_proc_mac!`
+ | ^^^^^^^^^^^^^^^ help: you could try the macro: `attr_proc_mac`
error: cannot find macro `Dlona!` in this scope
--> $DIR/resolve-error.rs:68:5
--> $DIR/resolve-error.rs:71:5
|
71 | bang_proc_macrp!();
- | ^^^^^^^^^^^^^^^ help: you could try the macro: `bang_proc_macro!`
+ | ^^^^^^^^^^^^^^^ help: you could try the macro: `bang_proc_macro`
error: aborting due to 10 previous errors
| |
| expected signature of `for<'r, 's> fn(&'r (), &'s ()) -> _`
|
- = note: required by `f1`
+note: required by `f1`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:26:1
+ |
+26 | fn f1<F>(_: F) where F: Fn(&(), &()) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:13:5
| |
| expected signature of `for<'a, 'r> fn(&'a (), &'r ()) -> _`
|
- = note: required by `f2`
+note: required by `f2`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:27:1
+ |
+27 | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:14:5
| |
| expected signature of `for<'r> fn(&(), &'r ()) -> _`
|
- = note: required by `f3`
+note: required by `f3`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:28:1
+ |
+28 | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:15:5
| |
| expected signature of `for<'s, 'r> fn(&'s (), &'r ()) -> _`
|
- = note: required by `f4`
+note: required by `f4`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:29:1
+ |
+29 | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:16:5
| |
| expected signature of `for<'r> fn(&'r (), &'r ()) -> _`
|
- = note: required by `f5`
+note: required by `f5`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:30:1
+ |
+30 | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:17:5
| |
| expected signature of `for<'r> fn(&'r (), std::boxed::Box<for<'s> std::ops::Fn(&'s ()) + 'static>) -> _`
|
- = note: required by `g1`
+note: required by `g1`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:33:1
+ |
+33 | fn g1<F>(_: F) where F: Fn(&(), Box<Fn(&())>) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:18:5
| |
| expected signature of `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _`
|
- = note: required by `g2`
+note: required by `g2`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:34:1
+ |
+34 | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:19:5
| |
| expected signature of `for<'s> fn(&'s (), std::boxed::Box<for<'r> std::ops::Fn(&'r ()) + 'static>) -> _`
|
- = note: required by `g3`
+note: required by `g3`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:35:1
+ |
+35 | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<Fn(&())>) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:20:5
| |
| expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _`
|
- = note: required by `g4`
+note: required by `g4`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:36:1
+ |
+36 | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:21:5
| |
| expected signature of `for<'r, 's> fn(&'r (), std::boxed::Box<for<'t0> std::ops::Fn(&'t0 ()) + 'static>, &'s (), for<'t0, 't1> fn(&'t0 (), &'t1 ())) -> _`
|
- = note: required by `h1`
+note: required by `h1`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:39:1
+ |
+39 | fn h1<F>(_: F) where F: Fn(&(), Box<Fn(&())>, &(), fn(&(), &())) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:22:5
| |
| expected signature of `for<'r, 't0> fn(&'r (), std::boxed::Box<for<'s> std::ops::Fn(&'s ()) + 'static>, &'t0 (), for<'s, 't1> fn(&'s (), &'t1 ())) -> _`
|
- = note: required by `h2`
+note: required by `h2`
+ --> $DIR/anonymous-higher-ranked-lifetime.rs:40:1
+ |
+40 | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<Fn(&())>, &'t0 (), fn(&(), &())) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 11 previous errors
<i8 as Foo<u32>>
<i8 as Foo<u64>>
<i8 as Foo<bool>>
- = note: required by `Foo::bar`
+note: required by `Foo::bar`
+ --> $DIR/issue-39802-show-5-trait-impls.rs:12:5
+ |
+12 | fn bar(&self){}
+ | ^^^^^^^^^^^^^
error[E0277]: the trait bound `u8: Foo<i32>` is not satisfied
--> $DIR/issue-39802-show-5-trait-impls.rs:35:5
<u8 as Foo<u32>>
<u8 as Foo<u64>>
<u8 as Foo<bool>>
- = note: required by `Foo::bar`
+note: required by `Foo::bar`
+ --> $DIR/issue-39802-show-5-trait-impls.rs:12:5
+ |
+12 | fn bar(&self){}
+ | ^^^^^^^^^^^^^
error[E0277]: the trait bound `bool: Foo<i32>` is not satisfied
--> $DIR/issue-39802-show-5-trait-impls.rs:36:5
<bool as Foo<u32>>
<bool as Foo<u64>>
and 2 others
- = note: required by `Foo::bar`
+note: required by `Foo::bar`
+ --> $DIR/issue-39802-show-5-trait-impls.rs:12:5
+ |
+12 | fn bar(&self){}
+ | ^^^^^^^^^^^^^
error: aborting due to 3 previous errors
= note: required because it appears within the type `C`
= note: required because it appears within the type `B`
= note: required because it appears within the type `A`
- = note: required by `is_send`
+note: required by `is_send`
+ --> $DIR/recursion_limit.rs:41:1
+ |
+41 | fn is_send<T:Send>() { }
+ | ^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
= note: required because it appears within the type `[std::fmt::ArgumentV1<'_>]`
= note: required because of the requirements on the impl of `std::marker::Send` for `&[std::fmt::ArgumentV1<'_>]`
= note: required because it appears within the type `std::fmt::Arguments<'_>`
- = note: required by `send`
+note: required by `send`
+ --> $DIR/send-sync.rs:11:1
+ |
+11 | fn send<T: Send>(_: T) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `*mut std::ops::Fn() + 'static: std::marker::Sync` is not satisfied in `std::fmt::Arguments<'_>`
--> $DIR/send-sync.rs:19:5
= note: required because it appears within the type `[std::fmt::ArgumentV1<'_>]`
= note: required because it appears within the type `&[std::fmt::ArgumentV1<'_>]`
= note: required because it appears within the type `std::fmt::Arguments<'_>`
- = note: required by `sync`
+note: required by `sync`
+ --> $DIR/send-sync.rs:12:1
+ |
+12 | fn sync<T: Sync>(_: T) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
= help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::cell::Cell<i32>`
= note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:26:17: 30:6 a:&std::cell::Cell<i32> _]`
- = note: required by `main::assert_send`
+note: required by `main::assert_send`
+ --> $DIR/not-send-sync.rs:17:5
+ |
+17 | fn assert_send<T: Send>(_: T) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `std::cell::Cell<i32>: std::marker::Sync` is not satisfied in `[generator@$DIR/not-send-sync.rs:19:17: 23:6 (std::cell::Cell<i32>, ())]`
--> $DIR/not-send-sync.rs:19:5
= help: within `[generator@$DIR/not-send-sync.rs:19:17: 23:6 (std::cell::Cell<i32>, ())]`, the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
= note: required because it appears within the type `(std::cell::Cell<i32>, ())`
= note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:19:17: 23:6 (std::cell::Cell<i32>, ())]`
- = note: required by `main::assert_sync`
+note: required by `main::assert_sync`
+ --> $DIR/not-send-sync.rs:16:5
+ |
+16 | fn assert_sync<T: Sync>(_: T) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
= help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak.rs:21:5: 21:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
= note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
- = note: required by `send`
+note: required by `send`
+ --> $DIR/auto-trait-leak.rs:24:1
+ |
+24 | fn send<T: Send>(_: T) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`
--> $DIR/auto-trait-leak.rs:30:5
= help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak.rs:38:5: 38:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
= note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
- = note: required by `send`
+note: required by `send`
+ --> $DIR/auto-trait-leak.rs:24:1
+ |
+24 | fn send<T: Send>(_: T) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^
error[E0391]: unsupported cyclic reference between types/traits detected
--> $DIR/auto-trait-leak.rs:44:1
14 | impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: required by `Trait0`
+note: required by `Trait0`
+ --> $DIR/issue-24424.rs:12:1
+ |
+12 | trait Trait0<'l0> {}
+ | ^^^^^^^^^^^^^^^^^
error: aborting due to previous error
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// Issue 46112: An extern crate pub reexporting libcore was causing
+// Issue 46112: An extern crate pub re-exporting libcore was causing
// paths rooted from `std` to be misrendered in the diagnostic output.
// ignore-windows
--- /dev/null
+// 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.
+// ignore-tidy-tab
+fn main() {
+ let b = "hello";
+ let _a = b + ", World!";
+ //~^ ERROR E0369
+}
--- /dev/null
+error[E0369]: binary operation `+` cannot be applied to type `&str`
+ --> $DIR/issue-47377.rs:13:12
+ |
+13 | let _a = b + ", World!";
+ | ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
+help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
+ |
+13 | let _a = b.to_owned() + ", World!";
+ | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
--- /dev/null
+// 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.
+fn main() {
+ let b = "hello";
+ println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
+ //~^ ERROR E0369
+}
--- /dev/null
+error[E0369]: binary operation `+` cannot be applied to type `&str`
+ --> $DIR/issue-47380.rs:12:33
+ |
+12 | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
+ | ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
+help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
+ |
+12 | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
+ | ^^^^^^^^^^^^
+
+error: aborting due to previous error
+
fn rio_grande() {} // should suggest `pub`
//~^ WARN function is marked
+mod badlands {
+ // The private-no-mangle lints shouldn't suggest inserting `pub` when the
+ // item is already `pub` (but triggered the lint because, e.g., it's in a
+ // private module). (Issue #47383)
+ #[no_mangle] pub static DAUNTLESS: bool = true;
+ //~^ WARN static is marked
+ #[no_mangle] pub fn val_jean() {}
+ //~^ WARN function is marked
+}
+
struct Equinox {
warp_factor: f32,
}
warning: unnecessary parentheses around assigned value
- --> $DIR/suggestions.rs:36:21
+ --> $DIR/suggestions.rs:46:21
|
-36 | let mut a = (1); // should suggest no `mut`, no parens
+46 | let mut a = (1); // should suggest no `mut`, no parens
| ^^^ help: remove these parentheses
|
note: lint level defined here
| ^^^^^^^^^^^^^
warning: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand. See https://github.com/rust-lang/rust/issues/29721
- --> $DIR/suggestions.rs:31:1
+ --> $DIR/suggestions.rs:41:1
|
-31 | #[no_debug] // should suggest removal of deprecated attribute
+41 | #[no_debug] // should suggest removal of deprecated attribute
| ^^^^^^^^^^^ help: remove this attribute
|
= note: #[warn(deprecated)] on by default
warning: variable does not need to be mutable
- --> $DIR/suggestions.rs:36:13
+ --> $DIR/suggestions.rs:46:13
|
-36 | let mut a = (1); // should suggest no `mut`, no parens
+46 | let mut a = (1); // should suggest no `mut`, no parens
| ---^^
| |
| help: remove this `mut`
|
= note: #[warn(private_no_mangle_fns)] on by default
+warning: static is marked #[no_mangle], but not exported
+ --> $DIR/suggestions.rs:31:18
+ |
+31 | #[no_mangle] pub static DAUNTLESS: bool = true;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: function is marked #[no_mangle], but not exported
+ --> $DIR/suggestions.rs:33:18
+ |
+33 | #[no_mangle] pub fn val_jean() {}
+ | ^^^^^^^^^^^^^^^^^^^^
+
warning: denote infinite loops with `loop { ... }`
- --> $DIR/suggestions.rs:34:5
+ --> $DIR/suggestions.rs:44:5
|
-34 | while true { // should suggest `loop`
+44 | while true { // should suggest `loop`
| ^^^^^^^^^^ help: use `loop`
|
= note: #[warn(while_true)] on by default
warning: the `warp_factor:` in this pattern is redundant
- --> $DIR/suggestions.rs:41:23
+ --> $DIR/suggestions.rs:51:23
|
-41 | Equinox { warp_factor: warp_factor } => {} // should suggest shorthand
+51 | Equinox { warp_factor: warp_factor } => {} // should suggest shorthand
| ------------^^^^^^^^^^^^
| |
| help: remove this
// except according to those terms.
fn main() {
- println!("%.*3$s %s!\n", "Hello,", "World", 4);
+ println!("%.*3$s %s!\n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments
println!("%1$*2$.*3$f", 123.456); //~ ERROR never used
// This should *not* produce hints, on the basis that there's equally as
error: multiple unused formatting arguments
- --> $DIR/format-foreign.rs:12:5
+ --> $DIR/format-foreign.rs:12:30
|
-12 | println!("%.*3$s %s!/n", "Hello,", "World", 4);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^--------^^-------^^-^^
- | | | |
- | | | unused
- | | unused
- | unused
+12 | println!("%.*3$s %s!/n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments
+ | -------------------------^^^^^^^^--^^^^^^^--^-- multiple unused arguments in this statement
|
= help: `%.*3$s` should be written as `{:.2$}`
= help: `%s` should be written as `{}`
fn main() {
println!("Test", 123, 456, 789);
+ //~^ ERROR multiple unused formatting arguments
println!("Test2",
- 123,
+ 123, //~ ERROR multiple unused formatting arguments
456,
789
);
println!("Some stuff", UNUSED="args"); //~ ERROR named argument never used
println!("Some more $STUFF",
- "woo!",
+ "woo!", //~ ERROR multiple unused formatting arguments
STUFF=
"things"
, UNUSED="args");
error: multiple unused formatting arguments
- --> $DIR/format-unused-lables.rs:12:5
+ --> $DIR/format-unused-lables.rs:12:22
|
12 | println!("Test", 123, 456, 789);
- | ^^^^^^^^^^^^^^^^^---^^---^^---^^
- | | | |
- | | | unused
- | | unused
- | unused
+ | -----------------^^^--^^^--^^^-- multiple unused arguments in this statement
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: multiple unused formatting arguments
- --> $DIR/format-unused-lables.rs:14:5
+ --> $DIR/format-unused-lables.rs:16:9
|
-14 | / println!("Test2",
-15 | | 123,
- | | --- unused
-16 | | 456,
- | | --- unused
-17 | | 789
- | | --- unused
-18 | | );
- | |______^
+15 | / println!("Test2",
+16 | | 123, //~ ERROR multiple unused formatting arguments
+ | | ^^^
+17 | | 456,
+ | | ^^^
+18 | | 789
+ | | ^^^
+19 | | );
+ | |______- multiple unused arguments in this statement
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: named argument never used
- --> $DIR/format-unused-lables.rs:20:35
+ --> $DIR/format-unused-lables.rs:21:35
|
-20 | println!("Some stuff", UNUSED="args"); //~ ERROR named argument never used
+21 | println!("Some stuff", UNUSED="args"); //~ ERROR named argument never used
| ^^^^^^
error: multiple unused formatting arguments
- --> $DIR/format-unused-lables.rs:22:5
+ --> $DIR/format-unused-lables.rs:24:9
|
-22 | / println!("Some more $STUFF",
-23 | | "woo!",
- | | ------ unused
-24 | | STUFF=
-25 | | "things"
- | | -------- unused
-26 | | , UNUSED="args");
- | |_______________________------_^
- | |
- | unused
+23 | / println!("Some more $STUFF",
+24 | | "woo!", //~ ERROR multiple unused formatting arguments
+ | | ^^^^^^
+25 | | STUFF=
+26 | | "things"
+ | | ^^^^^^^^
+27 | | , UNUSED="args");
+ | |_______________________^^^^^^_- multiple unused arguments in this statement
|
= help: `$STUFF` should be written as `{STUFF}`
= note: shell formatting not supported; see the documentation for `std::fmt`
--> $DIR/macro-name-typo.rs:12:5
|
12 | printlx!("oh noes!"); //~ ERROR cannot find
- | ^^^^^^^ help: you could try the macro: `println!`
+ | ^^^^^^^ help: you could try the macro: `println`
error: aborting due to previous error
--> $DIR/macro_undefined.rs:21:5
|
21 | k!(); //~ ERROR cannot find
- | ^ help: you could try the macro: `kl!`
+ | ^ help: you could try the macro: `kl`
error: aborting due to 2 previous errors
| |
| expected signature of `fn(usize) -> _`
|
- = note: required by `foo`
+note: required by `foo`
+ --> $DIR/E0631.rs:13:1
+ |
+13 | fn foo<F: Fn(usize)>(_: F) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/E0631.rs:18:5
| |
| expected signature of `fn(usize) -> _`
|
- = note: required by `bar`
+note: required by `bar`
+ --> $DIR/E0631.rs:14:1
+ |
+14 | fn bar<F: Fn<usize>>(_: F) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in function arguments
--> $DIR/E0631.rs:19:5
19 | foo(f); //~ ERROR type mismatch
| ^^^ expected signature of `fn(usize) -> _`
|
- = note: required by `foo`
+note: required by `foo`
+ --> $DIR/E0631.rs:13:1
+ |
+13 | fn foo<F: Fn(usize)>(_: F) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in function arguments
--> $DIR/E0631.rs:20:5
20 | bar(f); //~ ERROR type mismatch
| ^^^ expected signature of `fn(usize) -> _`
|
- = note: required by `bar`
+note: required by `bar`
+ --> $DIR/E0631.rs:14:1
+ |
+14 | fn bar<F: Fn<usize>>(_: F) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors
| |
| expected closure that takes 1 argument
|
- = note: required by `f`
+note: required by `f`
+ --> $DIR/closure-arg-count.rs:13:1
+ |
+13 | fn f<F: Fn<usize>>(_: F) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0593]: closure is expected to take a single tuple as argument, but it takes 2 distinct arguments
--> $DIR/closure-arg-count.rs:24:53
| expected signature of `for<'r> fn(*mut &'r u32) -> _`
| found signature of `fn(*mut &'a u32) -> _`
|
- = note: required by `baz`
+note: required by `baz`
+ --> $DIR/closure-arg-type-mismatch.rs:18:1
+ |
+18 | fn baz<F: Fn(*mut &u32)>(_: F) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0271]: type mismatch resolving `for<'r> <fn(*mut &'a u32) as std::ops::FnOnce<(*mut &'r u32,)>>::Output == ()`
--> $DIR/closure-arg-type-mismatch.rs:20:5
20 | baz(f); //~ ERROR type mismatch
| ^^^ expected bound lifetime parameter, found concrete lifetime
|
- = note: required by `baz`
+note: required by `baz`
+ --> $DIR/closure-arg-type-mismatch.rs:18:1
+ |
+18 | fn baz<F: Fn(*mut &u32)>(_: F) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors
| ^^^ expected bound lifetime parameter, found concrete lifetime
|
= note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]`
- = note: required by `baz`
+note: required by `baz`
+ --> $DIR/closure-mismatch.rs:15:1
+ |
+15 | fn baz<T: Foo>(_: T) {}
+ | ^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/closure-mismatch.rs:18:5
| expected signature of `for<'r> fn(&'r ()) -> _`
|
= note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:18:9: 18:15]`
- = note: required by `baz`
+note: required by `baz`
+ --> $DIR/closure-mismatch.rs:15:1
+ |
+15 | fn baz<T: Foo>(_: T) {}
+ | ^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
21 | apply(&3, takes_mut);
| ^^^^^ expected signature of `fn(&{integer}) -> _`
|
- = note: required by `apply`
+note: required by `apply`
+ --> $DIR/fn-variance-1.rs:15:1
+ |
+15 | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in function arguments
--> $DIR/fn-variance-1.rs:25:5
25 | apply(&mut 3, takes_imm);
| ^^^^^ expected signature of `fn(&mut {integer}) -> _`
|
- = note: required by `apply`
+note: required by `apply`
+ --> $DIR/fn-variance-1.rs:15:1
+ |
+15 | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
fn to_fn_mut<A,F:FnMut<A>>(f: F) -> F { f }
fn call_it<F:FnMut(isize,isize)->isize>(y: isize, mut f: F) -> isize {
+//~^ NOTE required by `call_it`
f(2, y)
}
pub fn main() {
let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y });
+ //~^ NOTE found signature of `fn(usize, isize) -> _`
let z = call_it(3, f);
//~^ ERROR type mismatch
- //~| required by `call_it`
+ //~| NOTE expected signature of `fn(isize, isize) -> _`
println!("{}", z);
}
error[E0631]: type mismatch in closure arguments
- --> $DIR/unboxed-closures-vtable-mismatch.rs:23:13
+ --> $DIR/unboxed-closures-vtable-mismatch.rs:25:13
|
-22 | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y });
+23 | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y });
| ----------------------------- found signature of `fn(usize, isize) -> _`
-23 | let z = call_it(3, f);
+24 | //~^ NOTE found signature of `fn(usize, isize) -> _`
+25 | let z = call_it(3, f);
| ^^^^^^^ expected signature of `fn(isize, isize) -> _`
|
- = note: required by `call_it`
+note: required by `call_it`
+ --> $DIR/unboxed-closures-vtable-mismatch.rs:17:1
+ |
+17 | fn call_it<F:FnMut(isize,isize)->isize>(y: isize, mut f: F) -> isize {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
--- /dev/null
+// Copyright 2018 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.
+
+// Regression test for issue #45045
+
+#![feature(nll)]
+
+enum Xyz {
+ A,
+ B,
+}
+
+fn main() {
+ let mut e = Xyz::A;
+ let f = &mut e;
+ let g = f;
+ match e {
+ Xyz::A => println!("a"),
+ //~^ cannot use `e` because it was mutably borrowed [E0503]
+ Xyz::B => println!("b"),
+ };
+ *g = Xyz::B;
+}
--- /dev/null
+error[E0503]: cannot use `e` because it was mutably borrowed
+ --> $DIR/borrowed-match-issue-45045.rs:25:9
+ |
+22 | let f = &mut e;
+ | ------ borrow of `e` occurs here
+...
+25 | Xyz::A => println!("a"),
+ | ^^^^^^ use of borrowed `e`
+
+error: aborting due to previous error
+
| ^^^^^^^^^^^^ trait message
|
= help: the trait `Index<u32>` is not implemented for `[i32]`
- = note: required by `Index::index`
+note: required by `Index::index`
+ --> $DIR/multiple-impls.rs:22:5
+ |
+22 | fn index(&self, index: Idx) -> &Self::Output;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied
--> $DIR/multiple-impls.rs:43:5
| ^^^^^^^^^^^^ on impl for Foo
|
= help: the trait `Index<Foo<u32>>` is not implemented for `[i32]`
- = note: required by `Index::index`
+note: required by `Index::index`
+ --> $DIR/multiple-impls.rs:22:5
+ |
+22 | fn index(&self, index: Idx) -> &Self::Output;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied
--> $DIR/multiple-impls.rs:46:5
| ^^^^^^^^^^^^ on impl for Bar
|
= help: the trait `Index<Bar<u32>>` is not implemented for `[i32]`
- = note: required by `Index::index`
+note: required by `Index::index`
+ --> $DIR/multiple-impls.rs:22:5
+ |
+22 | fn index(&self, index: Idx) -> &Self::Output;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied
--> $DIR/multiple-impls.rs:49:5
| ^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice
|
= help: the trait `Index<u32>` is not implemented for `[i32]`
- = note: required by `Index::index`
+note: required by `Index::index`
+ --> $DIR/on-impl.rs:19:5
+ |
+19 | fn index(&self, index: Idx) -> &Self::Output;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied
--> $DIR/on-impl.rs:32:5
| ^^^^^^^ a collection of type `std::option::Option<std::vec::Vec<u8>>` cannot be built from an iterator over elements of type `&u8`
|
= help: the trait `MyFromIterator<&u8>` is not implemented for `std::option::Option<std::vec::Vec<u8>>`
- = note: required by `collect`
+note: required by `collect`
+ --> $DIR/on-trait.rs:31:1
+ |
+31 | fn collect<A, I: Iterator<Item=A>, B: MyFromIterator<A>>(it: I) -> B {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `std::string::String: Bar::Foo<u8, _, u32>` is not satisfied
--> $DIR/on-trait.rs:40:21
| ^^^^^^ test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo`
|
= help: the trait `Bar::Foo<u8, _, u32>` is not implemented for `std::string::String`
- = note: required by `foobar`
+note: required by `foobar`
+ --> $DIR/on-trait.rs:21:1
+ |
+21 | fn foobar<U: Clone, T: Foo<u8, U, u32>>() -> T {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
17 | let a: u8 = Tr::C; //~ ERROR the trait bound `u8: Tr` is not satisfied
| ^^^^^ the trait `Tr` is not implemented for `u8`
|
- = note: required by `Tr::C`
+note: required by `Tr::C`
+ --> $DIR/issue-29595.rs:13:5
+ |
+13 | const C: Self;
+ | ^^^^^^^^^^^^^^
error: aborting due to previous error
--- /dev/null
+// Copyright 2018 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.
+
+pub fn bar<F: Fn()>(_f: F) {}
+
+pub fn foo() {
+ let mut x = 0;
+ bar(move || x = 1);
+ //~^ ERROR cannot assign to captured outer variable in an `Fn` closure
+ //~| NOTE `Fn` closures cannot capture their enclosing environment for modifications
+}
+
+fn main() {}
--- /dev/null
+error[E0594]: cannot assign to captured outer variable in an `Fn` closure
+ --> $DIR/fn-closure-mutable-capture.rs:15:17
+ |
+15 | bar(move || x = 1);
+ | ^^^^^
+ |
+ = note: `Fn` closures cannot capture their enclosing environment for modifications
+help: consider changing this closure to take self by mutable reference
+ --> $DIR/fn-closure-mutable-capture.rs:15:9
+ |
+15 | bar(move || x = 1);
+ | ^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
25 | try_trait_generic::<()>(); //~ ERROR the trait bound
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Try` is not implemented for `()`
|
- = note: required by `try_trait_generic`
+note: required by `try_trait_generic`
+ --> $DIR/try-operator-on-main.rs:30:1
+ |
+30 | fn try_trait_generic<T: Try>() -> T {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
--> $DIR/try-operator-on-main.rs:32:5
--- /dev/null
+// Copyright 2018 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.
+
+fn foo<T: Into<String>>(x: i32) {}
+//~^ NOTE required by
+
+fn main() {
+ foo(42);
+ //~^ ERROR type annotations required
+}
--- /dev/null
+error[E0283]: type annotations required: cannot resolve `_: std::convert::Into<std::string::String>`
+ --> $DIR/type-annotation-needed.rs:15:5
+ |
+15 | foo(42);
+ | ^^^
+ |
+note: required by `foo`
+ --> $DIR/type-annotation-needed.rs:11:1
+ |
+11 | fn foo<T: Into<String>>(x: i32) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
21 | | }
| |_^
|
- = note: required by `Foo`
+note: required by `Foo`
+ --> $DIR/issue-40294.rs:11:1
+ |
+11 | trait Foo: Sized {
+ | ^^^^^^^^^^^^^^^^
error: aborting due to previous error
-Subproject commit a88fbace48ac42ab21e1d8609012480d0aeab982
+Subproject commit 6a8eb71f6d226f9ac869dbacd5ff6aa76deef1c4
iter_header(testfile,
None,
&mut |ln| {
+ // we should check if any only-<platform> exists and if it exists
+ // and does not matches the current platform, skip the test
props.ignore =
props.ignore ||
config.parse_cfg_name_directive(ln, "ignore") ||
+ (config.has_cfg_prefix(ln, "only") &&
+ !config.parse_cfg_name_directive(ln, "only")) ||
ignore_gdb(config, ln) ||
ignore_lldb(config, ln) ||
ignore_llvm(config, ln);
}
}
+ fn has_cfg_prefix(&self, line: &str, prefix: &str) -> bool {
+ // returns whether this line contains this prefix or not. For prefix
+ // "ignore", returns true if line says "ignore-x86_64", "ignore-arch",
+ // "ignore-andorid" etc.
+ line.starts_with(prefix) && line.as_bytes().get(prefix.len()) == Some(&b'-')
+ }
+
fn parse_name_directive(&self, line: &str, directive: &str) -> bool {
// Ensure the directive is a whole word. Do not match "ignore-x86" when
// the line says "ignore-x86_64".
for part in Path::new(base).join(url).components() {
match part {
Component::Prefix(_) |
- Component::RootDir => panic!(),
+ Component::RootDir => {
+ // Avoid absolute paths as they make the docs not
+ // relocatable by making assumptions on where the docs
+ // are hosted relative to the site root.
+ *errors = true;
+ println!("{}:{}: absolute path - {}",
+ pretty_file.display(),
+ i + 1,
+ Path::new(base).join(url).display());
+ return;
+ }
Component::CurDir => {}
Component::ParentDir => { path.pop(); }
Component::Normal(s) => { path.push(s); }
-Subproject commit 745a020e924c0532b01e8f017ed72820913642ee
+Subproject commit b55e0fc77590cf5d23a01dedeb2104d8cbb48efc
--- /dev/null
+// Copyright 2018 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.
+
+const fs = require('fs');
+
+const TEST_FOLDER = 'src/test/rustdoc-js/';
+
+// Stupid function extractor based on indent.
+function extractFunction(content, functionName) {
+ var x = content.split('\n');
+ var in_func = false;
+ var indent = 0;
+ var lines = [];
+
+ for (var i = 0; i < x.length; ++i) {
+ if (in_func === false) {
+ var splitter = "function " + functionName + "(";
+ if (x[i].trim().startsWith(splitter)) {
+ in_func = true;
+ indent = x[i].split(splitter)[0].length;
+ lines.push(x[i]);
+ }
+ } else {
+ lines.push(x[i]);
+ if (x[i].trim() === "}" && x[i].split("}")[0].length === indent) {
+ return lines.join("\n");
+ }
+ }
+ }
+ return null;
+}
+
+// Stupid function extractor for array.
+function extractArrayVariable(content, arrayName) {
+ var x = content.split('\n');
+ var found_var = false;
+ var lines = [];
+
+ for (var i = 0; i < x.length; ++i) {
+ if (found_var === false) {
+ var splitter = "var " + arrayName + " = [";
+ if (x[i].trim().startsWith(splitter)) {
+ found_var = true;
+ i -= 1;
+ }
+ } else {
+ lines.push(x[i]);
+ if (x[i].endsWith('];')) {
+ return lines.join("\n");
+ }
+ }
+ }
+ return null;
+}
+
+// Stupid function extractor for variable.
+function extractVariable(content, varName) {
+ var x = content.split('\n');
+ var found_var = false;
+ var lines = [];
+
+ for (var i = 0; i < x.length; ++i) {
+ if (found_var === false) {
+ var splitter = "var " + varName + " = ";
+ if (x[i].trim().startsWith(splitter)) {
+ found_var = true;
+ i -= 1;
+ }
+ } else {
+ lines.push(x[i]);
+ if (x[i].endsWith(';')) {
+ return lines.join("\n");
+ }
+ }
+ }
+ return null;
+}
+
+function loadContent(content) {
+ var Module = module.constructor;
+ var m = new Module();
+ m._compile(content, "tmp.js");
+ return m.exports;
+}
+
+function readFile(filePath) {
+ return fs.readFileSync(filePath, 'utf8');
+}
+
+function loadThings(thingsToLoad, kindOfLoad, funcToCall, fileContent) {
+ var content = '';
+ for (var i = 0; i < thingsToLoad.length; ++i) {
+ var tmp = funcToCall(fileContent, thingsToLoad[i]);
+ if (tmp === null) {
+ console.error('enable to find ' + kindOfLoad + ' "' + thingsToLoad[i] + '"');
+ process.exit(1);
+ }
+ content += tmp;
+ content += 'exports.' + thingsToLoad[i] + ' = ' + thingsToLoad[i] + ';';
+ }
+ return content;
+}
+
+function lookForEntry(entry, data) {
+ for (var i = 0; i < data.length; ++i) {
+ var allGood = true;
+ for (var key in entry) {
+ if (!entry.hasOwnProperty(key)) {
+ continue;
+ }
+ var value = data[i][key];
+ // To make our life easier, if there is a "parent" type, we add it to the path.
+ if (key === 'path' && data[i]['parent'] !== undefined) {
+ if (value.length > 0) {
+ value += '::' + data[i]['parent']['name'];
+ } else {
+ value = data[i]['parent']['name'];
+ }
+ }
+ if (value !== entry[key]) {
+ allGood = false;
+ break;
+ }
+ }
+ if (allGood === true) {
+ return true;
+ }
+ }
+ return false;
+}
+
+function main(argv) {
+ if (argv.length !== 3) {
+ console.error("Expected toolchain to check as argument (for example 'x86_64-apple-darwin'");
+ return 1;
+ }
+ var toolchain = argv[2];
+
+ var mainJs = readFile("build/" + toolchain + "/doc/main.js");
+ var searchIndex = readFile("build/" + toolchain + "/doc/search-index.js").split("\n");
+ if (searchIndex[searchIndex.length - 1].length === 0) {
+ searchIndex.pop();
+ }
+ searchIndex.pop();
+ searchIndex = loadContent(searchIndex.join("\n") + '\nexports.searchIndex = searchIndex;');
+ finalJS = "";
+
+ var arraysToLoad = ["itemTypes"];
+ var variablesToLoad = ["MAX_LEV_DISTANCE", "MAX_RESULTS", "TY_PRIMITIVE", "levenshtein_row2"];
+ // execQuery first parameter is built in getQuery (which takes in the search input).
+ // execQuery last parameter is built in buildIndex.
+ // buildIndex requires the hashmap from search-index.
+ var functionsToLoad = ["levenshtein", "validateResult", "getQuery", "buildIndex", "execQuery"];
+
+ finalJS += 'window = { "currentCrate": "std" };\n';
+ finalJS += loadThings(arraysToLoad, 'array', extractArrayVariable, mainJs);
+ finalJS += loadThings(variablesToLoad, 'variable', extractVariable, mainJs);
+ finalJS += loadThings(functionsToLoad, 'function', extractFunction, mainJs);
+
+ var loaded = loadContent(finalJS);
+ var index = loaded.buildIndex(searchIndex.searchIndex);
+
+ var errors = 0;
+
+ fs.readdirSync(TEST_FOLDER).forEach(function(file) {
+ var loadedFile = loadContent(readFile(TEST_FOLDER + file) +
+ 'exports.QUERY = QUERY;exports.EXPECTED = EXPECTED;');
+ const expected = loadedFile.EXPECTED;
+ const query = loadedFile.QUERY;
+ var results = loaded.execQuery(loaded.getQuery(query), index);
+ process.stdout.write('Checking "' + file + '" ... ');
+ var error_text = [];
+ for (var key in expected) {
+ if (!expected.hasOwnProperty(key)) {
+ continue;
+ }
+ if (!results.hasOwnProperty(key)) {
+ error_text.push('==> Unknown key "' + key + '"');
+ break;
+ }
+ var entry = expected[key];
+ var found = false;
+ for (var i = 0; i < entry.length; ++i) {
+ if (lookForEntry(entry[i], results[key]) === true) {
+ found = true;
+ } else {
+ error_text.push("==> Result not found in '" + key + "': '" +
+ JSON.stringify(entry[i]) + "'");
+ }
+ }
+ }
+ if (error_text.length !== 0) {
+ errors += 1;
+ console.error("FAILED");
+ console.error(error_text.join("\n"));
+ } else {
+ console.log("OK");
+ }
+ });
+ return errors;
+}
+
+process.exit(main(process.argv));
-Subproject commit 6714a447d063b079de8fb2884ded2c8c3e96bc1d
+Subproject commit e0e3e22248cd14ebbe0253e9720261a0328bfc59