diff --git a/src/Cargo.lock b/src/Cargo.lock index 04a556705b5a7..a3b85486ec027 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -84,7 +84,7 @@ name = "backtrace" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.12 (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)", @@ -95,7 +95,7 @@ dependencies = [ [[package]] name = "backtrace-sys" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", @@ -164,12 +164,6 @@ dependencies = [ "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "cargo" -version = "0.21.0" -source = "git+https://github.com/rust-lang/cargo#5982cf904be1d72f575dcbd1e750c07bf730b966" -replace = "cargo 0.21.0" - [[package]] name = "cargo" version = "0.21.0" @@ -180,7 +174,7 @@ dependencies = [ "cargotest 0.1.0", "crates-io 0.10.0", "crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "curl 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -200,7 +194,53 @@ dependencies = [ "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.9.14 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", + "psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_ignored 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "shell-escape 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cargo" +version = "0.22.0" +source = "git+https://github.com/rust-lang/cargo#47783c151dcfcd3b835cd2012bfc2810c0f8d017" +dependencies = [ + "advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crates-io 0.11.0 (git+https://github.com/rust-lang/cargo)", + "crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "home 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ignore 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", "psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -250,7 +290,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "clap" -version = "2.25.0" +version = "2.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -317,7 +357,20 @@ dependencies = [ name = "crates-io" version = "0.10.0" dependencies = [ - "curl 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crates-io" +version = "0.11.0" +source = "git+https://github.com/rust-lang/cargo#47783c151dcfcd3b835cd2012bfc2810c0f8d017" +dependencies = [ + "curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -332,13 +385,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "curl" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.14 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", "socket2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -351,7 +404,7 @@ dependencies = [ "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.14 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "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)", @@ -402,7 +455,7 @@ name = "enum_primitive" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -484,6 +537,11 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "futures" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "gcc" version = "0.3.51" @@ -503,7 +561,7 @@ dependencies = [ "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.14 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -512,7 +570,7 @@ name = "git2-curl" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "curl 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -548,7 +606,7 @@ name = "hamcrest" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -575,13 +633,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "highlight" version = "0.1.0" +[[package]] +name = "home" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "advapi32-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)", + "scopeguard 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "userenv-sys 0.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 = "hover" version = "0.1.0" [[package]] name = "idna" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -608,7 +678,7 @@ dependencies = [ name = "installer" version = "0.0.0" dependencies = [ - "clap 2.25.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.25.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -633,6 +703,18 @@ dependencies = [ "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "jsonrpc-core" +version = "7.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -644,7 +726,7 @@ dependencies = [ [[package]] name = "languageserver-types" -version = "0.11.1" +version = "0.12.0" 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)", @@ -683,7 +765,7 @@ dependencies = [ "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", "libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.14 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -695,7 +777,7 @@ dependencies = [ "cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.14 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -739,7 +821,7 @@ name = "mdbook" version = "0.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "clap 2.25.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.25.1 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "handlebars 0.26.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -782,7 +864,7 @@ version = "0.2.1" 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)", - "net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.30 (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)", ] @@ -793,7 +875,7 @@ version = "0.1.0" [[package]] name = "net2" -version = "0.2.29" +version = "0.2.30" 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)", @@ -805,68 +887,68 @@ dependencies = [ [[package]] name = "num" -version = "0.1.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-bigint 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-complex 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-complex 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", + "num-rational 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-bigint" -version = "0.1.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.15 (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-complex" -version = "0.1.38" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (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-integer" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-iter" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-rational" -version = "0.1.38" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-bigint 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (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-traits" -version = "0.1.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -884,14 +966,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.14 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -901,7 +983,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1004,7 +1086,7 @@ name = "racer" version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "clap 2.25.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.25.1 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1088,14 +1170,14 @@ version = "0.1.0" name = "rls" version = "0.1.0" dependencies = [ - "cargo 0.21.0 (git+https://github.com/rust-lang/cargo)", - "derive-new 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cargo 0.22.0 (git+https://github.com/rust-lang/cargo)", "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "languageserver-types 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 7.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "languageserver-types 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "racer 2.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-analysis 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-data 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-analysis 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-data 0.9.0 (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.1.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1109,19 +1191,19 @@ dependencies = [ [[package]] name = "rls-analysis" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "derive-new 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-data 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-data 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "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)", ] [[package]] name = "rls-data" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1151,7 +1233,7 @@ dependencies = [ name = "rustbook" version = "0.1.0" dependencies = [ - "clap 2.25.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.25.1 (registry+https://github.com/rust-lang/crates.io-index)", "mdbook 0.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1459,7 +1541,7 @@ name = "rustc_save_analysis" version = "0.0.0" dependencies = [ "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-data 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-data 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1582,6 +1664,11 @@ name = "scoped-tls" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "scopeguard" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "semver" version = "0.7.0" @@ -1635,7 +1722,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1983,7 +2070,7 @@ name = "url" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "idna 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1997,6 +2084,15 @@ dependencies = [ "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "userenv-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)", +] + [[package]] name = "utf8-ranges" version = "0.1.3" @@ -2088,17 +2184,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" "checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159" "checksum backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76" -"checksum backtrace-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3a0d842ea781ce92be2bf78a9b38883948542749640b8378b3b2f03d1fd9f1ff" +"checksum backtrace-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "afccc5772ba333abccdf60d55200fa3406f8c59dcf54d5f7998c9107d3799c7c" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4" "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" "checksum bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32" -"checksum cargo 0.21.0 (git+https://github.com/rust-lang/cargo)" = "" +"checksum cargo 0.22.0 (git+https://github.com/rust-lang/cargo)" = "" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" -"checksum clap 2.25.0 (registry+https://github.com/rust-lang/crates.io-index)" = "867a885995b4184be051b70a592d4d70e32d7a188db6e8dff626af286a962771" +"checksum clap 2.25.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7f1aabf260a8f3fefa8871f16b531038c98dd9eab1cfa2c575e78c459abfa3a0" "checksum cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b8ebbb35d3dc9cd09497168f33de1acb79b265d350ab0ac34133b98f8509af1f" +"checksum crates-io 0.11.0 (git+https://github.com/rust-lang/cargo)" = "" "checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97" -"checksum curl 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6689276ab61f97c660669a5ecc117c36875dfc1ba301c986b16c653415bdf9d7" +"checksum curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7034c534a1d7d22f7971d6088aa9d281d219ef724026c3428092500f41ae9c2c" "checksum curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d5481162dc4f424d088581db2f979fa7d4c238fe9794595de61d8d7522e277de" "checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" "checksum derive-new 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41be6ca3b99e0c0483fb2389685448f650459c3ecbe4e18d7705d8010ec4ab8e" @@ -2114,6 +2211,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344" "checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d" "checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866" +"checksum futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4b63a4792d4f8f686defe3b39b92127fea6344de5d38202b2ee5a11bbbf29d6a" "checksum gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)" = "120d07f202dcc3f72859422563522b66fe6463a4c513df062874daad05f85f0a" "checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" "checksum git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa01936ac96555c083c0e8553f672616274408d9d3fc5b8696603fbf63ff43ee" @@ -2123,12 +2221,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf088f042a467089e9baa4972f57f9247e42a0cc549ba264c7a04fbb8ecb89d4" "checksum handlebars 0.26.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fbba80e74e9591a5f6a4ffff6b7f9d645759a896e431cfbdc853e9184370294a" "checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa" -"checksum idna 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2233d4940b1f19f0418c158509cd7396b8d70a5db5705ce410914dc8fa603b37" +"checksum home 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9f25ae61099d8f3fee8b483df0bd4ecccf4b2731897aad40d50eca1b641fe6db" +"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" "checksum ignore 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b3fcaf2365eb14b28ec7603c98c06cc531f19de9eb283d89a3dff8417c8c99f5" "checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c" "checksum jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "443ae8bc0af6c106e6e8b77e04684faecc1a5ce94e058f4c2b0a037b0ea1b133" +"checksum jsonrpc-core 7.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "da622868a84d3f4fd897f6408ba6714aabf663302802358564b384157c1a5bfa" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum languageserver-types 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "680aee78c75504fdcb172635a7b7da0dccaafa4c42d935e19576c14b27942362" +"checksum languageserver-types 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d52e477b23bf52cd3ca0f9fc6c5d14be954eec97e3b9cdfbd962d911bd533caf" "checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" "checksum libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)" = "30885bcb161cf67054244d10d4a7f4835ffd58773bc72e07d35fecf472295503" "checksum libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "df18a822100352d9863b302faf6f8f25c0e77f0e60feb40e5dbe1238b7f13b1d" @@ -2142,19 +2242,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" "checksum miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "bc01404e7568680f1259aa5729539f221cb1e6d047a0d9053cab4be8a73b5d67" -"checksum num 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "2c3a3dc9f30bf824141521b30c908a859ab190b76e20435fcd89f35eb6583887" -"checksum num-bigint 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "6361748d02e5291c72a422dc8ed4d8464a80cb1e618971f6fffe6d52d97e3286" -"checksum num-complex 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "412dfc143c56579aa6a22c574e38ddbf724522f1280ae2b257498cccff3fb6af" -"checksum num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "ef1a4bf6f9174aa5783a9b4cc892cacd11aebad6c69ad027a0b65c6ca5f8aa37" -"checksum num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e" -"checksum num-rational 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "33c881e104a26e1accc09449374c095ff2312c8e0c27fab7bbefe16eac7c776d" -"checksum num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "1708c0628602a98b52fad936cf3edb9a107af06e52e49fdf0707e884456a6af6" +"checksum net2 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)" = "94101fd932816f97eb9a5116f6c1a11511a1fed7db21c5ccd823b2dc11abf566" +"checksum num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "a311b77ebdc5dd4cf6449d81e4135d9f0e3b153839ac90e648a8ef538f923525" +"checksum num-bigint 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "8fd0f8dbb4c0960998958a796281d88c16fbe68d87b1baa6f31e2979e81fd0bd" +"checksum num-complex 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "eb24db7f1904e67a5dfe5f7f62b82f5c963e0f777b23f98cde9c5094fc4fa179" +"checksum num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "d1452e8b06e448a07f0e6ebb0bb1d92b8890eea63288c0b627331d53514d0fba" +"checksum num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "7485fcc84f85b4ecd0ea527b14189281cf27d60e583ae65ebc9c088b13dffe01" +"checksum num-rational 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "288629c76fac4b33556f4b7ab57ba21ae202da65ba8b77466e6d598e31990790" +"checksum num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "99843c856d68d8b4313b03a17e33c4bb42ae8f6610ea81b28abe076ac721b9b0" "checksum num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aec53c34f2d0247c5ca5d32cca1478762f301740468ee9ee6dcb7a0dd7a0c584" "checksum open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3478ed1686bd1300c8a981a940abc92b06fac9cbef747f4c668d4e032ff7b842" -"checksum openssl 0.9.14 (registry+https://github.com/rust-lang/crates.io-index)" = "11ba043cb65fc9af71a431b8a36ffe8686cd4751cdf70a473ec1d01066ac7e41" +"checksum openssl 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f776f1d8af832fd2c637ee182c801e8f7ea8895718a2be9914cca001f6e2c40a" "checksum openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d98df0270d404ccd3c050a41d579c52d1db15375168bb3471e04ec0f5f378daf" -"checksum openssl-sys 0.9.14 (registry+https://github.com/rust-lang/crates.io-index)" = "236c718c2e2c2b58a546d86ffea5194400bb15dbe01ca85325ffd357b03cf66c" +"checksum openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "ad95f8160d1c150c4f44d4c4959732e048ac046c37f597fe362f8bf57561ffb4" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de154f638187706bde41d9b4738748933d64e6b37bdbffc0b47a97d16a6ae356" "checksum pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8" @@ -2170,8 +2270,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b" "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 rls-analysis 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ea940411ed2ad6d1e705fc2a0b146a0a3f30f8098ba4e61b45b4e5f2bfa7ed63" -"checksum rls-data 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e502ac679bc35e023e982506c32d0278ef89e29af1e4ad21cb70c44b525b87a9" +"checksum rls-analysis 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0127cfae9c726461facbbbc8327e782adf8afd61f7fcc6adf8ea9ad8fc428ed0" +"checksum rls-data 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f274ec7f966337dc2601fe9bde060b551d1293c277af782dc65cd7200ca070c0" "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-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3058a43ada2c2d0b92b3ae38007a2d0fa5e9db971be260e0171408a4ff471c95" @@ -2179,6 +2279,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rustfmt-nightly 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6693f90ac7d0a2291aa309f5214f5f3ac1bd79961c11116fcf6d5545749bf2e7" "checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" "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 semver 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd61b85a0fa777f7fb7c454b9189b2941b110d1385ce84d7f76efdf1606a85" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "433d7d9f8530d5a939ad5e0e72a6243d2e42a24804f70bf592c679363dcacb2f" @@ -2219,6 +2320,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb819346883532a271eb626deb43c4a1bb4c4dd47c519bd78137c3e72a4fe27" "checksum url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e7d099f1ee52f823d4bdd60c93c3602043c728f5db3b97bdb548467f7bddea" +"checksum userenv-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d28ea36bbd9192d75bd9fa9b39f96ddb986eaee824adae5d53b6e51919b2f3" "checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" "checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b" diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 134406b1acdb3..ac2e3bc402ac0 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -185,7 +185,10 @@ fn main() { // Emit save-analysis info. if env::var("RUSTC_SAVE_ANALYSIS") == Ok("api".to_string()) { - cmd.arg("-Zsave-analysis-api"); + cmd.arg("-Zsave-analysis"); + cmd.env("RUST_SAVE_ANALYSIS_CONFIG", + "{\"output_file\": null,\"full_docs\": false,\"pub_only\": true,\ + \"signatures\": false,\"borrow_data\": false}"); } // Dealing with rpath here is a little special, so let's go into some diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index 3e9ee9b2700a5..8b55eb4c099ae 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -960,9 +960,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, save_analysis: bool = (false, parse_bool, [UNTRACKED], "write syntax and type analysis (in JSON format) information, in \ addition to normal output"), - save_analysis_api: bool = (false, parse_bool, [UNTRACKED], - "write syntax and type analysis information for opaque libraries (in JSON format), \ - in addition to normal output"), print_move_fragments: bool = (false, parse_bool, [UNTRACKED], "print out move-fragment data for every fn"), flowgraph_print_loans: bool = (false, parse_bool, [UNTRACKED], @@ -2527,8 +2524,6 @@ mod tests { assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); opts.debugging_opts.save_analysis = true; assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); - opts.debugging_opts.save_analysis_api = true; - assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); opts.debugging_opts.print_move_fragments = true; assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); opts.debugging_opts.flowgraph_print_loans = true; diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index 7faf78ce638ba..c592882a1e43b 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -167,7 +167,7 @@ pub fn compile_input(sess: &Session, hir::check_attr::check_crate(sess, &expanded_crate); }); - let opt_crate = if keep_ast(sess) { + let opt_crate = if control.keep_ast { Some(&expanded_crate) } else { drop(expanded_crate); @@ -263,9 +263,6 @@ fn keep_hygiene_data(sess: &Session) -> bool { sess.opts.debugging_opts.keep_hygiene_data } -fn keep_ast(sess: &Session) -> bool { - sess.opts.debugging_opts.keep_ast || ::save_analysis(sess) -} /// The name used for source code that doesn't originate in a file /// (e.g. source from stdin or a string) @@ -304,6 +301,8 @@ pub struct CompileController<'a> { pub compilation_done: PhaseController<'a>, pub make_glob_map: MakeGlobMap, + // Whether the compiler should keep the ast beyond parsing. + pub keep_ast: bool, } impl<'a> CompileController<'a> { @@ -316,6 +315,7 @@ impl<'a> CompileController<'a> { after_llvm: PhaseController::basic(), compilation_done: PhaseController::basic(), make_glob_map: MakeGlobMap::No, + keep_ast: false, } } } diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 1f9f6aad90536..e139f81416e3d 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -518,6 +518,8 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls { -> CompileController<'a> { let mut control = CompileController::basic(); + control.keep_ast = sess.opts.debugging_opts.keep_ast || save_analysis(sess); + if let Some((ppm, opt_uii)) = parse_pretty(sess, matches) { if ppm.needs_ast_map(&opt_uii) { control.after_hir_lowering.stop = Compilation::Stop; @@ -578,8 +580,8 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls { state.expanded_crate.unwrap(), state.analysis.unwrap(), state.crate_name.unwrap(), - DumpHandler::new(save_analysis_format(state.session), - state.out_dir, + None, + DumpHandler::new(state.out_dir, state.crate_name.unwrap())) }); }; @@ -602,18 +604,7 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls { } fn save_analysis(sess: &Session) -> bool { - sess.opts.debugging_opts.save_analysis || - sess.opts.debugging_opts.save_analysis_api -} - -fn save_analysis_format(sess: &Session) -> save::Format { - if sess.opts.debugging_opts.save_analysis { - save::Format::Json - } else if sess.opts.debugging_opts.save_analysis_api { - save::Format::JsonApi - } else { - unreachable!(); - } + sess.opts.debugging_opts.save_analysis } impl RustcDefaultCalls { diff --git a/src/librustc_save_analysis/Cargo.toml b/src/librustc_save_analysis/Cargo.toml index 1ae666fbc2f57..2a51bf9430e7e 100644 --- a/src/librustc_save_analysis/Cargo.toml +++ b/src/librustc_save_analysis/Cargo.toml @@ -14,7 +14,7 @@ rustc = { path = "../librustc" } rustc_typeck = { path = "../librustc_typeck" } syntax = { path = "../libsyntax" } syntax_pos = { path = "../libsyntax_pos" } -rls-data = "0.7" +rls-data = "0.9" rls-span = "0.4" # FIXME(#40527) should move rustc serialize out of tree rustc-serialize = "0.3" diff --git a/src/librustc_save_analysis/dump_visitor.rs b/src/librustc_save_analysis/dump_visitor.rs index cc33d3db8eba7..ebdd99dc80258 100644 --- a/src/librustc_save_analysis/dump_visitor.rs +++ b/src/librustc_save_analysis/dump_visitor.rs @@ -41,7 +41,8 @@ use syntax::ptr::P; use syntax::codemap::Spanned; use syntax_pos::*; -use {escape, generated_code, SaveContext, PathCollector, docs_for_attrs, lower_attributes, Dump}; +use {escape, generated_code, SaveContext, PathCollector, lower_attributes}; +use json_dumper::{JsonDumper, DumpOutput}; use span_utils::SpanUtils; use sig; @@ -58,11 +59,11 @@ macro_rules! down_cast_data { }; } -pub struct DumpVisitor<'l, 'tcx: 'l, 'll, D: 'll> { +pub struct DumpVisitor<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> { save_ctxt: SaveContext<'l, 'tcx>, sess: &'l Session, tcx: TyCtxt<'l, 'tcx, 'tcx>, - dumper: &'ll mut D, + dumper: &'ll mut JsonDumper, span: SpanUtils<'l>, @@ -75,10 +76,10 @@ pub struct DumpVisitor<'l, 'tcx: 'l, 'll, D: 'll> { // mac_defs: HashSet, } -impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> { +impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> { pub fn new(save_ctxt: SaveContext<'l, 'tcx>, - dumper: &'ll mut D) - -> DumpVisitor<'l, 'tcx, 'll, D> { + dumper: &'ll mut JsonDumper) + -> DumpVisitor<'l, 'tcx, 'll, O> { let span_utils = SpanUtils::new(&save_ctxt.tcx.sess); DumpVisitor { sess: &save_ctxt.tcx.sess, @@ -92,7 +93,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> { } fn nest_scope(&mut self, scope_id: NodeId, f: F) - where F: FnOnce(&mut DumpVisitor<'l, 'tcx, 'll, D>) + where F: FnOnce(&mut DumpVisitor<'l, 'tcx, 'll, O>) { let parent_scope = self.cur_scope; self.cur_scope = scope_id; @@ -101,7 +102,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> { } fn nest_tables(&mut self, item_id: NodeId, f: F) - where F: FnOnce(&mut DumpVisitor<'l, 'tcx, 'll, D>) + where F: FnOnce(&mut DumpVisitor<'l, 'tcx, 'll, O>) { let item_def_id = self.tcx.hir.local_def_id(item_id); if self.tcx.has_typeck_tables(item_def_id) { @@ -531,7 +532,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> { parent: Some(::id_from_def_id(parent_id)), children: vec![], decl_id: None, - docs: docs_for_attrs(attrs), + docs: self.save_ctxt.docs_for_attrs(attrs), sig, attributes: lower_attributes(attrs.to_owned(), &self.save_ctxt), }); @@ -580,7 +581,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> { parent: None, children: fields, decl_id: None, - docs: docs_for_attrs(&item.attrs), + docs: self.save_ctxt.docs_for_attrs(&item.attrs), sig: sig::item_signature(item, &self.save_ctxt), attributes: lower_attributes(item.attrs.clone(), &self.save_ctxt), }); @@ -637,7 +638,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> { parent, children: vec![], decl_id: None, - docs: docs_for_attrs(&variant.node.attrs), + docs: self.save_ctxt.docs_for_attrs(&variant.node.attrs), sig: sig::variant_signature(variant, &self.save_ctxt), attributes: lower_attributes(variant.node.attrs.clone(), &self.save_ctxt), @@ -671,7 +672,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> { parent, children: vec![], decl_id: None, - docs: docs_for_attrs(&variant.node.attrs), + docs: self.save_ctxt.docs_for_attrs(&variant.node.attrs), sig: sig::variant_signature(variant, &self.save_ctxt), attributes: lower_attributes(variant.node.attrs.clone(), &self.save_ctxt), @@ -742,7 +743,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> { parent: None, children, decl_id: None, - docs: docs_for_attrs(&item.attrs), + docs: self.save_ctxt.docs_for_attrs(&item.attrs), sig: sig::item_signature(item, &self.save_ctxt), attributes: lower_attributes(item.attrs.clone(), &self.save_ctxt), }); @@ -1039,7 +1040,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> { parent: Some(::id_from_def_id(trait_id)), children: vec![], decl_id: None, - docs: docs_for_attrs(&trait_item.attrs), + docs: self.save_ctxt.docs_for_attrs(&trait_item.attrs), sig: sig::assoc_type_signature(trait_item.id, trait_item.ident, Some(bounds), @@ -1089,7 +1090,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> { } } -impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll, D> { +impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll, O> { fn visit_mod(&mut self, m: &'l ast::Mod, span: Span, attrs: &[ast::Attribute], id: NodeId) { // Since we handle explicit modules ourselves in visit_item, this should // only get called for the root module of a crate. @@ -1113,7 +1114,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll, children, parent: None, decl_id: None, - docs: docs_for_attrs(attrs), + docs: self.save_ctxt.docs_for_attrs(attrs), sig: None, attributes: lower_attributes(attrs.to_owned(), &self.save_ctxt), }); @@ -1250,7 +1251,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll, parent: None, children: vec![], decl_id: None, - docs: docs_for_attrs(&item.attrs), + docs: self.save_ctxt.docs_for_attrs(&item.attrs), sig: sig::item_signature(item, &self.save_ctxt), attributes: lower_attributes(item.attrs.clone(), &self.save_ctxt), }); @@ -1314,8 +1315,8 @@ impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll, ast::ExprKind::Struct(ref path, ref fields, ref base) => { let hir_expr = self.save_ctxt.tcx.hir.expect_expr(ex.id); let adt = match self.save_ctxt.tables.expr_ty_opt(&hir_expr) { - Some(ty) => ty.ty_adt_def().unwrap(), - None => { + Some(ty) if ty.ty_adt_def().is_some() => ty.ty_adt_def().unwrap(), + _ => { visit::walk_expr(self, ex); return; } diff --git a/src/librustc_save_analysis/json_api_dumper.rs b/src/librustc_save_analysis/json_api_dumper.rs deleted file mode 100644 index 4b2301fd7f804..0000000000000 --- a/src/librustc_save_analysis/json_api_dumper.rs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2016 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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::io::Write; - -use rustc_serialize::json::as_json; - -use Dump; - -use rls_data::{Analysis, Import, Def, CratePreludeData, Format, Relation}; - - -// A dumper to dump a restricted set of JSON information, designed for use with -// libraries distributed without their source. Clients are likely to use type -// information here, and (for example) generate Rustdoc URLs, but don't need -// information for navigating the source of the crate. -// Relative to the regular JSON save-analysis info, this form is filtered to -// remove non-visible items. -pub struct JsonApiDumper<'b, W: Write + 'b> { - output: &'b mut W, - result: Analysis, -} - -impl<'b, W: Write> JsonApiDumper<'b, W> { - pub fn new(writer: &'b mut W) -> JsonApiDumper<'b, W> { - let mut result = Analysis::new(); - result.kind = Format::JsonApi; - JsonApiDumper { output: writer, result } - } -} - -impl<'b, W: Write> Drop for JsonApiDumper<'b, W> { - fn drop(&mut self) { - if let Err(_) = write!(self.output, "{}", as_json(&self.result)) { - error!("Error writing output"); - } - } -} - -impl<'b, W: Write + 'b> Dump for JsonApiDumper<'b, W> { - fn crate_prelude(&mut self, data: CratePreludeData) { - self.result.prelude = Some(data) - } - - fn dump_relation(&mut self, data: Relation) { - self.result.relations.push(data); - } - fn import(&mut self, public: bool, import: Import) { - if public { - self.result.imports.push(import); - } - } - fn dump_def(&mut self, public: bool, mut data: Def) { - if public { - data.attributes = vec![]; - self.result.defs.push(data); - } - } -} diff --git a/src/librustc_save_analysis/json_dumper.rs b/src/librustc_save_analysis/json_dumper.rs index 9cd375e98558a..60cec4c5e464f 100644 --- a/src/librustc_save_analysis/json_dumper.rs +++ b/src/librustc_save_analysis/json_dumper.rs @@ -14,12 +14,12 @@ use rustc_serialize::json::as_json; use rls_data::{self, Analysis, Import, Def, DefKind, Ref, RefKind, MacroRef, Relation, CratePreludeData}; +use rls_data::config::Config; use rls_span::{Column, Row}; -use Dump; - pub struct JsonDumper { result: Analysis, + config: Config, output: O, } @@ -50,14 +50,20 @@ impl<'b> DumpOutput for CallbackOutput<'b> { } impl<'b, W: Write> JsonDumper> { - pub fn new(writer: &'b mut W) -> JsonDumper> { - JsonDumper { output: WriteOutput { output: writer }, result: Analysis::new() } + pub fn new(writer: &'b mut W, config: Config) -> JsonDumper> { + JsonDumper { output: WriteOutput { output: writer }, config, result: Analysis::new() } } } impl<'b> JsonDumper> { - pub fn with_callback(callback: &'b mut FnMut(&Analysis)) -> JsonDumper> { - JsonDumper { output: CallbackOutput { callback: callback }, result: Analysis::new() } + pub fn with_callback(callback: &'b mut FnMut(&Analysis), + config: Config) + -> JsonDumper> { + JsonDumper { + output: CallbackOutput { callback: callback }, + config, + result: Analysis::new(), + } } } @@ -67,23 +73,36 @@ impl Drop for JsonDumper { } } -impl<'b, O: DumpOutput + 'b> Dump for JsonDumper { - fn crate_prelude(&mut self, data: CratePreludeData) { +impl<'b, O: DumpOutput + 'b> JsonDumper { + pub fn crate_prelude(&mut self, data: CratePreludeData) { self.result.prelude = Some(data) } - fn macro_use(&mut self, data: MacroRef) { + pub fn macro_use(&mut self, data: MacroRef) { + if self.config.pub_only { + return; + } self.result.macro_refs.push(data); } - fn import(&mut self, _: bool, import: Import) { + pub fn import(&mut self, public: bool, import: Import) { + if !public && self.config.pub_only { + return; + } self.result.imports.push(import); } - fn dump_ref(&mut self, data: Ref) { + pub fn dump_ref(&mut self, data: Ref) { + if self.config.pub_only { + return; + } self.result.refs.push(data); } - fn dump_def(&mut self, _: bool, mut data: Def) { + + pub fn dump_def(&mut self, public: bool, mut data: Def) { + if !public && self.config.pub_only { + return; + } if data.kind == DefKind::Mod && data.span.file_name.to_str().unwrap() != data.value { // If the module is an out-of-line defintion, then we'll make the // defintion the first character in the module's file and turn the @@ -107,7 +126,7 @@ impl<'b, O: DumpOutput + 'b> Dump for JsonDumper { self.result.defs.push(data); } - fn dump_relation(&mut self, data: Relation) { + pub fn dump_relation(&mut self, data: Relation) { self.result.relations.push(data); } } diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs index ac2baa9e8b1d2..c9489aac98107 100644 --- a/src/librustc_save_analysis/lib.rs +++ b/src/librustc_save_analysis/lib.rs @@ -31,7 +31,6 @@ extern crate rls_data; extern crate rls_span; -mod json_api_dumper; mod json_dumper; mod dump_visitor; #[macro_use] @@ -43,10 +42,10 @@ use rustc::hir::def::Def as HirDef; use rustc::hir::map::{Node, NodeItem}; use rustc::hir::def_id::DefId; use rustc::session::config::CrateType::CrateTypeExecutable; -use rustc::session::Session; use rustc::ty::{self, TyCtxt}; use rustc_typeck::hir_ty_to_ty; +use std::default::Default; use std::env; use std::fs::File; use std::path::{Path, PathBuf}; @@ -61,13 +60,13 @@ use syntax::print::pprust::{ty_to_string, arg_to_string}; use syntax::codemap::MacroAttribute; use syntax_pos::*; -pub use json_api_dumper::JsonApiDumper; -pub use json_dumper::JsonDumper; +use json_dumper::JsonDumper; use dump_visitor::DumpVisitor; use span_utils::SpanUtils; use rls_data::{Ref, RefKind, SpanData, MacroRef, Def, DefKind, Relation, RelationKind, - ExternalCrateData, Import, CratePreludeData}; + ExternalCrateData}; +use rls_data::config::Config; pub struct SaveContext<'l, 'tcx: 'l> { @@ -75,6 +74,7 @@ pub struct SaveContext<'l, 'tcx: 'l> { tables: &'l ty::TypeckTables<'tcx>, analysis: &'l ty::CrateAnalysis, span_utils: SpanUtils<'tcx>, + config: Config, } #[derive(Debug)] @@ -86,15 +86,6 @@ pub enum Data { RelationData(Relation), } -pub trait Dump { - fn crate_prelude(&mut self, _: CratePreludeData); - fn macro_use(&mut self, _: MacroRef) {} - fn import(&mut self, _: bool, _: Import); - fn dump_ref(&mut self, _: Ref) {} - fn dump_def(&mut self, _: bool, _: Def); - fn dump_relation(&mut self, data: Relation); -} - macro_rules! option_try( ($e:expr) => (match $e { Some(e) => e, None => return None }) ); @@ -158,7 +149,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> { parent: None, children: vec![], decl_id: None, - docs: docs_for_attrs(&item.attrs), + docs: self.docs_for_attrs(&item.attrs), sig: sig::foreign_item_signature(item, self), attributes: lower_attributes(item.attrs.clone(), self), })) @@ -181,7 +172,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> { parent: None, children: vec![], decl_id: None, - docs: docs_for_attrs(&item.attrs), + docs: self.docs_for_attrs(&item.attrs), sig: sig::foreign_item_signature(item, self), attributes: lower_attributes(item.attrs.clone(), self), })) @@ -205,7 +196,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> { parent: None, children: vec![], decl_id: None, - docs: docs_for_attrs(&item.attrs), + docs: self.docs_for_attrs(&item.attrs), sig: sig::item_signature(item, self), attributes: lower_attributes(item.attrs.clone(), self), })) @@ -234,7 +225,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> { parent: None, children: vec![], decl_id: None, - docs: docs_for_attrs(&item.attrs), + docs: self.docs_for_attrs(&item.attrs), sig: sig::item_signature(item, self), attributes: lower_attributes(item.attrs.clone(), self), })) @@ -257,7 +248,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> { parent: None, children: vec![], decl_id: None, - docs: docs_for_attrs(&item.attrs), + docs: self.docs_for_attrs(&item.attrs), sig: sig::item_signature(item, self), attributes: lower_attributes(item.attrs.clone(), self), })) @@ -281,7 +272,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> { parent: None, children: m.items.iter().map(|i| id_from_node_id(i.id, self)).collect(), decl_id: None, - docs: docs_for_attrs(&item.attrs), + docs: self.docs_for_attrs(&item.attrs), sig: sig::item_signature(item, self), attributes: lower_attributes(item.attrs.clone(), self), })) @@ -309,7 +300,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> { .map(|v| id_from_node_id(v.node.data.id(), self)) .collect(), decl_id: None, - docs: docs_for_attrs(&item.attrs), + docs: self.docs_for_attrs(&item.attrs), sig: sig::item_signature(item, self), attributes: lower_attributes(item.attrs.to_owned(), self), })) @@ -370,7 +361,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> { parent: Some(id_from_node_id(scope, self)), children: vec![], decl_id: None, - docs: docs_for_attrs(&field.attrs), + docs: self.docs_for_attrs(&field.attrs), sig: sig::field_signature(field, self), attributes: lower_attributes(field.attrs.clone(), self), }) @@ -415,7 +406,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> { result.push_str(">"); (result, trait_id, decl_id, - docs_for_attrs(&item.attrs), + self.docs_for_attrs(&item.attrs), item.attrs.to_vec()) } _ => { @@ -440,7 +431,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> { Some(Node::NodeItem(item)) => { (format!("::{}", self.tcx.item_path_str(def_id)), Some(def_id), None, - docs_for_attrs(&item.attrs), + self.docs_for_attrs(&item.attrs), item.attrs.to_vec()) } r => { @@ -769,6 +760,31 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> { pub fn enclosing_scope(&self, id: NodeId) -> NodeId { self.tcx.hir.get_enclosing_scope(id).unwrap_or(CRATE_NODE_ID) } + + fn docs_for_attrs(&self, attrs: &[Attribute]) -> String { + let mut result = String::new(); + + for attr in attrs { + if attr.check_name("doc") { + if let Some(val) = attr.value_str() { + if attr.is_sugared_doc { + result.push_str(&strip_doc_comment_decoration(&val.as_str())); + } else { + result.push_str(&val.as_str()); + } + result.push('\n'); + } + } + } + + if !self.config.full_docs { + if let Some(index) = result.find("\n\n") { + result.truncate(index); + } + } + + result + } } fn make_signature(decl: &ast::FnDecl, generics: &ast::Generics) -> String { @@ -845,37 +861,6 @@ impl<'a> Visitor<'a> for PathCollector { } } -fn docs_for_attrs(attrs: &[Attribute]) -> String { - let mut result = String::new(); - - for attr in attrs { - if attr.check_name("doc") { - if let Some(val) = attr.value_str() { - if attr.is_sugared_doc { - result.push_str(&strip_doc_comment_decoration(&val.as_str())); - } else { - result.push_str(&val.as_str()); - } - result.push('\n'); - } - } - } - - result -} - -#[derive(Clone, Copy, Debug, RustcEncodable)] -pub enum Format { - Json, - JsonApi, -} - -impl Format { - fn extension(&self) -> &'static str { - ".json" - } -} - /// Defines what to do with the results of saving the analysis. pub trait SaveHandler { fn save<'l, 'tcx>(&mut self, @@ -886,53 +871,54 @@ pub trait SaveHandler { /// Dump the save-analysis results to a file. pub struct DumpHandler<'a> { - format: Format, odir: Option<&'a Path>, cratename: String } impl<'a> DumpHandler<'a> { - pub fn new(format: Format, odir: Option<&'a Path>, cratename: &str) -> DumpHandler<'a> { + pub fn new(odir: Option<&'a Path>, cratename: &str) -> DumpHandler<'a> { DumpHandler { - format: format, odir: odir, cratename: cratename.to_owned() } } - fn output_file(&self, sess: &Session) -> File { - let mut root_path = match env::var_os("RUST_SAVE_ANALYSIS_FOLDER") { - Some(val) => PathBuf::from(val), - None => match self.odir { - Some(val) => val.join("save-analysis"), - None => PathBuf::from("save-analysis-temp"), - }, - }; + fn output_file(&self, ctx: &SaveContext) -> File { + let sess = &ctx.tcx.sess; + let file_name = match ctx.config.output_file { + Some(ref s) => PathBuf::from(s), + None => { + let mut root_path = match self.odir { + Some(val) => val.join("save-analysis"), + None => PathBuf::from("save-analysis-temp"), + }; - if let Err(e) = std::fs::create_dir_all(&root_path) { - error!("Could not create directory {}: {}", root_path.display(), e); - } + if let Err(e) = std::fs::create_dir_all(&root_path) { + error!("Could not create directory {}: {}", root_path.display(), e); + } - { - let disp = root_path.display(); - info!("Writing output to {}", disp); - } + let executable = + sess.crate_types.borrow().iter().any(|ct| *ct == CrateTypeExecutable); + let mut out_name = if executable { + "".to_owned() + } else { + "lib".to_owned() + }; + out_name.push_str(&self.cratename); + out_name.push_str(&sess.opts.cg.extra_filename); + out_name.push_str(".json"); + root_path.push(&out_name); - let executable = sess.crate_types.borrow().iter().any(|ct| *ct == CrateTypeExecutable); - let mut out_name = if executable { - "".to_owned() - } else { - "lib".to_owned() + root_path + } }; - out_name.push_str(&self.cratename); - out_name.push_str(&sess.opts.cg.extra_filename); - out_name.push_str(self.format.extension()); - root_path.push(&out_name); - let output_file = File::create(&root_path).unwrap_or_else(|e| { - let disp = root_path.display(); - sess.fatal(&format!("Could not open {}: {}", disp, e)); + + info!("Writing output to {}", file_name.display()); + + let output_file = File::create(&file_name).unwrap_or_else(|e| { + sess.fatal(&format!("Could not open {}: {}", file_name.display(), e)) }); - root_path.pop(); + output_file } } @@ -942,22 +928,12 @@ impl<'a> SaveHandler for DumpHandler<'a> { save_ctxt: SaveContext<'l, 'tcx>, krate: &ast::Crate, cratename: &str) { - macro_rules! dump { - ($new_dumper: expr) => {{ - let mut dumper = $new_dumper; - let mut visitor = DumpVisitor::new(save_ctxt, &mut dumper); - - visitor.dump_crate_info(cratename, krate); - visit::walk_crate(&mut visitor, krate); - }} - } + let output = &mut self.output_file(&save_ctxt); + let mut dumper = JsonDumper::new(output, save_ctxt.config.clone()); + let mut visitor = DumpVisitor::new(save_ctxt, &mut dumper); - let output = &mut self.output_file(&save_ctxt.tcx.sess); - - match self.format { - Format::Json => dump!(JsonDumper::new(output)), - Format::JsonApi => dump!(JsonApiDumper::new(output)), - } + visitor.dump_crate_info(cratename, krate); + visit::walk_crate(&mut visitor, krate); } } @@ -971,22 +947,16 @@ impl<'b> SaveHandler for CallbackHandler<'b> { save_ctxt: SaveContext<'l, 'tcx>, krate: &ast::Crate, cratename: &str) { - macro_rules! dump { - ($new_dumper: expr) => {{ - let mut dumper = $new_dumper; - let mut visitor = DumpVisitor::new(save_ctxt, &mut dumper); - - visitor.dump_crate_info(cratename, krate); - visit::walk_crate(&mut visitor, krate); - }} - } - // We're using the JsonDumper here because it has the format of the // save-analysis results that we will pass to the callback. IOW, we are // using the JsonDumper to collect the save-analysis results, but not // actually to dump them to a file. This is all a bit convoluted and // there is certainly a simpler design here trying to get out (FIXME). - dump!(JsonDumper::with_callback(self.callback)) + let mut dumper = JsonDumper::with_callback(self.callback, save_ctxt.config.clone()); + let mut visitor = DumpVisitor::new(save_ctxt, &mut dumper); + + visitor.dump_crate_info(cratename, krate); + visit::walk_crate(&mut visitor, krate); } } @@ -994,6 +964,7 @@ pub fn process_crate<'l, 'tcx, H: SaveHandler>(tcx: TyCtxt<'l, 'tcx, 'tcx>, krate: &ast::Crate, analysis: &'l ty::CrateAnalysis, cratename: &str, + config: Option, mut handler: H) { let _ignore = tcx.dep_graph.in_ignore(); @@ -1006,11 +977,25 @@ pub fn process_crate<'l, 'tcx, H: SaveHandler>(tcx: TyCtxt<'l, 'tcx, 'tcx>, tables: &ty::TypeckTables::empty(), analysis: analysis, span_utils: SpanUtils::new(&tcx.sess), + config: find_config(config), }; handler.save(save_ctxt, krate, cratename) } +fn find_config(supplied: Option) -> Config { + if let Some(config) = supplied { + return config; + } + match env::var_os("RUST_SAVE_ANALYSIS_CONFIG") { + Some(config_string) => { + rustc_serialize::json::decode(config_string.to_str().unwrap()) + .expect("Could not deserialize save-analysis config") + }, + None => Config::default(), + } +} + // Utility functions for the module. // Helper function to escape quotes in a string diff --git a/src/librustc_save_analysis/sig.rs b/src/librustc_save_analysis/sig.rs index 1d03ab1383af1..3557b4752e7e4 100644 --- a/src/librustc_save_analysis/sig.rs +++ b/src/librustc_save_analysis/sig.rs @@ -45,21 +45,33 @@ use syntax::print::pprust; pub fn item_signature(item: &ast::Item, scx: &SaveContext) -> Option { + if !scx.config.signatures { + return None; + } item.make(0, None, scx).ok() } pub fn foreign_item_signature(item: &ast::ForeignItem, scx: &SaveContext) -> Option { + if !scx.config.signatures { + return None; + } item.make(0, None, scx).ok() } /// Signature for a struct or tuple field declaration. /// Does not include a trailing comma. pub fn field_signature(field: &ast::StructField, scx: &SaveContext) -> Option { + if !scx.config.signatures { + return None; + } field.make(0, None, scx).ok() } /// Does not include a trailing comma. pub fn variant_signature(variant: &ast::Variant, scx: &SaveContext) -> Option { + if !scx.config.signatures { + return None; + } variant.node.make(0, None, scx).ok() } @@ -68,6 +80,9 @@ pub fn method_signature(id: NodeId, m: &ast::MethodSig, scx: &SaveContext) -> Option { + if !scx.config.signatures { + return None; + } make_method_signature(id, ident, m, scx).ok() } @@ -77,6 +92,9 @@ pub fn assoc_const_signature(id: NodeId, default: Option<&ast::Expr>, scx: &SaveContext) -> Option { + if !scx.config.signatures { + return None; + } make_assoc_const_signature(id, ident, ty, default, scx).ok() } @@ -86,6 +104,9 @@ pub fn assoc_type_signature(id: NodeId, default: Option<&ast::Ty>, scx: &SaveContext) -> Option { + if !scx.config.signatures { + return None; + } make_assoc_type_signature(id, ident, bounds, default, scx).ok() } diff --git a/src/test/run-make/save-analysis/Makefile b/src/test/run-make/save-analysis/Makefile index 9ebc40d4013cd..7296fb9cc5936 100644 --- a/src/test/run-make/save-analysis/Makefile +++ b/src/test/run-make/save-analysis/Makefile @@ -4,4 +4,3 @@ krate2: krate2.rs $(RUSTC) $< code: foo.rs krate2 $(RUSTC) foo.rs -Zsave-analysis - $(RUSTC) foo.rs -Zsave-analysis-api diff --git a/src/tools/rls b/src/tools/rls index 618f802f0dceb..7799d03de85bc 160000 --- a/src/tools/rls +++ b/src/tools/rls @@ -1 +1 @@ -Subproject commit 618f802f0dcebc9f23a527afd3cd228c1fa468f8 +Subproject commit 7799d03de85bcc1a7437f65d4f7adfbb267d2acb