From 0131110c977886efd2ed46f967fb0e0b7aa2f527 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Wed, 25 Jul 2018 00:22:27 +0900 Subject: [PATCH 1/5] Cargo update Update `rustc-ap-*` to "206.0.0". --- Cargo.lock | 134 ++++++++++++++++++++++++++++++----------------------- Cargo.toml | 6 +-- 2 files changed, 79 insertions(+), 61 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 70dec3dcd2f..92696677fff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,7 +29,7 @@ dependencies = [ [[package]] name = "atty" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -134,9 +134,9 @@ name = "derive-new" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -169,14 +169,14 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -338,7 +338,7 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -356,10 +356,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -407,15 +407,15 @@ dependencies = [ [[package]] name = "rustc-ap-arena" -version = "201.0.0" +version = "206.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rustc-ap-rustc_data_structures 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_data_structures 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc-ap-rustc_cratesio_shim" -version = "201.0.0" +version = "206.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -424,7 +424,7 @@ dependencies = [ [[package]] name = "rustc-ap-rustc_data_structures" -version = "201.0.0" +version = "206.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -432,8 +432,8 @@ dependencies = [ "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-rustc_cratesio_shim 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-serialize 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_cratesio_shim 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-serialize 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-rayon 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-rayon-core 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -442,57 +442,57 @@ dependencies = [ [[package]] name = "rustc-ap-rustc_errors" -version = "201.0.0" +version = "206.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-rustc_data_structures 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-serialize 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-syntax_pos 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_data_structures 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-serialize 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-syntax_pos 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc-ap-rustc_target" -version = "201.0.0" +version = "206.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-rustc_cratesio_shim 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-serialize 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_cratesio_shim 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-serialize 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc-ap-serialize" -version = "201.0.0" +version = "206.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rustc-ap-syntax" -version = "201.0.0" +version = "206.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-rustc_data_structures 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-rustc_errors 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-rustc_target 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-serialize 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-syntax_pos 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_data_structures 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_errors 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_target 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-serialize 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-syntax_pos 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc-ap-syntax_pos" -version = "201.0.0" +version = "206.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-arena 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-rustc_data_structures 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-serialize 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-arena 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_data_structures 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-serialize 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -539,7 +539,7 @@ dependencies = [ "cargo_metadata 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "derive-new 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "isatty 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -547,9 +547,9 @@ dependencies = [ "lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-rustc_target 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-syntax 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-syntax_pos 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_target 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-syntax 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-syntax_pos 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", @@ -592,9 +592,9 @@ name = "serde_derive" version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -632,11 +632,11 @@ dependencies = [ [[package]] name = "syn" -version = "0.14.4" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -674,6 +674,14 @@ dependencies = [ "wincolor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "termcolor" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wincolor 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "termion" version = "1.5.1" @@ -771,11 +779,19 @@ dependencies = [ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "wincolor" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [metadata] "checksum aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c6d463cbe7ed28720b5b489e7c083eeb8f90d08be2a0d6bb9e1ffea9ce1afa" "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" "checksum assert_cli 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a29ab7c0ed62970beb0534d637a8688842506d0ff9157de83286dacd065c8149" -"checksum atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2fc4a1aa4c24c0718a250f0681885c1af91419d242f29eb8f2ab28502d80dbd1" +"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" "checksum backtrace-sys 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)" = "bff67d0c06556c0b8e6b5f090f0eac52d950d9dfd1d35ba04e4ca3543eaf6a7e" "checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789" @@ -793,7 +809,7 @@ dependencies = [ "checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" "checksum ena 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "88dc8393b3c7352f94092497f6b52019643e493b6b890eb417cdb7c46117e621" -"checksum env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0e6e40ebb0e66918a37b38c7acab4e10d299e0463fe2af5d29b9cc86710cfd2a" +"checksum env_logger 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "7873e292d20e8778f951278972596b3df36ac72a65c5b406f6d4961070a870c1" "checksum environment 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4b14e20978669064c33b4c1e0fb4083412e40fe56cbea2eae80fd7591503ee" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" "checksum failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "934799b6c1de475a012a02dab0ace1ace43789ee4b99bcfbf1a2e3e8ced5de82" @@ -815,23 +831,23 @@ dependencies = [ "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac" "checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa" -"checksum proc-macro2 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c65b1ea15bb859d922cade2d1765b4b88beac339cbfad545ef2d2ef8c8215ee6" +"checksum proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "cccdc7557a98fe98453030f077df7f3a042052fae465bb61d2c2c41435cfd9b6" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e44651a0dc4cdd99f71c83b561e221f714912d11af1a4dff0631f923d53af035" +"checksum quote 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b71f9f575d55555aa9c06188be9d4e2bfc83ed02537948ac0d520c24d0419f1a" "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5bbbea44c5490a1e84357ff28b7d518b4619a159fed5d25f6c1de2d19cc42814" "checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" -"checksum rustc-ap-arena 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6c4824e6a8dc04ee2ecc2f096955d89285460875c2ca824b51edfbb2925b3cb1" -"checksum rustc-ap-rustc_cratesio_shim 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3972f2e48e0d0b17585a61f687caa1f767aeb59b6202231909495e54517e0de3" -"checksum rustc-ap-rustc_data_structures 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d7a721bc31880ad4cb8d48b5b8fcb16944667534a90c0cf68163912a3b0576f4" -"checksum rustc-ap-rustc_errors 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "885f2800e78f716582c0001985fac450c154f98eec5323b1fd71cc972cf4d516" -"checksum rustc-ap-rustc_target 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "698506472e2441eb16a853ac767dbb73cfe94a389f36d474d55d4935cf775903" -"checksum rustc-ap-serialize 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "531dcb205a578ebeed3e0a3ef49722eb8b06b510fc9550cca11a59b418972e10" -"checksum rustc-ap-syntax 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0629b3d87fcb4bce2efa82cb3af879b2e85df4322cdfc814f1c0e08bd5a3a316" -"checksum rustc-ap-syntax_pos 201.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8c5969a34ef45ad20b50da0f29a2a135ad12eb3b38137fd62abd724ca85339b" +"checksum rustc-ap-arena 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e6aa9448b877af00e24f26695e6b8c3f79f0071dc099a37ae6da3f70a739477" +"checksum rustc-ap-rustc_cratesio_shim 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2b9037a77c73574c6327e0e7015b0e61fa877f9b2a59329a477307f25585179d" +"checksum rustc-ap-rustc_data_structures 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e80f1375718ade61bcb59e470fe423179da9cb5fa47f9e88a105255ed1c403d" +"checksum rustc-ap-rustc_errors 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "246c386a001364fa904171b18e7936865ad9d2656127dfd34949c3ef5b2f8e86" +"checksum rustc-ap-rustc_target 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdba5e32a4c5096b0e8bc5b5fed28ec97eb8e348af5ef11e5922b15daf35b660" +"checksum rustc-ap-serialize 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d5c2d53d0d466bbedb104d5bf83e233bc61b87ff945667b690356727dc8eaa8b" +"checksum rustc-ap-syntax 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e3a964adf0905c73d3e9d97a25e6eabe0daf3abe8f9dc3b8f178f40b25fcc11" +"checksum rustc-ap-syntax_pos 206.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e245600d4cf83f71b62b925b92ef5fe32555154273984b4f7fb4edde4e83fafd" "checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" "checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" "checksum rustc-rayon 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c6d5a683c6ba4ed37959097e88d71c9e8e26659a3cb5be8b389078e7ad45306" @@ -846,11 +862,12 @@ dependencies = [ "checksum smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "26df3bb03ca5eac2e64192b723d51f56c1b1e0860e7c766281f4598f181acdc8" "checksum stable_deref_trait 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum syn 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2beff8ebc3658f07512a413866875adddd20f4fd47b2a4e6c9da65cd281baaea" +"checksum syn 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4bad7abdf6633f07c7046b90484f1d9dc055eca39f8c991177b1046ce61dba9a" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a761d12e6d8dcb4dcf952a7a89b475e3a9d69e4a69307e01a470977642914bd" "checksum term 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5e6b677dd1e8214ea1ef4297f85dbcbed8e8cdddb561040cc998ca2551c37561" "checksum termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "adc4587ead41bf016f11af03e55a624c06568b5a19db4e90fde573d805074f83" +"checksum termcolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "722426c4a0539da2c4ffd9b419d90ad540b4cff4a053be9069c908d4d07e2836" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" "checksum toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a0263c6c02c4db6c8f7681f9fd35e90de799ebd4cfdeab77a38f4ff6b3d8c0d9" @@ -866,3 +883,4 @@ dependencies = [ "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.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb06499a3a4d44302791052df005d5232b927ed1a9658146d842165c4de7767" +"checksum wincolor 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b9dc3aa9dcda98b5a16150c54619c1ead22e3d3a5d458778ae914be760aa981a" diff --git a/Cargo.toml b/Cargo.toml index 5023e8bec0d..d08cb976f78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,9 +47,9 @@ env_logger = "0.5" getopts = "0.2" derive-new = "0.5" cargo_metadata = "0.6" -rustc-ap-rustc_target = "201.0.0" -rustc-ap-syntax = "201.0.0" -rustc-ap-syntax_pos = "201.0.0" +rustc-ap-rustc_target = "206.0.0" +rustc-ap-syntax = "206.0.0" +rustc-ap-syntax_pos = "206.0.0" failure = "0.1.1" [dev-dependencies] From 6eb0bf2bb9b7da96436867ac260a071ed274b16f Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Wed, 25 Jul 2018 00:29:45 +0900 Subject: [PATCH 2/5] Add a simple test for exitential type --- tests/source/existential_type.rs | 11 +++++++++++ tests/target/existential_type.rs | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 tests/source/existential_type.rs create mode 100644 tests/target/existential_type.rs diff --git a/tests/source/existential_type.rs b/tests/source/existential_type.rs new file mode 100644 index 00000000000..34c0bd11f5d --- /dev/null +++ b/tests/source/existential_type.rs @@ -0,0 +1,11 @@ +// Existential type. + + #![feature(existential_type)] + +pub existential type Adder +where + T: Clone, + F: Copy + : Fn(T) -> T; + +pub existential type Adderrr: Fn( T ) -> T; diff --git a/tests/target/existential_type.rs b/tests/target/existential_type.rs new file mode 100644 index 00000000000..509fa0712bb --- /dev/null +++ b/tests/target/existential_type.rs @@ -0,0 +1,11 @@ +// Existential type. + +#![feature(existential_type)] + +pub existential type Adder +where + T: Clone, + F: Copy, +: Fn(T) -> T; + +pub existential type Adderrr: Fn(T) -> T; From fc307ff582002f36a4400fa4cb0c2e0458e936e3 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Wed, 25 Jul 2018 00:30:01 +0900 Subject: [PATCH 3/5] Format exitential type --- src/items.rs | 115 ++++++++++++++++++++++++++++++++++++------------- src/visitor.rs | 26 +++++++++-- 2 files changed, 107 insertions(+), 34 deletions(-) diff --git a/src/items.rs b/src/items.rs index 23338435d9a..62bcfd0538d 100644 --- a/src/items.rs +++ b/src/items.rs @@ -1400,36 +1400,27 @@ fn format_tuple_struct( Some(result) } -pub fn rewrite_type_alias( +fn rewrite_type_prefix( context: &RewriteContext, indent: Indent, + prefix: &str, ident: ast::Ident, - ty: &ast::Ty, generics: &ast::Generics, - vis: &ast::Visibility, - span: Span, ) -> Option { let mut result = String::with_capacity(128); - - result.push_str(&format_visibility(context, vis)); - result.push_str("type "); + result.push_str(prefix); + let ident_str = rewrite_ident(context, ident); // 2 = `= ` - let g_shape = Shape::indented(indent, context.config) - .offset_left(result.len())? - .sub_width(2)?; - let g_span = mk_sp( - context.snippet_provider.span_after(span, "type"), - ty.span.lo(), - ); - let generics_str = rewrite_generics( - context, - rewrite_ident(context, ident), - generics, - g_shape, - g_span, - )?; - result.push_str(&generics_str); + if generics.params.is_empty() { + result.push_str(ident_str) + } else { + let g_shape = Shape::indented(indent, context.config) + .offset_left(result.len())? + .sub_width(2)?; + let generics_str = rewrite_generics(context, ident_str, generics, g_shape, generics.span)?; + result.push_str(&generics_str); + } let where_budget = context.budget(last_line_width(&result)); let option = WhereClauseOption::snuggled(&result); @@ -1440,24 +1431,76 @@ pub fn rewrite_type_alias( Shape::legacy(where_budget, indent), Density::Vertical, "=", - Some(span.hi()), + None, generics.span.hi(), option, false, )?; result.push_str(&where_clause_str); - if where_clause_str.is_empty() { - result.push_str(" ="); + + Some(result) +} + +fn rewrite_type_item( + context: &RewriteContext, + indent: Indent, + prefix: &str, + suffix: &str, + ident: ast::Ident, + rhs: &R, + generics: &ast::Generics, + vis: &ast::Visibility, +) -> Option { + let mut result = String::with_capacity(128); + result.push_str(&rewrite_type_prefix( + context, + indent, + &format!("{}{} ", format_visibility(context, vis), prefix), + ident, + generics, + )?); + + if generics.where_clause.predicates.is_empty() { + result.push_str(suffix); } else { - result.push_str(&format!( - "{}=", - indent.to_string_with_newline(context.config) - )); + result.push_str(&indent.to_string_with_newline(context.config)); + result.push_str(suffix.trim_left()); } // 1 = ";" - let ty_shape = Shape::indented(indent, context.config).sub_width(1)?; - rewrite_assign_rhs(context, result, ty, ty_shape).map(|s| s + ";") + let rhs_shape = Shape::indented(indent, context.config).sub_width(1)?; + rewrite_assign_rhs(context, result, rhs, rhs_shape).map(|s| s + ";") +} + +pub fn rewrite_type_alias( + context: &RewriteContext, + indent: Indent, + ident: ast::Ident, + ty: &ast::Ty, + generics: &ast::Generics, + vis: &ast::Visibility, +) -> Option { + rewrite_type_item(context, indent, "type", " =", ident, ty, generics, vis) +} + +pub fn rewrite_existential_type( + context: &RewriteContext, + indent: Indent, + ident: ast::Ident, + generic_bounds: &ast::GenericBounds, + generics: &ast::Generics, + vis: &ast::Visibility, +) -> Option { + rewrite_type_item( + context, + indent, + "existential type", + ":", + ident, + generic_bounds, + generics, + vis, + ) } fn type_annotation_spacing(config: &Config) -> (&str, &str) { @@ -1706,6 +1749,16 @@ pub fn rewrite_associated_type( } } +pub fn rewrite_existential_impl_type( + context: &RewriteContext, + ident: ast::Ident, + generic_bounds: &ast::GenericBounds, + indent: Indent, +) -> Option { + rewrite_associated_type(ident, None, Some(generic_bounds), context, indent) + .map(|s| format!("existential {}", s)) +} + pub fn rewrite_associated_impl_type( ident: ast::Ident, defaultness: ast::Defaultness, diff --git a/src/visitor.rs b/src/visitor.rs index 2b0f08dd0c7..4fabb3301fc 100644 --- a/src/visitor.rs +++ b/src/visitor.rs @@ -19,8 +19,9 @@ use comment::{CodeCharKind, CommentCodeSlices, FindUncommented}; use config::{BraceStyle, Config}; use items::{ format_impl, format_trait, format_trait_alias, is_mod_decl, is_use_item, - rewrite_associated_impl_type, rewrite_associated_type, rewrite_extern_crate, - rewrite_type_alias, FnSig, StaticParts, StructParts, + rewrite_associated_impl_type, rewrite_associated_type, rewrite_existential_impl_type, + rewrite_existential_type, rewrite_extern_crate, rewrite_type_alias, FnSig, StaticParts, + StructParts, }; use macros::{rewrite_macro, rewrite_macro_def, MacroPosition}; use rewrite::{Rewrite, RewriteContext}; @@ -412,7 +413,17 @@ impl<'b, 'a: 'b> FmtVisitor<'a> { ty, generics, &item.vis, - item.span, + ); + self.push_rewrite(item.span, rewrite); + } + ast::ItemKind::Existential(ref generic_bounds, ref generics) => { + let rewrite = rewrite_existential_type( + &self.get_context(), + self.block_indent, + item.ident, + generic_bounds, + generics, + &item.vis, ); self.push_rewrite(item.span, rewrite); } @@ -510,6 +521,15 @@ impl<'b, 'a: 'b> FmtVisitor<'a> { ); self.push_rewrite(ii.span, rewrite); } + ast::ImplItemKind::Existential(ref generic_bounds) => { + let rewrite = rewrite_existential_impl_type( + &self.get_context(), + ii.ident, + generic_bounds, + self.block_indent, + ); + self.push_rewrite(ii.span, rewrite); + } ast::ImplItemKind::Macro(ref mac) => { self.visit_mac(mac, Some(ii.ident), MacroPosition::Item); } From 6d7a764b3df8ef28baf08107c43ba74ee68d438d Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Wed, 25 Jul 2018 00:34:46 +0900 Subject: [PATCH 4/5] Remove span from rewrite_generics's parameter We can just use the span from ast::Generics. --- src/items.rs | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/src/items.rs b/src/items.rs index 62bcfd0538d..6b81dbaf796 100644 --- a/src/items.rs +++ b/src/items.rs @@ -801,17 +801,12 @@ fn format_impl_ref_and_type( result.push_str(format_defaultness(defaultness)); result.push_str(format_unsafety(unsafety)); - let lo = context.snippet_provider.span_after(item.span, "impl"); - let hi = match *trait_ref { - Some(ref tr) => tr.path.span.lo(), - None => self_ty.span.lo(), - }; let shape = generics_shape_from_config( context.config, Shape::indented(offset + last_line_width(&result), context.config), 0, )?; - let generics_str = rewrite_generics(context, "impl", generics, shape, mk_sp(lo, hi))?; + let generics_str = rewrite_generics(context, "impl", generics, shape)?; result.push_str(&generics_str); let polarity_str = if polarity == ast::ImplPolarity::Negative { @@ -986,13 +981,8 @@ pub fn format_trait(context: &RewriteContext, item: &ast::Item, offset: Indent) let body_lo = context.snippet_provider.span_after(item.span, "{"); let shape = Shape::indented(offset, context.config).offset_left(result.len())?; - let generics_str = rewrite_generics( - context, - rewrite_ident(context, item.ident), - generics, - shape, - mk_sp(item.span.lo(), body_lo), - )?; + let generics_str = + rewrite_generics(context, rewrite_ident(context, item.ident), generics, shape)?; result.push_str(&generics_str); // FIXME(#2055): rustfmt fails to format when there are comments between trait bounds. @@ -1138,7 +1128,7 @@ pub fn format_trait_alias( let alias = rewrite_ident(context, ident); // 6 = "trait ", 2 = " =" let g_shape = shape.offset_left(6)?.sub_width(2)?; - let generics_str = rewrite_generics(context, &alias, generics, g_shape, generics.span)?; + let generics_str = rewrite_generics(context, &alias, generics, g_shape)?; let lhs = format!("trait {} =", generics_str); // 1 = ";" rewrite_assign_rhs(context, lhs, generic_bounds, shape.sub_width(1)?).map(|s| s + ";") @@ -1340,8 +1330,7 @@ fn format_tuple_struct( Some(generics) => { let budget = context.budget(last_line_width(&header_str)); let shape = Shape::legacy(budget, offset); - let g_span = mk_sp(span.lo(), body_lo); - let generics_str = rewrite_generics(context, "", generics, shape, g_span)?; + let generics_str = rewrite_generics(context, "", generics, shape)?; result.push_str(&generics_str); let where_budget = context.budget(last_line_width(&result)); @@ -1418,7 +1407,7 @@ fn rewrite_type_prefix( let g_shape = Shape::indented(indent, context.config) .offset_left(result.len())? .sub_width(2)?; - let generics_str = rewrite_generics(context, ident_str, generics, g_shape, generics.span)?; + let generics_str = rewrite_generics(context, ident_str, generics, g_shape)?; result.push_str(&generics_str); } @@ -1942,13 +1931,11 @@ fn rewrite_fn_base( offset: used_width, }; let fd = fn_sig.decl; - let g_span = mk_sp(span.lo(), fd.output.span().lo()); let generics_str = rewrite_generics( context, rewrite_ident(context, ident), fn_sig.generics, shape, - g_span, )?; result.push_str(&generics_str); @@ -2466,7 +2453,6 @@ fn rewrite_generics( ident: &str, generics: &ast::Generics, shape: Shape, - span: Span, ) -> Option { // FIXME: convert bounds to where clauses where they get too big or if // there is a where clause at all. @@ -2476,7 +2462,7 @@ fn rewrite_generics( } let params = &generics.params.iter().map(|e| &*e).collect::>(); - overflow::rewrite_with_angle_brackets(context, ident, params, shape, span) + overflow::rewrite_with_angle_brackets(context, ident, params, shape, generics.span) } pub fn generics_shape_from_config(config: &Config, shape: Shape, offset: usize) -> Option { @@ -2764,7 +2750,7 @@ fn format_generics( used_width: usize, ) -> Option { let shape = Shape::legacy(context.budget(used_width + offset.width()), offset); - let mut result = rewrite_generics(context, "", generics, shape, span)?; + let mut result = rewrite_generics(context, "", generics, shape)?; let same_line_brace = if !generics.where_clause.predicates.is_empty() || result.contains('\n') { let budget = context.budget(last_line_used_width(&result, offset.width())); From a2b40bd70f194414e0973ad0e391df6330ec75f0 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Wed, 25 Jul 2018 00:42:19 +0900 Subject: [PATCH 5/5] Add a test for associated existential type --- tests/source/existential_type.rs | 4 ++++ tests/target/existential_type.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tests/source/existential_type.rs b/tests/source/existential_type.rs index 34c0bd11f5d..cbffbd99fd8 100644 --- a/tests/source/existential_type.rs +++ b/tests/source/existential_type.rs @@ -9,3 +9,7 @@ where : Fn(T) -> T; pub existential type Adderrr: Fn( T ) -> T; + +impl Foo for Bar { +existential type E : Trait; +} diff --git a/tests/target/existential_type.rs b/tests/target/existential_type.rs index 509fa0712bb..806220502e0 100644 --- a/tests/target/existential_type.rs +++ b/tests/target/existential_type.rs @@ -9,3 +9,7 @@ where : Fn(T) -> T; pub existential type Adderrr: Fn(T) -> T; + +impl Foo for Bar { + existential type E: Trait; +}