diff --git a/src/Cargo.lock b/src/Cargo.lock index 5a44b696a03e..926016e5f026 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -82,7 +82,7 @@ dependencies = [ "environment 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -116,6 +116,19 @@ dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bit-set" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bit-vec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bit-vec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "bitflags" version = "0.9.1" @@ -142,7 +155,7 @@ dependencies = [ "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -202,7 +215,7 @@ dependencies = [ "ignore 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "libgit2-sys 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -210,6 +223,7 @@ dependencies = [ "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "opener 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.10.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proptest 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-workspace-hack 1.0.0", "rustfix 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -217,7 +231,7 @@ dependencies = [ "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_ignored 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "shell-escape 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.4.16 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -237,7 +251,7 @@ dependencies = [ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -414,7 +428,7 @@ dependencies = [ "rustfix 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -431,7 +445,7 @@ dependencies = [ "miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -465,7 +479,7 @@ dependencies = [ "failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -633,7 +647,7 @@ dependencies = [ "regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum_macros 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -879,7 +893,7 @@ dependencies = [ "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -989,7 +1003,7 @@ dependencies = [ [[package]] name = "itoa" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1016,7 +1030,7 @@ dependencies = [ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1038,7 +1052,7 @@ dependencies = [ "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1058,7 +1072,7 @@ dependencies = [ [[package]] name = "lazycell" -version = "1.0.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1192,7 +1206,7 @@ dependencies = [ "phf_codegen 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_codegen 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1224,7 +1238,7 @@ dependencies = [ "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1586,6 +1600,23 @@ dependencies = [ "core 0.0.0", ] +[[package]] +name = "proptest" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bit-set 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rusty-fork 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pulldown-cmark" version = "0.1.2" @@ -1792,7 +1823,7 @@ dependencies = [ "rustfmt-nightly 0.99.5", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2476,7 +2507,7 @@ dependencies = [ "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2500,12 +2531,23 @@ dependencies = [ "rustc-ap-syntax_pos 263.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rusty-fork" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wait-timeout 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ryu" version = "0.2.6" @@ -2577,10 +2619,10 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.26" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2890,7 +2932,7 @@ version = "0.1.0" dependencies = [ "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3032,7 +3074,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "getset 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3046,6 +3088,14 @@ name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wait-timeout" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "walkdir" version = "2.2.5" @@ -3132,6 +3182,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "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.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0" +"checksum bit-set 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6f1efcc46c18245a69c38fcc5cc650f16d3a59d034f3106e9ed63748f695730a" +"checksum bit-vec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4440d5cb623bb7390ae27fec0bb6c61111969860f8e3ae198bfa0663645e67cf" "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32" @@ -3206,7 +3258,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum is-match 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7e5b386aef33a1c677be65237cb9d32c3f3ef56bd035949710c4bb13083eb053" "checksum isatty 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6c324313540cd4d7ba008d43dc6606a32a5579f13cc17b2804c13096f0a5c522" "checksum itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f58856976b776fedd95533137617a02fb25719f40e7d9b01c7043cd65474f450" -"checksum itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5adb58558dcd1d786b5f0bd15f3226ee23486e24b7b58304b60f64dc68e62606" +"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "60af5f849e1981434e4a31d3d782c4774ae9b434ce55b101a96ecfd09147e8be" "checksum json 0.11.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9ad0485404155f45cce53a40d4b2d6ac356418300daed05273d9e26f91c390be" "checksum jsonrpc-core 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ddf83704f4e79979a424d1082dd2c1e52683058056c9280efa19ac5f6bc9033c" @@ -3214,7 +3266,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum languageserver-types 0.45.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d91d91d1c23db74187096d191967cb49f49bb175ad6d855fa9229d16ef2c982" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" -"checksum lazycell 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d33a48d0365c96081958cc663eef834975cb1e8d8bea3378513fc72bdbf11e50" +"checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" "checksum libgit2-sys 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "93f2b22fce91fb820363cf88a849a8f8fdfd8be37774b6a9dd6cbda05cf940e6" "checksum libnghttp2-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ffbfb81475cc9f625e44f3a8f8b9cf7173815ae1c7cc2fa91853ec009e38198" @@ -3269,6 +3321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a029430f0d744bc3d15dd474d591bed2402b645d024583082b9f63bb936dac6" "checksum proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7" "checksum proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ee5697238f0d893c7f0ecc59c0999f18d2af85e424de441178bcacc9f9e6cf67" +"checksum proptest 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "926d0604475349f463fe44130aae73f2294b5309ab2ca0310b998bd334ef191f" "checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45" @@ -3309,6 +3362,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a54aa04a10c68c1c4eacb4337fd883b435997ede17a9385784b990777686b09a" "checksum rustfix 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "756567f00f7d89c9f89a5c401b8b1caaa122e27240b9eaadd0bb52ee0b680b1b" +"checksum rusty-fork 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9591f190d2852720b679c21f66ad929f9f1d7bb09d1193c26167586029d8489c" "checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7" "checksum same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f7794e2fda7f594866840e95f5c5962e886e228e68b6505885811a94dd728c" "checksum schannel 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "dc1fabf2a7b6483a141426e1afd09ad543520a77ac49bd03c286e7696ccfd77f" @@ -3319,7 +3373,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)" = "22d340507cea0b7e6632900a176101fea959c7065d93ba555072da90aaaafc87" "checksum serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)" = "234fc8b737737b148ccd625175fc6390f5e4dacfdaa543cb93a3430d984a9119" "checksum serde_ignored 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "190e9765dcedb56be63b6e0993a006c7e3b071a016a304736e4a315dc01fb142" -"checksum serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "44dd2cfde475037451fa99b7e5df77aa3cfd1536575fa8e7a538ab36dcde49ae" +"checksum serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)" = "bb47a3d5c84320222f66d7db21157c4a7407755de41798f9b4c1c40593397b1a" "checksum shell-escape 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "170a13e64f2a51b77a45702ba77287f5c6829375b04a69cf2222acd17d0cfab9" "checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" @@ -3365,6 +3419,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum vergen 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9a16834fc61e1492c07dae49b6c14b55f8b1d43a5f5f9e9a2ecc063f47b9f93c" "checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum wait-timeout 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b9f3bf741a801531993db6478b95682117471f76916f5e690dd8d45395b09349" "checksum walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "af464bc7be7b785c7ac72e266a6b67c4c9070155606f51655a650a6686204e35" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" diff --git a/src/libcore/borrow.rs b/src/libcore/borrow.rs index f45a32d4b94a..84d4b2178418 100644 --- a/src/libcore/borrow.rs +++ b/src/libcore/borrow.rs @@ -226,16 +226,16 @@ impl BorrowMut for T { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized> Borrow for &'a T { +impl Borrow for &T { fn borrow(&self) -> &T { &**self } } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized> Borrow for &'a mut T { +impl Borrow for &mut T { fn borrow(&self) -> &T { &**self } } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized> BorrowMut for &'a mut T { +impl BorrowMut for &mut T { fn borrow_mut(&mut self) -> &mut T { &mut **self } } diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 009aba5f5986..ec7d366c3f5c 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -1092,7 +1092,7 @@ impl<'b> BorrowRef<'b> { } } -impl<'b> Drop for BorrowRef<'b> { +impl Drop for BorrowRef<'_> { #[inline] fn drop(&mut self) { let borrow = self.borrow.get(); @@ -1101,9 +1101,9 @@ impl<'b> Drop for BorrowRef<'b> { } } -impl<'b> Clone for BorrowRef<'b> { +impl Clone for BorrowRef<'_> { #[inline] - fn clone(&self) -> BorrowRef<'b> { + fn clone(&self) -> Self { // Since this Ref exists, we know the borrow flag // is a reading borrow. let borrow = self.borrow.get(); @@ -1127,7 +1127,7 @@ pub struct Ref<'b, T: ?Sized + 'b> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'b, T: ?Sized> Deref for Ref<'b, T> { +impl Deref for Ref<'_, T> { type Target = T; #[inline] @@ -1219,7 +1219,7 @@ impl<'b, T: ?Sized> Ref<'b, T> { impl<'b, T: ?Sized + Unsize, U: ?Sized> CoerceUnsized> for Ref<'b, T> {} #[stable(feature = "std_guard_impls", since = "1.20.0")] -impl<'a, T: ?Sized + fmt::Display> fmt::Display for Ref<'a, T> { +impl fmt::Display for Ref<'_, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.value.fmt(f) } @@ -1305,7 +1305,7 @@ struct BorrowRefMut<'b> { borrow: &'b Cell, } -impl<'b> Drop for BorrowRefMut<'b> { +impl Drop for BorrowRefMut<'_> { #[inline] fn drop(&mut self) { let borrow = self.borrow.get(); @@ -1356,7 +1356,7 @@ pub struct RefMut<'b, T: ?Sized + 'b> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'b, T: ?Sized> Deref for RefMut<'b, T> { +impl Deref for RefMut<'_, T> { type Target = T; #[inline] @@ -1366,7 +1366,7 @@ impl<'b, T: ?Sized> Deref for RefMut<'b, T> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'b, T: ?Sized> DerefMut for RefMut<'b, T> { +impl DerefMut for RefMut<'_, T> { #[inline] fn deref_mut(&mut self) -> &mut T { self.value @@ -1377,7 +1377,7 @@ impl<'b, T: ?Sized> DerefMut for RefMut<'b, T> { impl<'b, T: ?Sized + Unsize, U: ?Sized> CoerceUnsized> for RefMut<'b, T> {} #[stable(feature = "std_guard_impls", since = "1.20.0")] -impl<'a, T: ?Sized + fmt::Display> fmt::Display for RefMut<'a, T> { +impl fmt::Display for RefMut<'_, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.value.fmt(f) } diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index 3b15ba2b4ab1..46bb580dcddb 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -204,7 +204,7 @@ mod impls { // Shared references can be cloned, but mutable references *cannot*! #[stable(feature = "rust1", since = "1.0.0")] - impl<'a, T: ?Sized> Clone for &'a T { + impl Clone for &T { #[inline] fn clone(&self) -> Self { *self diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index ef7d83a0993d..33881de30527 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -1033,12 +1033,12 @@ mod impls { fn gt(&self, other: & &'b B) -> bool { PartialOrd::gt(*self, *other) } } #[stable(feature = "rust1", since = "1.0.0")] - impl<'a, A: ?Sized> Ord for &'a A where A: Ord { + impl Ord for &A where A: Ord { #[inline] - fn cmp(&self, other: & &'a A) -> Ordering { Ord::cmp(*self, *other) } + fn cmp(&self, other: &Self) -> Ordering { Ord::cmp(*self, *other) } } #[stable(feature = "rust1", since = "1.0.0")] - impl<'a, A: ?Sized> Eq for &'a A where A: Eq {} + impl Eq for &A where A: Eq {} // &mut pointers @@ -1065,12 +1065,12 @@ mod impls { fn gt(&self, other: &&'b mut B) -> bool { PartialOrd::gt(*self, *other) } } #[stable(feature = "rust1", since = "1.0.0")] - impl<'a, A: ?Sized> Ord for &'a mut A where A: Ord { + impl Ord for &mut A where A: Ord { #[inline] - fn cmp(&self, other: &&'a mut A) -> Ordering { Ord::cmp(*self, *other) } + fn cmp(&self, other: &Self) -> Ordering { Ord::cmp(*self, *other) } } #[stable(feature = "rust1", since = "1.0.0")] - impl<'a, A: ?Sized> Eq for &'a mut A where A: Eq {} + impl Eq for &mut A where A: Eq {} #[stable(feature = "rust1", since = "1.0.0")] impl<'a, 'b, A: ?Sized, B: ?Sized> PartialEq<&'b mut B> for &'a A where A: PartialEq { diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index d5337868843d..b900990d0a72 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -407,7 +407,7 @@ pub trait TryFrom: Sized { // As lifts over & #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized, U: ?Sized> AsRef for &'a T where T: AsRef +impl AsRef for &T where T: AsRef { fn as_ref(&self) -> &U { >::as_ref(*self) @@ -416,7 +416,7 @@ impl<'a, T: ?Sized, U: ?Sized> AsRef for &'a T where T: AsRef // As lifts over &mut #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized, U: ?Sized> AsRef for &'a mut T where T: AsRef +impl AsRef for &mut T where T: AsRef { fn as_ref(&self) -> &U { >::as_ref(*self) @@ -433,7 +433,7 @@ impl<'a, T: ?Sized, U: ?Sized> AsRef for &'a mut T where T: AsRef // AsMut lifts over &mut #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized, U: ?Sized> AsMut for &'a mut T where T: AsMut +impl AsMut for &mut T where T: AsMut { fn as_mut(&mut self) -> &mut U { (*self).as_mut() diff --git a/src/libcore/fmt/builders.rs b/src/libcore/fmt/builders.rs index 3c5f934d4d8c..4bc5b36d82ba 100644 --- a/src/libcore/fmt/builders.rs +++ b/src/libcore/fmt/builders.rs @@ -28,7 +28,7 @@ impl<'a> PadAdapter<'a> { } } -impl<'a> fmt::Write for PadAdapter<'a> { +impl fmt::Write for PadAdapter<'_> { fn write_str(&mut self, mut s: &str) -> fmt::Result { while !s.is_empty() { if self.on_newline { diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 7d131b5c99dc..bd253e69db31 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -208,7 +208,7 @@ pub trait Write { // requiring a `Sized` bound. struct Adapter<'a,T: ?Sized +'a>(&'a mut T); - impl<'a, T: ?Sized> Write for Adapter<'a, T> + impl Write for Adapter<'_, T> where T: Write { fn write_str(&mut self, s: &str) -> Result { @@ -229,7 +229,7 @@ pub trait Write { } #[stable(feature = "fmt_write_blanket_impl", since = "1.4.0")] -impl<'a, W: Write + ?Sized> Write for &'a mut W { +impl Write for &mut W { fn write_str(&mut self, s: &str) -> Result { (**self).write_str(s) } @@ -291,8 +291,8 @@ pub struct ArgumentV1<'a> { #[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")] -impl<'a> Clone for ArgumentV1<'a> { - fn clone(&self) -> ArgumentV1<'a> { +impl Clone for ArgumentV1<'_> { + fn clone(&self) -> Self { *self } } @@ -436,14 +436,14 @@ pub struct Arguments<'a> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a> Debug for Arguments<'a> { +impl Debug for Arguments<'_> { fn fmt(&self, fmt: &mut Formatter) -> Result { Display::fmt(self, fmt) } } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a> Display for Arguments<'a> { +impl Display for Arguments<'_> { fn fmt(&self, fmt: &mut Formatter) -> Result { write(fmt.buf, *self) } @@ -1884,7 +1884,7 @@ impl<'a> Formatter<'a> { } #[stable(since = "1.2.0", feature = "formatter_write")] -impl<'a> Write for Formatter<'a> { +impl Write for Formatter<'_> { fn write_str(&mut self, s: &str) -> Result { self.buf.write_str(s) } @@ -1911,11 +1911,11 @@ macro_rules! fmt_refs { ($($tr:ident),*) => { $( #[stable(feature = "rust1", since = "1.0.0")] - impl<'a, T: ?Sized + $tr> $tr for &'a T { + impl $tr for &T { fn fmt(&self, f: &mut Formatter) -> Result { $tr::fmt(&**self, f) } } #[stable(feature = "rust1", since = "1.0.0")] - impl<'a, T: ?Sized + $tr> $tr for &'a mut T { + impl $tr for &mut T { fn fmt(&self, f: &mut Formatter) -> Result { $tr::fmt(&**self, f) } } )* @@ -2039,14 +2039,14 @@ impl Pointer for *mut T { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized> Pointer for &'a T { +impl Pointer for &T { fn fmt(&self, f: &mut Formatter) -> Result { Pointer::fmt(&(*self as *const T), f) } } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized> Pointer for &'a mut T { +impl Pointer for &mut T { fn fmt(&self, f: &mut Formatter) -> Result { Pointer::fmt(&(&**self as *const T), f) } @@ -2153,14 +2153,14 @@ impl Debug for RefCell { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'b, T: ?Sized + Debug> Debug for Ref<'b, T> { +impl Debug for Ref<'_, T> { fn fmt(&self, f: &mut Formatter) -> Result { Debug::fmt(&**self, f) } } #[stable(feature = "rust1", since = "1.0.0")] -impl<'b, T: ?Sized + Debug> Debug for RefMut<'b, T> { +impl Debug for RefMut<'_, T> { fn fmt(&self, f: &mut Formatter) -> Result { Debug::fmt(&*(self.deref()), f) } diff --git a/src/libcore/hash/mod.rs b/src/libcore/hash/mod.rs index e7907e034449..bbebadd452a2 100644 --- a/src/libcore/hash/mod.rs +++ b/src/libcore/hash/mod.rs @@ -361,7 +361,7 @@ pub trait Hasher { } #[stable(feature = "indirect_hasher_impl", since = "1.22.0")] -impl<'a, H: Hasher + ?Sized> Hasher for &'a mut H { +impl Hasher for &mut H { fn finish(&self) -> u64 { (**self).finish() } @@ -669,14 +669,14 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] - impl<'a, T: ?Sized + Hash> Hash for &'a T { + impl Hash for &T { fn hash(&self, state: &mut H) { (**self).hash(state); } } #[stable(feature = "rust1", since = "1.0.0")] - impl<'a, T: ?Sized + Hash> Hash for &'a mut T { + impl Hash for &mut T { fn hash(&self, state: &mut H) { (**self).hash(state); } diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/iterator.rs index d45c123d332e..4ed4ddb5b656 100644 --- a/src/libcore/iter/iterator.rs +++ b/src/libcore/iter/iterator.rs @@ -2557,7 +2557,7 @@ fn select_fold1(mut it: I, } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, I: Iterator + ?Sized> Iterator for &'a mut I { +impl Iterator for &mut I { type Item = I::Item; fn next(&mut self) -> Option { (**self).next() } fn size_hint(&self) -> (usize, Option) { (**self).size_hint() } diff --git a/src/libcore/iter/traits.rs b/src/libcore/iter/traits.rs index 4b2c1aa551e9..f95f8e7dbcbb 100644 --- a/src/libcore/iter/traits.rs +++ b/src/libcore/iter/traits.rs @@ -724,7 +724,7 @@ pub trait ExactSizeIterator: Iterator { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, I: ExactSizeIterator + ?Sized> ExactSizeIterator for &'a mut I { +impl ExactSizeIterator for &mut I { fn len(&self) -> usize { (**self).len() } @@ -974,7 +974,7 @@ impl Product> for Result pub trait FusedIterator: Iterator {} #[stable(feature = "fused", since = "1.26.0")] -impl<'a, I: FusedIterator + ?Sized> FusedIterator for &'a mut I {} +impl FusedIterator for &mut I {} /// An iterator that reports an accurate length using size_hint. /// @@ -999,4 +999,4 @@ impl<'a, I: FusedIterator + ?Sized> FusedIterator for &'a mut I {} pub unsafe trait TrustedLen : Iterator {} #[unstable(feature = "trusted_len", issue = "37572")] -unsafe impl<'a, I: TrustedLen + ?Sized> TrustedLen for &'a mut I {} +unsafe impl TrustedLen for &mut I {} diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 94e84106328e..184ed19da952 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -87,6 +87,7 @@ #![feature(doc_spotlight)] #![feature(extern_types)] #![feature(fundamental)] +#![feature(impl_header_lifetime_elision)] #![feature(intrinsics)] #![feature(lang_items)] #![feature(link_llvm_intrinsics)] diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 5572fe1512cb..266c6913747f 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -584,9 +584,9 @@ impls! { PhantomData } mod impls { #[stable(feature = "rust1", since = "1.0.0")] - unsafe impl<'a, T: Sync + ?Sized> Send for &'a T {} + unsafe impl Send for &T {} #[stable(feature = "rust1", since = "1.0.0")] - unsafe impl<'a, T: Send + ?Sized> Send for &'a mut T {} + unsafe impl Send for &mut T {} } /// Compiler-internal trait used to determine whether a type contains @@ -600,8 +600,8 @@ impl !Freeze for UnsafeCell {} unsafe impl Freeze for PhantomData {} unsafe impl Freeze for *const T {} unsafe impl Freeze for *mut T {} -unsafe impl<'a, T: ?Sized> Freeze for &'a T {} -unsafe impl<'a, T: ?Sized> Freeze for &'a mut T {} +unsafe impl Freeze for &T {} +unsafe impl Freeze for &mut T {} /// Types which can be safely moved after being pinned. /// @@ -689,6 +689,6 @@ mod copy_impls { // Shared references can be copied, but mutable references *cannot*! #[stable(feature = "rust1", since = "1.0.0")] - impl<'a, T: ?Sized> Copy for &'a T {} + impl Copy for &T {} } diff --git a/src/libcore/ops/deref.rs b/src/libcore/ops/deref.rs index 54eecc82e19e..91a3d77e8b2e 100644 --- a/src/libcore/ops/deref.rs +++ b/src/libcore/ops/deref.rs @@ -83,14 +83,14 @@ pub trait Deref { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized> Deref for &'a T { +impl Deref for &T { type Target = T; fn deref(&self) -> &T { *self } } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized> Deref for &'a mut T { +impl Deref for &mut T { type Target = T; fn deref(&self) -> &T { *self } @@ -174,6 +174,6 @@ pub trait DerefMut: Deref { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized> DerefMut for &'a mut T { +impl DerefMut for &mut T { fn deref_mut(&mut self) -> &mut T { *self } } diff --git a/src/libcore/ops/function.rs b/src/libcore/ops/function.rs index 3ebd10a92091..c9591c3f57bb 100644 --- a/src/libcore/ops/function.rs +++ b/src/libcore/ops/function.rs @@ -240,7 +240,7 @@ pub trait FnOnce { mod impls { #[stable(feature = "rust1", since = "1.0.0")] - impl<'a,A,F:?Sized> Fn for &'a F + impl Fn for &F where F : Fn { extern "rust-call" fn call(&self, args: A) -> F::Output { @@ -249,7 +249,7 @@ mod impls { } #[stable(feature = "rust1", since = "1.0.0")] - impl<'a,A,F:?Sized> FnMut for &'a F + impl FnMut for &F where F : Fn { extern "rust-call" fn call_mut(&mut self, args: A) -> F::Output { @@ -258,7 +258,7 @@ mod impls { } #[stable(feature = "rust1", since = "1.0.0")] - impl<'a,A,F:?Sized> FnOnce for &'a F + impl FnOnce for &F where F : Fn { type Output = F::Output; @@ -269,7 +269,7 @@ mod impls { } #[stable(feature = "rust1", since = "1.0.0")] - impl<'a,A,F:?Sized> FnMut for &'a mut F + impl FnMut for &mut F where F : FnMut { extern "rust-call" fn call_mut(&mut self, args: A) -> F::Output { @@ -278,7 +278,7 @@ mod impls { } #[stable(feature = "rust1", since = "1.0.0")] - impl<'a,A,F:?Sized> FnOnce for &'a mut F + impl FnOnce for &mut F where F : FnMut { type Output = F::Output; diff --git a/src/libcore/ops/generator.rs b/src/libcore/ops/generator.rs index 4b70c5398be4..297089926b53 100644 --- a/src/libcore/ops/generator.rs +++ b/src/libcore/ops/generator.rs @@ -124,7 +124,7 @@ pub trait Generator { } #[unstable(feature = "generator_trait", issue = "43122")] -impl<'a, T> Generator for &'a mut T +impl Generator for &mut T where T: Generator + ?Sized { type Yield = T::Yield; diff --git a/src/libcore/ops/range.rs b/src/libcore/ops/range.rs index 9c635678d7aa..f7e5a89a7aae 100644 --- a/src/libcore/ops/range.rs +++ b/src/libcore/ops/range.rs @@ -851,7 +851,7 @@ impl<'a, T: ?Sized + 'a> RangeBounds for (Bound<&'a T>, Bound<&'a T>) { } #[stable(feature = "collections_range", since = "1.28.0")] -impl<'a, T> RangeBounds for RangeFrom<&'a T> { +impl RangeBounds for RangeFrom<&T> { fn start_bound(&self) -> Bound<&T> { Included(self.start) } @@ -861,7 +861,7 @@ impl<'a, T> RangeBounds for RangeFrom<&'a T> { } #[stable(feature = "collections_range", since = "1.28.0")] -impl<'a, T> RangeBounds for RangeTo<&'a T> { +impl RangeBounds for RangeTo<&T> { fn start_bound(&self) -> Bound<&T> { Unbounded } @@ -871,7 +871,7 @@ impl<'a, T> RangeBounds for RangeTo<&'a T> { } #[stable(feature = "collections_range", since = "1.28.0")] -impl<'a, T> RangeBounds for Range<&'a T> { +impl RangeBounds for Range<&T> { fn start_bound(&self) -> Bound<&T> { Included(self.start) } @@ -881,7 +881,7 @@ impl<'a, T> RangeBounds for Range<&'a T> { } #[stable(feature = "collections_range", since = "1.28.0")] -impl<'a, T> RangeBounds for RangeInclusive<&'a T> { +impl RangeBounds for RangeInclusive<&T> { fn start_bound(&self) -> Bound<&T> { Included(self.start) } @@ -891,7 +891,7 @@ impl<'a, T> RangeBounds for RangeInclusive<&'a T> { } #[stable(feature = "collections_range", since = "1.28.0")] -impl<'a, T> RangeBounds for RangeToInclusive<&'a T> { +impl RangeBounds for RangeToInclusive<&T> { fn start_bound(&self) -> Bound<&T> { Unbounded } diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 58bf6be834d4..0255f7a0885e 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -1153,18 +1153,18 @@ impl<'a, A> DoubleEndedIterator for Iter<'a, A> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, A> ExactSizeIterator for Iter<'a, A> {} +impl ExactSizeIterator for Iter<'_, A> {} #[stable(feature = "fused", since = "1.26.0")] -impl<'a, A> FusedIterator for Iter<'a, A> {} +impl FusedIterator for Iter<'_, A> {} #[unstable(feature = "trusted_len", issue = "37572")] -unsafe impl<'a, A> TrustedLen for Iter<'a, A> {} +unsafe impl TrustedLen for Iter<'_, A> {} #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, A> Clone for Iter<'a, A> { +impl Clone for Iter<'_, A> { #[inline] - fn clone(&self) -> Iter<'a, A> { + fn clone(&self) -> Self { Iter { inner: self.inner.clone() } } } @@ -1199,12 +1199,12 @@ impl<'a, A> DoubleEndedIterator for IterMut<'a, A> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, A> ExactSizeIterator for IterMut<'a, A> {} +impl ExactSizeIterator for IterMut<'_, A> {} #[stable(feature = "fused", since = "1.26.0")] -impl<'a, A> FusedIterator for IterMut<'a, A> {} +impl FusedIterator for IterMut<'_, A> {} #[unstable(feature = "trusted_len", issue = "37572")] -unsafe impl<'a, A> TrustedLen for IterMut<'a, A> {} +unsafe impl TrustedLen for IterMut<'_, A> {} /// An iterator over the value in [`Some`] variant of an [`Option`]. /// diff --git a/src/libcore/panic.rs b/src/libcore/panic.rs index 17cac5aa0a05..f0efeb59e8d6 100644 --- a/src/libcore/panic.rs +++ b/src/libcore/panic.rs @@ -133,7 +133,7 @@ impl<'a> PanicInfo<'a> { } #[stable(feature = "panic_hook_display", since = "1.26.0")] -impl<'a> fmt::Display for PanicInfo<'a> { +impl fmt::Display for PanicInfo<'_> { fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { formatter.write_str("panicked at ")?; if let Some(message) = self.message { @@ -258,7 +258,7 @@ impl<'a> Location<'a> { } #[stable(feature = "panic_hook_display", since = "1.26.0")] -impl<'a> fmt::Display for Location<'a> { +impl fmt::Display for Location<'_> { fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { write!(formatter, "{}:{}:{}", self.file, self.line, self.col) } diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 93ee11aac36b..3484664c2420 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -1098,18 +1098,18 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T> ExactSizeIterator for Iter<'a, T> {} +impl ExactSizeIterator for Iter<'_, T> {} #[stable(feature = "fused", since = "1.26.0")] -impl<'a, T> FusedIterator for Iter<'a, T> {} +impl FusedIterator for Iter<'_, T> {} #[unstable(feature = "trusted_len", issue = "37572")] -unsafe impl<'a, A> TrustedLen for Iter<'a, A> {} +unsafe impl TrustedLen for Iter<'_, A> {} #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T> Clone for Iter<'a, T> { +impl Clone for Iter<'_, T> { #[inline] - fn clone(&self) -> Iter<'a, T> { Iter { inner: self.inner } } + fn clone(&self) -> Self { Iter { inner: self.inner } } } /// An iterator over a mutable reference to the [`Ok`] variant of a [`Result`]. @@ -1143,13 +1143,13 @@ impl<'a, T> DoubleEndedIterator for IterMut<'a, T> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T> ExactSizeIterator for IterMut<'a, T> {} +impl ExactSizeIterator for IterMut<'_, T> {} #[stable(feature = "fused", since = "1.26.0")] -impl<'a, T> FusedIterator for IterMut<'a, T> {} +impl FusedIterator for IterMut<'_, T> {} #[unstable(feature = "trusted_len", issue = "37572")] -unsafe impl<'a, A> TrustedLen for IterMut<'a, A> {} +unsafe impl TrustedLen for IterMut<'_, A> {} /// An iterator over the value in a [`Ok`] variant of a [`Result`]. /// diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index d400bd49050a..a50426ba886b 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -2529,15 +2529,15 @@ impl SliceIndex<[T]> for ops::RangeToInclusive { //////////////////////////////////////////////////////////////////////////////// #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T> Default for &'a [T] { +impl Default for &[T] { /// Creates an empty slice. - fn default() -> &'a [T] { &[] } + fn default() -> Self { &[] } } #[stable(feature = "mut_slice_default", since = "1.5.0")] -impl<'a, T> Default for &'a mut [T] { +impl Default for &mut [T] { /// Creates a mutable empty slice. - fn default() -> &'a mut [T] { &mut [] } + fn default() -> Self { &mut [] } } // @@ -2864,7 +2864,7 @@ pub struct Iter<'a, T: 'a> { } #[stable(feature = "core_impl_debug", since = "1.9.0")] -impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> { +impl fmt::Debug for Iter<'_, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_tuple("Iter") .field(&self.as_slice()) @@ -2873,9 +2873,9 @@ impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> { } #[stable(feature = "rust1", since = "1.0.0")] -unsafe impl<'a, T: Sync> Sync for Iter<'a, T> {} +unsafe impl Sync for Iter<'_, T> {} #[stable(feature = "rust1", since = "1.0.0")] -unsafe impl<'a, T: Sync> Send for Iter<'a, T> {} +unsafe impl Send for Iter<'_, T> {} impl<'a, T> Iter<'a, T> { /// View the underlying data as a subslice of the original data. @@ -2911,12 +2911,12 @@ impl<'a, T> Iter<'a, T> { iterator!{struct Iter -> *const T, &'a T, const, /* no mut */} #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T> Clone for Iter<'a, T> { - fn clone(&self) -> Iter<'a, T> { Iter { ptr: self.ptr, end: self.end, _marker: self._marker } } +impl Clone for Iter<'_, T> { + fn clone(&self) -> Self { Iter { ptr: self.ptr, end: self.end, _marker: self._marker } } } #[stable(feature = "slice_iter_as_ref", since = "1.13.0")] -impl<'a, T> AsRef<[T]> for Iter<'a, T> { +impl AsRef<[T]> for Iter<'_, T> { fn as_ref(&self) -> &[T] { self.as_slice() } @@ -2956,7 +2956,7 @@ pub struct IterMut<'a, T: 'a> { } #[stable(feature = "core_impl_debug", since = "1.9.0")] -impl<'a, T: 'a + fmt::Debug> fmt::Debug for IterMut<'a, T> { +impl fmt::Debug for IterMut<'_, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_tuple("IterMut") .field(&self.make_slice()) @@ -2965,9 +2965,9 @@ impl<'a, T: 'a + fmt::Debug> fmt::Debug for IterMut<'a, T> { } #[stable(feature = "rust1", since = "1.0.0")] -unsafe impl<'a, T: Sync> Sync for IterMut<'a, T> {} +unsafe impl Sync for IterMut<'_, T> {} #[stable(feature = "rust1", since = "1.0.0")] -unsafe impl<'a, T: Send> Send for IterMut<'a, T> {} +unsafe impl Send for IterMut<'_, T> {} impl<'a, T> IterMut<'a, T> { /// View the underlying data as a subslice of the original data. @@ -3035,7 +3035,7 @@ pub struct Split<'a, T:'a, P> where P: FnMut(&T) -> bool { } #[stable(feature = "core_impl_debug", since = "1.9.0")] -impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for Split<'a, T, P> where P: FnMut(&T) -> bool { +impl fmt::Debug for Split<'_, T, P> where P: FnMut(&T) -> bool { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("Split") .field("v", &self.v) @@ -3046,8 +3046,8 @@ impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for Split<'a, T, P> where P: FnMut(&T // FIXME(#26925) Remove in favor of `#[derive(Clone)]` #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T, P> Clone for Split<'a, T, P> where P: Clone + FnMut(&T) -> bool { - fn clone(&self) -> Split<'a, T, P> { +impl Clone for Split<'_, T, P> where P: Clone + FnMut(&T) -> bool { + fn clone(&self) -> Self { Split { v: self.v, pred: self.pred.clone(), @@ -3109,7 +3109,7 @@ impl<'a, T, P> SplitIter for Split<'a, T, P> where P: FnMut(&T) -> bool { } #[stable(feature = "fused", since = "1.26.0")] -impl<'a, T, P> FusedIterator for Split<'a, T, P> where P: FnMut(&T) -> bool {} +impl FusedIterator for Split<'_, T, P> where P: FnMut(&T) -> bool {} /// An iterator over the subslices of the vector which are separated /// by elements that match `pred`. @@ -3126,7 +3126,7 @@ pub struct SplitMut<'a, T:'a, P> where P: FnMut(&T) -> bool { } #[stable(feature = "core_impl_debug", since = "1.9.0")] -impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for SplitMut<'a, T, P> where P: FnMut(&T) -> bool { +impl fmt::Debug for SplitMut<'_, T, P> where P: FnMut(&T) -> bool { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("SplitMut") .field("v", &self.v) @@ -3207,7 +3207,7 @@ impl<'a, T, P> DoubleEndedIterator for SplitMut<'a, T, P> where } #[stable(feature = "fused", since = "1.26.0")] -impl<'a, T, P> FusedIterator for SplitMut<'a, T, P> where P: FnMut(&T) -> bool {} +impl FusedIterator for SplitMut<'_, T, P> where P: FnMut(&T) -> bool {} /// An iterator over subslices separated by elements that match a predicate /// function, starting from the end of the slice. @@ -3223,7 +3223,7 @@ pub struct RSplit<'a, T:'a, P> where P: FnMut(&T) -> bool { } #[stable(feature = "slice_rsplit", since = "1.27.0")] -impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for RSplit<'a, T, P> where P: FnMut(&T) -> bool { +impl fmt::Debug for RSplit<'_, T, P> where P: FnMut(&T) -> bool { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("RSplit") .field("v", &self.inner.v) @@ -3264,7 +3264,7 @@ impl<'a, T, P> SplitIter for RSplit<'a, T, P> where P: FnMut(&T) -> bool { } #[stable(feature = "slice_rsplit", since = "1.27.0")] -impl<'a, T, P> FusedIterator for RSplit<'a, T, P> where P: FnMut(&T) -> bool {} +impl FusedIterator for RSplit<'_, T, P> where P: FnMut(&T) -> bool {} /// An iterator over the subslices of the vector which are separated /// by elements that match `pred`, starting from the end of the slice. @@ -3279,7 +3279,7 @@ pub struct RSplitMut<'a, T:'a, P> where P: FnMut(&T) -> bool { } #[stable(feature = "slice_rsplit", since = "1.27.0")] -impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for RSplitMut<'a, T, P> where P: FnMut(&T) -> bool { +impl fmt::Debug for RSplitMut<'_, T, P> where P: FnMut(&T) -> bool { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("RSplitMut") .field("v", &self.inner.v) @@ -3322,7 +3322,7 @@ impl<'a, T, P> DoubleEndedIterator for RSplitMut<'a, T, P> where } #[stable(feature = "slice_rsplit", since = "1.27.0")] -impl<'a, T, P> FusedIterator for RSplitMut<'a, T, P> where P: FnMut(&T) -> bool {} +impl FusedIterator for RSplitMut<'_, T, P> where P: FnMut(&T) -> bool {} /// An private iterator over subslices separated by elements that /// match a predicate function, splitting at most a fixed number of @@ -3365,7 +3365,7 @@ pub struct SplitN<'a, T: 'a, P> where P: FnMut(&T) -> bool { } #[stable(feature = "core_impl_debug", since = "1.9.0")] -impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for SplitN<'a, T, P> where P: FnMut(&T) -> bool { +impl fmt::Debug for SplitN<'_, T, P> where P: FnMut(&T) -> bool { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("SplitN") .field("inner", &self.inner) @@ -3387,7 +3387,7 @@ pub struct RSplitN<'a, T: 'a, P> where P: FnMut(&T) -> bool { } #[stable(feature = "core_impl_debug", since = "1.9.0")] -impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for RSplitN<'a, T, P> where P: FnMut(&T) -> bool { +impl fmt::Debug for RSplitN<'_, T, P> where P: FnMut(&T) -> bool { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("RSplitN") .field("inner", &self.inner) @@ -3408,7 +3408,7 @@ pub struct SplitNMut<'a, T: 'a, P> where P: FnMut(&T) -> bool { } #[stable(feature = "core_impl_debug", since = "1.9.0")] -impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for SplitNMut<'a, T, P> where P: FnMut(&T) -> bool { +impl fmt::Debug for SplitNMut<'_, T, P> where P: FnMut(&T) -> bool { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("SplitNMut") .field("inner", &self.inner) @@ -3430,7 +3430,7 @@ pub struct RSplitNMut<'a, T: 'a, P> where P: FnMut(&T) -> bool { } #[stable(feature = "core_impl_debug", since = "1.9.0")] -impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for RSplitNMut<'a, T, P> where P: FnMut(&T) -> bool { +impl fmt::Debug for RSplitNMut<'_, T, P> where P: FnMut(&T) -> bool { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("RSplitNMut") .field("inner", &self.inner) @@ -3483,8 +3483,8 @@ pub struct Windows<'a, T:'a> { // FIXME(#26925) Remove in favor of `#[derive(Clone)]` #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T> Clone for Windows<'a, T> { - fn clone(&self) -> Windows<'a, T> { +impl Clone for Windows<'_, T> { + fn clone(&self) -> Self { Windows { v: self.v, size: self.size, @@ -3561,13 +3561,13 @@ impl<'a, T> DoubleEndedIterator for Windows<'a, T> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T> ExactSizeIterator for Windows<'a, T> {} +impl ExactSizeIterator for Windows<'_, T> {} #[unstable(feature = "trusted_len", issue = "37572")] -unsafe impl<'a, T> TrustedLen for Windows<'a, T> {} +unsafe impl TrustedLen for Windows<'_, T> {} #[stable(feature = "fused", since = "1.26.0")] -impl<'a, T> FusedIterator for Windows<'a, T> {} +impl FusedIterator for Windows<'_, T> {} #[doc(hidden)] unsafe impl<'a, T> TrustedRandomAccess for Windows<'a, T> { @@ -3596,8 +3596,8 @@ pub struct Chunks<'a, T:'a> { // FIXME(#26925) Remove in favor of `#[derive(Clone)]` #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T> Clone for Chunks<'a, T> { - fn clone(&self) -> Chunks<'a, T> { +impl Clone for Chunks<'_, T> { + fn clone(&self) -> Self { Chunks { v: self.v, chunk_size: self.chunk_size, @@ -3683,13 +3683,13 @@ impl<'a, T> DoubleEndedIterator for Chunks<'a, T> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T> ExactSizeIterator for Chunks<'a, T> {} +impl ExactSizeIterator for Chunks<'_, T> {} #[unstable(feature = "trusted_len", issue = "37572")] -unsafe impl<'a, T> TrustedLen for Chunks<'a, T> {} +unsafe impl TrustedLen for Chunks<'_, T> {} #[stable(feature = "fused", since = "1.26.0")] -impl<'a, T> FusedIterator for Chunks<'a, T> {} +impl FusedIterator for Chunks<'_, T> {} #[doc(hidden)] unsafe impl<'a, T> TrustedRandomAccess for Chunks<'a, T> { @@ -3802,13 +3802,13 @@ impl<'a, T> DoubleEndedIterator for ChunksMut<'a, T> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T> ExactSizeIterator for ChunksMut<'a, T> {} +impl ExactSizeIterator for ChunksMut<'_, T> {} #[unstable(feature = "trusted_len", issue = "37572")] -unsafe impl<'a, T> TrustedLen for ChunksMut<'a, T> {} +unsafe impl TrustedLen for ChunksMut<'_, T> {} #[stable(feature = "fused", since = "1.26.0")] -impl<'a, T> FusedIterator for ChunksMut<'a, T> {} +impl FusedIterator for ChunksMut<'_, T> {} #[doc(hidden)] unsafe impl<'a, T> TrustedRandomAccess for ChunksMut<'a, T> { @@ -3855,8 +3855,8 @@ impl<'a, T> ChunksExact<'a, T> { // FIXME(#26925) Remove in favor of `#[derive(Clone)]` #[unstable(feature = "chunks_exact", issue = "47115")] -impl<'a, T> Clone for ChunksExact<'a, T> { - fn clone(&self) -> ChunksExact<'a, T> { +impl Clone for ChunksExact<'_, T> { + fn clone(&self) -> Self { ChunksExact { v: self.v, rem: self.rem, @@ -3925,17 +3925,17 @@ impl<'a, T> DoubleEndedIterator for ChunksExact<'a, T> { } #[unstable(feature = "chunks_exact", issue = "47115")] -impl<'a, T> ExactSizeIterator for ChunksExact<'a, T> { +impl ExactSizeIterator for ChunksExact<'_, T> { fn is_empty(&self) -> bool { self.v.is_empty() } } #[unstable(feature = "trusted_len", issue = "37572")] -unsafe impl<'a, T> TrustedLen for ChunksExact<'a, T> {} +unsafe impl TrustedLen for ChunksExact<'_, T> {} #[unstable(feature = "chunks_exact", issue = "47115")] -impl<'a, T> FusedIterator for ChunksExact<'a, T> {} +impl FusedIterator for ChunksExact<'_, T> {} #[doc(hidden)] unsafe impl<'a, T> TrustedRandomAccess for ChunksExact<'a, T> { @@ -4040,17 +4040,17 @@ impl<'a, T> DoubleEndedIterator for ChunksExactMut<'a, T> { } #[unstable(feature = "chunks_exact", issue = "47115")] -impl<'a, T> ExactSizeIterator for ChunksExactMut<'a, T> { +impl ExactSizeIterator for ChunksExactMut<'_, T> { fn is_empty(&self) -> bool { self.v.is_empty() } } #[unstable(feature = "trusted_len", issue = "37572")] -unsafe impl<'a, T> TrustedLen for ChunksExactMut<'a, T> {} +unsafe impl TrustedLen for ChunksExactMut<'_, T> {} #[unstable(feature = "chunks_exact", issue = "47115")] -impl<'a, T> FusedIterator for ChunksExactMut<'a, T> {} +impl FusedIterator for ChunksExactMut<'_, T> {} #[doc(hidden)] unsafe impl<'a, T> TrustedRandomAccess for ChunksExactMut<'a, T> { diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 2c941c28d4b8..a2782dd8e2e4 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -617,7 +617,7 @@ impl<'a> DoubleEndedIterator for Chars<'a> { } #[stable(feature = "fused", since = "1.26.0")] -impl<'a> FusedIterator for Chars<'a> {} +impl FusedIterator for Chars<'_> {} impl<'a> Chars<'a> { /// View the underlying data as a subslice of the original data. @@ -707,7 +707,7 @@ impl<'a> DoubleEndedIterator for CharIndices<'a> { } #[stable(feature = "fused", since = "1.26.0")] -impl<'a> FusedIterator for CharIndices<'a> {} +impl FusedIterator for CharIndices<'_> {} impl<'a> CharIndices<'a> { /// View the underlying data as a subslice of the original data. @@ -733,7 +733,7 @@ impl<'a> CharIndices<'a> { pub struct Bytes<'a>(Cloned>); #[stable(feature = "rust1", since = "1.0.0")] -impl<'a> Iterator for Bytes<'a> { +impl Iterator for Bytes<'_> { type Item = u8; #[inline] @@ -794,7 +794,7 @@ impl<'a> Iterator for Bytes<'a> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a> DoubleEndedIterator for Bytes<'a> { +impl DoubleEndedIterator for Bytes<'_> { #[inline] fn next_back(&mut self) -> Option { self.0.next_back() @@ -809,7 +809,7 @@ impl<'a> DoubleEndedIterator for Bytes<'a> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a> ExactSizeIterator for Bytes<'a> { +impl ExactSizeIterator for Bytes<'_> { #[inline] fn len(&self) -> usize { self.0.len() @@ -822,10 +822,10 @@ impl<'a> ExactSizeIterator for Bytes<'a> { } #[stable(feature = "fused", since = "1.26.0")] -impl<'a> FusedIterator for Bytes<'a> {} +impl FusedIterator for Bytes<'_> {} #[unstable(feature = "trusted_len", issue = "37572")] -unsafe impl<'a> TrustedLen for Bytes<'a> {} +unsafe impl TrustedLen for Bytes<'_> {} #[doc(hidden)] unsafe impl<'a> TrustedRandomAccess for Bytes<'a> { @@ -1342,7 +1342,7 @@ impl<'a> DoubleEndedIterator for Lines<'a> { } #[stable(feature = "fused", since = "1.26.0")] -impl<'a> FusedIterator for Lines<'a> {} +impl FusedIterator for Lines<'_> {} /// Created with the method [`lines_any`]. /// @@ -1409,7 +1409,7 @@ impl<'a> DoubleEndedIterator for LinesAny<'a> { #[stable(feature = "fused", since = "1.26.0")] #[allow(deprecated)] -impl<'a> FusedIterator for LinesAny<'a> {} +impl FusedIterator for LinesAny<'_> {} /* Section: UTF-8 validation @@ -4033,15 +4033,15 @@ impl AsRef<[u8]> for str { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a> Default for &'a str { +impl Default for &str { /// Creates an empty str - fn default() -> &'a str { "" } + fn default() -> Self { "" } } #[stable(feature = "default_mut_str", since = "1.28.0")] -impl<'a> Default for &'a mut str { +impl Default for &mut str { /// Creates an empty mutable str - fn default() -> &'a mut str { unsafe { from_utf8_unchecked_mut(&mut []) } } + fn default() -> Self { unsafe { from_utf8_unchecked_mut(&mut []) } } } /// An iterator over the non-whitespace substrings of a string, @@ -4189,7 +4189,7 @@ impl<'a> DoubleEndedIterator for SplitWhitespace<'a> { } #[stable(feature = "fused", since = "1.26.0")] -impl<'a> FusedIterator for SplitWhitespace<'a> {} +impl FusedIterator for SplitWhitespace<'_> {} #[unstable(feature = "split_ascii_whitespace", issue = "48656")] impl<'a> Iterator for SplitAsciiWhitespace<'a> { @@ -4215,7 +4215,7 @@ impl<'a> DoubleEndedIterator for SplitAsciiWhitespace<'a> { } #[unstable(feature = "split_ascii_whitespace", issue = "48656")] -impl<'a> FusedIterator for SplitAsciiWhitespace<'a> {} +impl FusedIterator for SplitAsciiWhitespace<'_> {} /// An iterator of [`u16`] over the string encoded as UTF-16. /// @@ -4234,7 +4234,7 @@ pub struct EncodeUtf16<'a> { } #[stable(feature = "collection_debug", since = "1.17.0")] -impl<'a> fmt::Debug for EncodeUtf16<'a> { +impl fmt::Debug for EncodeUtf16<'_> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.pad("EncodeUtf16 { .. }") } @@ -4273,4 +4273,4 @@ impl<'a> Iterator for EncodeUtf16<'a> { } #[stable(feature = "fused", since = "1.26.0")] -impl<'a> FusedIterator for EncodeUtf16<'a> {} +impl FusedIterator for EncodeUtf16<'_> {} diff --git a/src/libcore/str/pattern.rs b/src/libcore/str/pattern.rs index 5e63fa9ff354..1c974533e10c 100644 --- a/src/libcore/str/pattern.rs +++ b/src/libcore/str/pattern.rs @@ -491,7 +491,7 @@ impl MultiCharEq for F where F: FnMut(char) -> bool { fn matches(&mut self, c: char) -> bool { (*self)(c) } } -impl<'a> MultiCharEq for &'a [char] { +impl MultiCharEq for &[char] { #[inline] fn matches(&mut self, c: char) -> bool { self.iter().any(|&m| { m == c }) @@ -666,7 +666,7 @@ impl<'a, 'b> Pattern<'a> for &'b [char] { pub struct CharPredicateSearcher<'a, F>( as Pattern<'a>>::Searcher) where F: FnMut(char) -> bool; -impl<'a, F> fmt::Debug for CharPredicateSearcher<'a, F> +impl fmt::Debug for CharPredicateSearcher<'_, F> where F: FnMut(char) -> bool { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/libcore/tests/iter.rs b/src/libcore/tests/iter.rs index 72b115f8b5f7..2476c07cbd9c 100644 --- a/src/libcore/tests/iter.rs +++ b/src/libcore/tests/iter.rs @@ -229,7 +229,7 @@ fn test_iterator_step_by_nth_overflow() { #[derive(Clone)] struct Test(Bigger); - impl<'a> Iterator for &'a mut Test { + impl Iterator for &mut Test { type Item = i32; fn next(&mut self) -> Option { Some(21) } fn nth(&mut self, n: usize) -> Option { diff --git a/src/libcore/tests/lib.rs b/src/libcore/tests/lib.rs index e034ff805934..ada61d8dfd87 100644 --- a/src/libcore/tests/lib.rs +++ b/src/libcore/tests/lib.rs @@ -19,6 +19,7 @@ #![feature(flt2dec)] #![feature(fmt_internals)] #![feature(hashmap_internals)] +#![feature(impl_header_lifetime_elision)] #![feature(pattern)] #![feature(range_is_empty)] #![feature(raw)] diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs index 34a44bd14214..1a2b16a4fed0 100644 --- a/src/libproc_macro/lib.rs +++ b/src/libproc_macro/lib.rs @@ -142,7 +142,7 @@ impl fmt::Debug for TokenStream { } } -#[unstable(feature = "proc_macro_quote", issue = "38356")] +#[unstable(feature = "proc_macro_quote", issue = "54722")] pub use quote::{quote, quote_span}; /// Creates a token stream containing a single token tree. @@ -252,7 +252,7 @@ pub mod token_stream { /// To quote `$` itself, use `$$`. /// /// This is a dummy macro, the actual implementation is in `quote::quote`.` -#[unstable(feature = "proc_macro_quote", issue = "38356")] +#[unstable(feature = "proc_macro_quote", issue = "54722")] #[macro_export] macro_rules! quote { () => {} } @@ -283,7 +283,7 @@ macro_rules! diagnostic_method { impl Span { /// A span that resolves at the macro definition site. - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_def_site", issue = "54724")] pub fn def_site() -> Span { ::__internal::with_sess(|_, data| data.def_site) } @@ -298,7 +298,7 @@ impl Span { } /// The original source file into which this span points. - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn source_file(&self) -> SourceFile { SourceFile { source_file: __internal::lookup_char_pos(self.0.lo()).file, @@ -307,7 +307,7 @@ impl Span { /// The `Span` for the tokens in the previous macro expansion from which /// `self` was generated from, if any. - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn parent(&self) -> Option { self.0.parent().map(Span) } @@ -315,13 +315,13 @@ impl Span { /// The span for the origin source code that `self` was generated from. If /// this `Span` wasn't generated from other macro expansions then the return /// value is the same as `*self`. - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn source(&self) -> Span { Span(self.0.source_callsite()) } /// Get the starting line/column in the source file for this span. - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn start(&self) -> LineColumn { let loc = __internal::lookup_char_pos(self.0.lo()); LineColumn { @@ -331,7 +331,7 @@ impl Span { } /// Get the ending line/column in the source file for this span. - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn end(&self) -> LineColumn { let loc = __internal::lookup_char_pos(self.0.hi()); LineColumn { @@ -343,7 +343,7 @@ impl Span { /// Create a new span encompassing `self` and `other`. /// /// Returns `None` if `self` and `other` are from different files. - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn join(&self, other: Span) -> Option { let self_loc = __internal::lookup_char_pos(self.0.lo()); let other_loc = __internal::lookup_char_pos(other.0.lo()); @@ -355,20 +355,20 @@ impl Span { /// Creates a new span with the same line/column information as `self` but /// that resolves symbols as though it were at `other`. - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn resolved_at(&self, other: Span) -> Span { Span(self.0.with_ctxt(other.0.ctxt())) } /// Creates a new span with the same name resolution behavior as `self` but /// with the line/column information of `other`. - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn located_at(&self, other: Span) -> Span { other.resolved_at(*self) } /// Compares to spans to see if they're equal. - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn eq(&self, other: &Span) -> bool { self.0 == other.0 } @@ -391,33 +391,33 @@ impl fmt::Debug for Span { } /// A line-column pair representing the start or end of a `Span`. -#[unstable(feature = "proc_macro_span", issue = "38356")] +#[unstable(feature = "proc_macro_span", issue = "54725")] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct LineColumn { /// The 1-indexed line in the source file on which the span starts or ends (inclusive). - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub line: usize, /// The 0-indexed column (in UTF-8 characters) in the source file on which /// the span starts or ends (inclusive). - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub column: usize } -#[unstable(feature = "proc_macro_span", issue = "38356")] +#[unstable(feature = "proc_macro_span", issue = "54725")] impl !Send for LineColumn {} -#[unstable(feature = "proc_macro_span", issue = "38356")] +#[unstable(feature = "proc_macro_span", issue = "54725")] impl !Sync for LineColumn {} /// The source file of a given `Span`. -#[unstable(feature = "proc_macro_span", issue = "38356")] +#[unstable(feature = "proc_macro_span", issue = "54725")] #[derive(Clone)] pub struct SourceFile { source_file: Lrc, } -#[unstable(feature = "proc_macro_span", issue = "38356")] +#[unstable(feature = "proc_macro_span", issue = "54725")] impl !Send for SourceFile {} -#[unstable(feature = "proc_macro_span", issue = "38356")] +#[unstable(feature = "proc_macro_span", issue = "54725")] impl !Sync for SourceFile {} impl SourceFile { @@ -431,7 +431,7 @@ impl SourceFile { /// the command line, the path as given may not actually be valid. /// /// [`is_real`]: #method.is_real - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn path(&self) -> PathBuf { match self.source_file.name { FileName::Real(ref path) => path.clone(), @@ -441,7 +441,7 @@ impl SourceFile { /// Returns `true` if this source file is a real source file, and not generated by an external /// macro's expansion. - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn is_real(&self) -> bool { // This is a hack until intercrate spans are implemented and we can have real source files // for spans generated in external macros. @@ -451,7 +451,7 @@ impl SourceFile { } -#[unstable(feature = "proc_macro_span", issue = "38356")] +#[unstable(feature = "proc_macro_span", issue = "54725")] impl fmt::Debug for SourceFile { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("SourceFile") @@ -461,14 +461,14 @@ impl fmt::Debug for SourceFile { } } -#[unstable(feature = "proc_macro_span", issue = "38356")] +#[unstable(feature = "proc_macro_span", issue = "54725")] impl PartialEq for SourceFile { fn eq(&self, other: &Self) -> bool { Lrc::ptr_eq(&self.source_file, &other.source_file) } } -#[unstable(feature = "proc_macro_span", issue = "38356")] +#[unstable(feature = "proc_macro_span", issue = "54725")] impl Eq for SourceFile {} /// A single token or a delimited sequence of token trees (e.g. `[1, (), ..]`). @@ -679,7 +679,7 @@ impl Group { /// pub fn span_open(&self) -> Span { /// ^ /// ``` - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn span_open(&self) -> Span { Span(self.span.open) } @@ -690,7 +690,7 @@ impl Group { /// pub fn span_close(&self) -> Span { /// ^ /// ``` - #[unstable(feature = "proc_macro_span", issue = "38356")] + #[unstable(feature = "proc_macro_span", issue = "54725")] pub fn span_close(&self) -> Span { Span(self.span.close) } @@ -881,7 +881,7 @@ impl Ident { } /// Same as `Ident::new`, but creates a raw identifier (`r#ident`). - #[unstable(feature = "proc_macro_raw_ident", issue = "38356")] + #[unstable(feature = "proc_macro_raw_ident", issue = "54723")] pub fn new_raw(string: &str, span: Span) -> Ident { if !Ident::is_valid(string) { panic!("`{:?}` is not a valid identifier", string) diff --git a/src/libproc_macro/quote.rs b/src/libproc_macro/quote.rs index 7ae7b13a1521..0f454a79055a 100644 --- a/src/libproc_macro/quote.rs +++ b/src/libproc_macro/quote.rs @@ -70,7 +70,7 @@ macro_rules! quote { /// This is the actual `quote!()` proc macro. /// /// It is manually loaded in `CStore::load_macro_untracked`. -#[unstable(feature = "proc_macro_quote", issue = "38356")] +#[unstable(feature = "proc_macro_quote", issue = "54722")] pub fn quote(stream: TokenStream) -> TokenStream { if stream.is_empty() { return quote!(::TokenStream::new()); @@ -144,7 +144,7 @@ pub fn quote(stream: TokenStream) -> TokenStream { /// Quote a `Span` into a `TokenStream`. /// This is needed to implement a custom quoter. -#[unstable(feature = "proc_macro_quote", issue = "38356")] +#[unstable(feature = "proc_macro_quote", issue = "54722")] pub fn quote_span(_: Span) -> TokenStream { quote!(::Span::def_site()) } diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index 81d8a803c395..5be743688649 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -727,9 +727,15 @@ impl<'a> LoweringContext<'a> { // Get the name we'll use to make the def-path. Note // that collisions are ok here and this shouldn't // really show up for end-user. - let str_name = match hir_name { - ParamName::Plain(ident) => ident.as_interned_str(), - ParamName::Fresh(_) => keywords::UnderscoreLifetime.name().as_interned_str(), + let (str_name, kind) = match hir_name { + ParamName::Plain(ident) => ( + ident.as_interned_str(), + hir::LifetimeParamKind::InBand, + ), + ParamName::Fresh(_) => ( + keywords::UnderscoreLifetime.name().as_interned_str(), + hir::LifetimeParamKind::Elided, + ), }; // Add a definition for the in-band lifetime def @@ -749,7 +755,7 @@ impl<'a> LoweringContext<'a> { bounds: hir_vec![], span, pure_wrt_drop: false, - kind: hir::GenericParamKind::Lifetime { in_band: true } + kind: hir::GenericParamKind::Lifetime { kind } } }) .chain(in_band_ty_params.into_iter()) @@ -1509,11 +1515,15 @@ impl<'a> LoweringContext<'a> { lifetime.span, ); - let name = match name { - hir::LifetimeName::Underscore => { - hir::ParamName::Plain(keywords::UnderscoreLifetime.ident()) - } - hir::LifetimeName::Param(param_name) => param_name, + let (name, kind) = match name { + hir::LifetimeName::Underscore => ( + hir::ParamName::Plain(keywords::UnderscoreLifetime.ident()), + hir::LifetimeParamKind::Elided, + ), + hir::LifetimeName::Param(param_name) => ( + param_name, + hir::LifetimeParamKind::Explicit, + ), _ => bug!("expected LifetimeName::Param or ParamName::Plain"), }; @@ -1524,9 +1534,7 @@ impl<'a> LoweringContext<'a> { pure_wrt_drop: false, attrs: hir_vec![], bounds: hir_vec![], - kind: hir::GenericParamKind::Lifetime { - in_band: false, - } + kind: hir::GenericParamKind::Lifetime { kind } }); } } @@ -2360,7 +2368,9 @@ impl<'a> LoweringContext<'a> { pure_wrt_drop: attr::contains_name(¶m.attrs, "may_dangle"), attrs: self.lower_attrs(¶m.attrs), bounds, - kind: hir::GenericParamKind::Lifetime { in_band: false } + kind: hir::GenericParamKind::Lifetime { + kind: hir::LifetimeParamKind::Explicit, + } }; self.is_collecting_in_band_lifetimes = was_collecting_in_band; diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index 088bee381168..a9ca5d9d30d1 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -499,14 +499,27 @@ impl GenericBound { pub type GenericBounds = HirVec; +#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Debug)] +pub enum LifetimeParamKind { + // Indicates that the lifetime definition was explicitly declared, like: + // `fn foo<'a>(x: &'a u8) -> &'a u8 { x }` + Explicit, + + // Indicates that the lifetime definition was synthetically added + // as a result of an in-band lifetime usage like: + // `fn foo(x: &'a u8) -> &'a u8 { x }` + InBand, + + // Indication that the lifetime was elided like both cases here: + // `fn foo(x: &u8) -> &'_ u8 { x }` + Elided, +} + #[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub enum GenericParamKind { /// A lifetime definition, eg `'a: 'b + 'c + 'd`. Lifetime { - // Indicates that the lifetime definition was synthetically added - // as a result of an in-band lifetime usage like: - // `fn foo(x: &'a u8) -> &'a u8 { x }` - in_band: bool, + kind: LifetimeParamKind, }, Type { default: Option>, diff --git a/src/librustc/ich/impls_hir.rs b/src/librustc/ich/impls_hir.rs index bc2eb5f442b4..676c24a8d3df 100644 --- a/src/librustc/ich/impls_hir.rs +++ b/src/librustc/ich/impls_hir.rs @@ -207,14 +207,20 @@ impl_stable_hash_for!(struct hir::GenericParam { kind }); +impl_stable_hash_for!(enum hir::LifetimeParamKind { + Explicit, + InBand, + Elided +}); + impl<'a> HashStable> for hir::GenericParamKind { fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) { mem::discriminant(self).hash_stable(hcx, hasher); match self { - hir::GenericParamKind::Lifetime { in_band } => { - in_band.hash_stable(hcx, hasher); + hir::GenericParamKind::Lifetime { kind } => { + kind.hash_stable(hcx, hasher); } hir::GenericParamKind::Type { ref default, synthetic } => { default.hash_stable(hcx, hasher); diff --git a/src/librustc/middle/resolve_lifetime.rs b/src/librustc/middle/resolve_lifetime.rs index cda7d8d6b900..acdeeca1ce4d 100644 --- a/src/librustc/middle/resolve_lifetime.rs +++ b/src/librustc/middle/resolve_lifetime.rs @@ -35,7 +35,7 @@ use syntax_pos::Span; use util::nodemap::{DefIdMap, FxHashMap, FxHashSet, NodeMap, NodeSet}; use hir::intravisit::{self, NestedVisitorMap, Visitor}; -use hir::{self, GenericParamKind}; +use hir::{self, GenericParamKind, LifetimeParamKind}; /// The origin of a named lifetime definition. /// @@ -51,8 +51,8 @@ pub enum LifetimeDefOrigin { impl LifetimeDefOrigin { fn from_param(param: &GenericParam) -> Self { match param.kind { - GenericParamKind::Lifetime { in_band } => { - if in_band { + GenericParamKind::Lifetime { kind } => { + if kind == LifetimeParamKind::InBand { LifetimeDefOrigin::InBand } else { LifetimeDefOrigin::Explicit @@ -1087,15 +1087,15 @@ fn check_mixed_explicit_and_in_band_defs( tcx: TyCtxt<'_, '_, '_>, params: &P<[hir::GenericParam]>, ) { - let in_bands: Vec<_> = params.iter().filter_map(|param| match param.kind { - GenericParamKind::Lifetime { in_band, .. } => Some((in_band, param.span)), + let lifetime_params: Vec<_> = params.iter().filter_map(|param| match param.kind { + GenericParamKind::Lifetime { kind, .. } => Some((kind, param.span)), _ => None, }).collect(); - let out_of_band = in_bands.iter().find(|(in_band, _)| !in_band); - let in_band = in_bands.iter().find(|(in_band, _)| *in_band); + let explicit = lifetime_params.iter().find(|(kind, _)| *kind == LifetimeParamKind::Explicit); + let in_band = lifetime_params.iter().find(|(kind, _)| *kind == LifetimeParamKind::InBand); - if let (Some((_, out_of_band_span)), Some((_, in_band_span))) - = (out_of_band, in_band) { + if let (Some((_, explicit_span)), Some((_, in_band_span))) + = (explicit, in_band) { struct_span_err!( tcx.sess, *in_band_span, @@ -1104,7 +1104,7 @@ fn check_mixed_explicit_and_in_band_defs( ).span_label( *in_band_span, "in-band lifetime definition here", - ).span_label(*out_of_band_span, "explicit lifetime definition here") + ).span_label(*explicit_span, "explicit lifetime definition here") .emit(); } } diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 79d06cd7f125..3c209a432467 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -28,17 +28,16 @@ use util::common::ProfileQueriesMsg; use rustc_data_structures::base_n; use rustc_data_structures::sync::{self, Lrc, Lock, LockCell, OneThread, Once, RwLock}; -use syntax::ast::NodeId; use errors::{self, DiagnosticBuilder, DiagnosticId, Applicability}; use errors::emitter::{Emitter, EmitterWriter}; +use syntax::ast::{self, NodeId}; use syntax::edition::Edition; +use syntax::feature_gate::{self, AttributeType}; use syntax::json::JsonEmitter; -use syntax::feature_gate; -use syntax::parse; -use syntax::parse::ParseSess; -use syntax::{ast, source_map}; -use syntax::feature_gate::AttributeType; -use syntax_pos::{MultiSpan, Span, symbol::Symbol}; +use syntax::source_map; +use syntax::symbol::Symbol; +use syntax::parse::{self, ParseSess}; +use syntax_pos::{MultiSpan, Span}; use util::profiling::SelfProfiler; use rustc_target::spec::PanicStrategy; diff --git a/src/librustc/ty/item_path.rs b/src/librustc/ty/item_path.rs index 1b4ff18f6b8d..c8d104e6c321 100644 --- a/src/librustc/ty/item_path.rs +++ b/src/librustc/ty/item_path.rs @@ -13,14 +13,16 @@ use hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE}; use ty::{self, Ty, TyCtxt}; use middle::cstore::{ExternCrate, ExternCrateSource}; use syntax::ast; -use syntax::symbol::Symbol; -use syntax::symbol::LocalInternedString; +use syntax::symbol::{keywords, LocalInternedString, Symbol}; +use syntax_pos::edition::Edition; use std::cell::Cell; +use std::fmt::Debug; thread_local! { static FORCE_ABSOLUTE: Cell = Cell::new(false); static FORCE_IMPL_FILENAME_LINE: Cell = Cell::new(false); + static SHOULD_PREFIX_WITH_CRATE: Cell = Cell::new(false); } /// Enforces that item_path_str always returns an absolute path and @@ -51,6 +53,17 @@ pub fn with_forced_impl_filename_line R, R>(f: F) -> R { }) } +/// Add the `crate::` prefix to paths where appropriate. +pub fn with_crate_prefix R, R>(f: F) -> R { + SHOULD_PREFIX_WITH_CRATE.with(|flag| { + let old = flag.get(); + flag.set(true); + let result = f(); + flag.set(old); + result + }) +} + impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { /// Returns a string identifying this def-id. This string is /// suitable for user output. It is relative to the current crate @@ -64,7 +77,8 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { } }); let mut buffer = LocalPathBuffer::new(mode); - self.push_item_path(&mut buffer, def_id); + debug!("item_path_str: buffer={:?} def_id={:?}", buffer, def_id); + self.push_item_path(&mut buffer, def_id, false); buffer.into_string() } @@ -77,16 +91,26 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { /// suitable for user output. It always begins with a crate identifier. pub fn absolute_item_path_str(self, def_id: DefId) -> String { let mut buffer = LocalPathBuffer::new(RootMode::Absolute); - self.push_item_path(&mut buffer, def_id); + debug!("absolute_item_path_str: buffer={:?} def_id={:?}", buffer, def_id); + self.push_item_path(&mut buffer, def_id, false); buffer.into_string() } /// Returns the "path" to a particular crate. This can proceed in /// various ways, depending on the `root_mode` of the `buffer`. /// (See `RootMode` enum for more details.) - pub fn push_krate_path(self, buffer: &mut T, cnum: CrateNum) - where T: ItemPathBuffer + /// + /// `pushed_prelude_crate` argument should be `true` when the buffer + /// has had a prelude crate pushed to it. If this is the case, then + /// we do not want to prepend `crate::` (as that would not be a valid + /// path). + pub fn push_krate_path(self, buffer: &mut T, cnum: CrateNum, pushed_prelude_crate: bool) + where T: ItemPathBuffer + Debug { + debug!( + "push_krate_path: buffer={:?} cnum={:?} LOCAL_CRATE={:?}", + buffer, cnum, LOCAL_CRATE + ); match *buffer.root_mode() { RootMode::Local => { // In local mode, when we encounter a crate other than @@ -109,16 +133,29 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { .. }) = *opt_extern_crate { - self.push_item_path(buffer, def_id); + debug!("push_krate_path: def_id={:?}", def_id); + self.push_item_path(buffer, def_id, pushed_prelude_crate); } else { - buffer.push(&self.crate_name(cnum).as_str()); + let name = self.crate_name(cnum).as_str(); + debug!("push_krate_path: name={:?}", name); + buffer.push(&name); } + } else if self.sess.edition() == Edition::Edition2018 && !pushed_prelude_crate { + SHOULD_PREFIX_WITH_CRATE.with(|flag| { + // We only add the `crate::` keyword where appropriate. In particular, + // when we've not previously pushed a prelude crate to this path. + if flag.get() { + buffer.push(&keywords::Crate.name().as_str()) + } + }) } } RootMode::Absolute => { // In absolute mode, just write the crate name // unconditionally. - buffer.push(&self.original_crate_name(cnum).as_str()); + let name = self.original_crate_name(cnum).as_str(); + debug!("push_krate_path: original_name={:?}", name); + buffer.push(&name); } } } @@ -126,13 +163,26 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { /// If possible, this pushes a global path resolving to `external_def_id` that is visible /// from at least one local module and returns true. If the crate defining `external_def_id` is /// declared with an `extern crate`, the path is guaranteed to use the `extern crate`. - pub fn try_push_visible_item_path(self, buffer: &mut T, external_def_id: DefId) -> bool - where T: ItemPathBuffer + pub fn try_push_visible_item_path( + self, + buffer: &mut T, + external_def_id: DefId, + pushed_prelude_crate: bool, + ) -> bool + where T: ItemPathBuffer + Debug { + debug!( + "try_push_visible_item_path: buffer={:?} external_def_id={:?}", + buffer, external_def_id + ); let visible_parent_map = self.visible_parent_map(LOCAL_CRATE); let (mut cur_def, mut cur_path) = (external_def_id, Vec::::new()); loop { + debug!( + "try_push_visible_item_path: cur_def={:?} cur_path={:?} CRATE_DEF_INDEX={:?}", + cur_def, cur_path, CRATE_DEF_INDEX, + ); // If `cur_def` is a direct or injected extern crate, push the path to the crate // followed by the path to the item within the crate and return. if cur_def.index == CRATE_DEF_INDEX { @@ -142,7 +192,8 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { direct: true, .. }) => { - self.push_item_path(buffer, def_id); + debug!("try_push_visible_item_path: def_id={:?}", def_id); + self.push_item_path(buffer, def_id, pushed_prelude_crate); cur_path.iter().rev().for_each(|segment| buffer.push(&segment)); return true; } @@ -156,6 +207,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { } let mut cur_def_key = self.def_key(cur_def); + debug!("try_push_visible_item_path: cur_def_key={:?}", cur_def_key); // For a UnitStruct or TupleStruct we want the name of its parent rather than . if let DefPathData::StructCtor = cur_def_key.disambiguated_data.data { @@ -175,6 +227,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { Symbol::intern("").as_str() } }); + debug!("try_push_visible_item_path: symbol={:?}", symbol); cur_path.push(symbol); match visible_parent_map.get(&cur_def) { @@ -184,24 +237,29 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { } } - pub fn push_item_path(self, buffer: &mut T, def_id: DefId) - where T: ItemPathBuffer + pub fn push_item_path(self, buffer: &mut T, def_id: DefId, pushed_prelude_crate: bool) + where T: ItemPathBuffer + Debug { + debug!( + "push_item_path: buffer={:?} def_id={:?} pushed_prelude_crate={:?}", + buffer, def_id, pushed_prelude_crate + ); match *buffer.root_mode() { RootMode::Local if !def_id.is_local() => - if self.try_push_visible_item_path(buffer, def_id) { return }, + if self.try_push_visible_item_path(buffer, def_id, pushed_prelude_crate) { return }, _ => {} } let key = self.def_key(def_id); + debug!("push_item_path: key={:?}", key); match key.disambiguated_data.data { DefPathData::CrateRoot => { assert!(key.parent.is_none()); - self.push_krate_path(buffer, def_id.krate); + self.push_krate_path(buffer, def_id.krate, pushed_prelude_crate); } DefPathData::Impl => { - self.push_impl_path(buffer, def_id); + self.push_impl_path(buffer, def_id, pushed_prelude_crate); } // Unclear if there is any value in distinguishing these. @@ -224,22 +282,40 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { data @ DefPathData::ClosureExpr | data @ DefPathData::ImplTrait | data @ DefPathData::GlobalMetaData(..) => { - let parent_def_id = self.parent_def_id(def_id).unwrap(); - self.push_item_path(buffer, parent_def_id); + let parent_did = self.parent_def_id(def_id).unwrap(); + + // Keep track of whether we are one recursion away from the `CrateRoot` and + // pushing the name of a prelude crate. If we are, we'll want to know this when + // printing the `CrateRoot` so we don't prepend a `crate::` to paths. + let mut is_prelude_crate = false; + if let DefPathData::CrateRoot = self.def_key(parent_did).disambiguated_data.data { + if self.sess.extern_prelude.contains(&data.as_interned_str().as_symbol()) { + is_prelude_crate = true; + } + } + + self.push_item_path( + buffer, parent_did, pushed_prelude_crate || is_prelude_crate + ); buffer.push(&data.as_interned_str().as_symbol().as_str()); - } + }, + DefPathData::StructCtor => { // present `X` instead of `X::{{constructor}}` let parent_def_id = self.parent_def_id(def_id).unwrap(); - self.push_item_path(buffer, parent_def_id); + self.push_item_path(buffer, parent_def_id, pushed_prelude_crate); } } } - fn push_impl_path(self, - buffer: &mut T, - impl_def_id: DefId) - where T: ItemPathBuffer + fn push_impl_path( + self, + buffer: &mut T, + impl_def_id: DefId, + pushed_prelude_crate: bool, + ) + where T: ItemPathBuffer + Debug { + debug!("push_impl_path: buffer={:?} impl_def_id={:?}", buffer, impl_def_id); let parent_def_id = self.parent_def_id(impl_def_id).unwrap(); // Always use types for non-local impls, where types are always @@ -251,7 +327,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { }; if !use_types { - return self.push_impl_path_fallback(buffer, impl_def_id); + return self.push_impl_path_fallback(buffer, impl_def_id, pushed_prelude_crate); } // Decide whether to print the parent path for the impl. @@ -275,7 +351,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { // If the impl is not co-located with either self-type or // trait-type, then fallback to a format that identifies // the module more clearly. - self.push_item_path(buffer, parent_def_id); + self.push_item_path(buffer, parent_def_id, pushed_prelude_crate); if let Some(trait_ref) = impl_trait_ref { buffer.push(&format!("", trait_ref, self_ty)); } else { @@ -301,13 +377,13 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { match self_ty.sty { ty::Adt(adt_def, substs) => { if substs.types().next().is_none() { // ignore regions - self.push_item_path(buffer, adt_def.did); + self.push_item_path(buffer, adt_def.did, pushed_prelude_crate); } else { buffer.push(&format!("<{}>", self_ty)); } } - ty::Foreign(did) => self.push_item_path(buffer, did), + ty::Foreign(did) => self.push_item_path(buffer, did, pushed_prelude_crate), ty::Bool | ty::Char | @@ -324,16 +400,19 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { } } - fn push_impl_path_fallback(self, - buffer: &mut T, - impl_def_id: DefId) - where T: ItemPathBuffer + fn push_impl_path_fallback( + self, + buffer: &mut T, + impl_def_id: DefId, + pushed_prelude_crate: bool, + ) + where T: ItemPathBuffer + Debug { // If no type info is available, fall back to // pretty printing some span information. This should // only occur very early in the compiler pipeline. let parent_def_id = self.parent_def_id(impl_def_id).unwrap(); - self.push_item_path(buffer, parent_def_id); + self.push_item_path(buffer, parent_def_id, pushed_prelude_crate); let node_id = self.hir.as_local_node_id(impl_def_id).unwrap(); let item = self.hir.expect_item(node_id); let span_str = self.sess.source_map().span_to_string(item.span); diff --git a/src/librustc_codegen_utils/symbol_names.rs b/src/librustc_codegen_utils/symbol_names.rs index 39b88b225edc..c1e80234a775 100644 --- a/src/librustc_codegen_utils/symbol_names.rs +++ b/src/librustc_codegen_utils/symbol_names.rs @@ -228,7 +228,7 @@ fn get_symbol_hash<'a, 'tcx>( fn def_symbol_name<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> ty::SymbolName { let mut buffer = SymbolPathBuffer::new(); item_path::with_forced_absolute_paths(|| { - tcx.push_item_path(&mut buffer, def_id); + tcx.push_item_path(&mut buffer, def_id, false); }); buffer.into_interned() } @@ -338,6 +338,7 @@ fn compute_symbol_name<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, instance: Instance // // To be able to work on all platforms and get *some* reasonable output, we // use C++ name-mangling. +#[derive(Debug)] struct SymbolPathBuffer { result: String, temp_buf: String, diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index b97f5868079c..4405c0aef902 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -32,7 +32,7 @@ #![recursion_limit="256"] extern crate arena; -extern crate getopts; +pub extern crate getopts; extern crate graphviz; extern crate env_logger; #[cfg(unix)] diff --git a/src/librustc_mir/hair/pattern/check_match.rs b/src/librustc_mir/hair/pattern/check_match.rs index 6187e091319e..f2ae5774da87 100644 --- a/src/librustc_mir/hair/pattern/check_match.rs +++ b/src/librustc_mir/hair/pattern/check_match.rs @@ -35,7 +35,7 @@ use std::slice; use syntax::ast; use syntax::ptr::P; -use syntax_pos::{Span, DUMMY_SP}; +use syntax_pos::{Span, DUMMY_SP, MultiSpan}; struct OuterVisitor<'a, 'tcx: 'a> { tcx: TyCtxt<'a, 'tcx, 'tcx> } @@ -527,8 +527,8 @@ fn check_legality_of_move_bindings(cx: &MatchVisitor, } }) } - - let check_move = |p: &Pat, sub: Option<&Pat>| { + let span_vec = &mut Vec::new(); + let check_move = |p: &Pat, sub: Option<&Pat>, span_vec: &mut Vec| { // check legality of moving out of the enum // x @ Foo(..) is legal, but x @ Foo(y) isn't. @@ -546,16 +546,8 @@ fn check_legality_of_move_bindings(cx: &MatchVisitor, crate attributes to enable"); } err.emit(); - } else if let Some(by_ref_span) = by_ref_span { - struct_span_err!( - cx.tcx.sess, - p.span, - E0009, - "cannot bind by-move and by-ref in the same pattern", - ) - .span_label(p.span, "by-move pattern here") - .span_label(by_ref_span, "both by-ref and by-move used") - .emit(); + } else if let Some(_by_ref_span) = by_ref_span { + span_vec.push(p.span); } }; @@ -567,7 +559,7 @@ fn check_legality_of_move_bindings(cx: &MatchVisitor, ty::BindByValue(..) => { let pat_ty = cx.tables.node_id_to_type(p.hir_id); if pat_ty.moves_by_default(cx.tcx, cx.param_env, pat.span) { - check_move(p, sub.as_ref().map(|p| &**p)); + check_move(p, sub.as_ref().map(|p| &**p), span_vec); } } _ => {} @@ -579,6 +571,20 @@ fn check_legality_of_move_bindings(cx: &MatchVisitor, true }); } + if !span_vec.is_empty(){ + let span = MultiSpan::from_spans(span_vec.clone()); + let mut err = struct_span_err!( + cx.tcx.sess, + span, + E0009, + "cannot bind by-move and by-ref in the same pattern", + ); + err.span_label(by_ref_span.unwrap(), "both by-ref and by-move used"); + for span in span_vec.iter(){ + err.span_label(*span, "by-move pattern here"); + } + err.emit(); + } } /// Ensures that a pattern guard doesn't borrow by mutable reference or diff --git a/src/librustc_mir/transform/qualify_consts.rs b/src/librustc_mir/transform/qualify_consts.rs index a6e2cad50940..2811848424b4 100644 --- a/src/librustc_mir/transform/qualify_consts.rs +++ b/src/librustc_mir/transform/qualify_consts.rs @@ -750,7 +750,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Qualifier<'a, 'tcx, 'tcx> { } Rvalue::BinaryOp(op, ref lhs, _) => { - if let ty::RawPtr(_) = lhs.ty(self.mir, self.tcx).sty { + if let ty::RawPtr(_) | ty::FnPtr(..) = lhs.ty(self.mir, self.tcx).sty { assert!(op == BinOp::Eq || op == BinOp::Ne || op == BinOp::Le || op == BinOp::Lt || op == BinOp::Ge || op == BinOp::Gt || diff --git a/src/librustc_passes/rvalue_promotion.rs b/src/librustc_passes/rvalue_promotion.rs index 828800465209..efe59e4face5 100644 --- a/src/librustc_passes/rvalue_promotion.rs +++ b/src/librustc_passes/rvalue_promotion.rs @@ -348,7 +348,7 @@ fn check_expr_kind<'a, 'tcx>( return NotPromotable; } match v.tables.node_id_to_type(lhs.hir_id).sty { - ty::RawPtr(_) => { + ty::RawPtr(_) | ty::FnPtr(..) => { assert!(op.node == hir::BinOpKind::Eq || op.node == hir::BinOpKind::Ne || op.node == hir::BinOpKind::Le || op.node == hir::BinOpKind::Lt || op.node == hir::BinOpKind::Ge || op.node == hir::BinOpKind::Gt); diff --git a/src/librustc_typeck/check/method/suggest.rs b/src/librustc_typeck/check/method/suggest.rs index f5d332521ff0..28b9dcb9bfdd 100644 --- a/src/librustc_typeck/check/method/suggest.rs +++ b/src/librustc_typeck/check/method/suggest.rs @@ -16,6 +16,7 @@ use rustc::hir::map as hir_map; use hir::Node; use rustc_data_structures::sync::Lrc; use rustc::ty::{self, Ty, TyCtxt, ToPolyTraitRef, ToPredicate, TypeFoldable}; +use rustc::ty::item_path::with_crate_prefix; use hir::def::Def; use hir::def_id::{CRATE_DEF_INDEX, DefId}; use middle::lang_items::FnOnceTraitLangItem; @@ -515,7 +516,11 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { } else { "\n" }; - format!("use {};\n{}", self.tcx.item_path_str(*did), additional_newline) + format!( + "use {};\n{}", + with_crate_prefix(|| self.tcx.item_path_str(*did)), + additional_newline + ) }).collect(); err.span_suggestions_with_applicability( @@ -528,12 +533,20 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { let limit = if candidates.len() == 5 { 5 } else { 4 }; for (i, trait_did) in candidates.iter().take(limit).enumerate() { if candidates.len() > 1 { - msg.push_str(&format!("\ncandidate #{}: `use {};`", - i + 1, - self.tcx.item_path_str(*trait_did))); + msg.push_str( + &format!( + "\ncandidate #{}: `use {};`", + i + 1, + with_crate_prefix(|| self.tcx.item_path_str(*trait_did)) + ) + ); } else { - msg.push_str(&format!("\n`use {};`", - self.tcx.item_path_str(*trait_did))); + msg.push_str( + &format!( + "\n`use {};`", + with_crate_prefix(|| self.tcx.item_path_str(*trait_did)) + ) + ); } } if candidates.len() > limit { diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index a91f2fd7474f..371b631723a3 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -3990,6 +3990,7 @@ pub fn path_to_def(tcx: &TyCtxt, path: &[&str]) -> Option { pub fn get_path_for_type(tcx: TyCtxt, def_id: DefId, def_ctor: F) -> hir::Path where F: Fn(DefId) -> Def { + #[derive(Debug)] struct AbsolutePathBuffer { names: Vec, } @@ -4007,7 +4008,7 @@ where F: Fn(DefId) -> Def { let mut apb = AbsolutePathBuffer { names: vec![] }; - tcx.push_item_path(&mut apb, def_id); + tcx.push_item_path(&mut apb, def_id, false); hir::Path { span: DUMMY_SP, diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 63dd12f782fd..dfec13cd2ec0 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -1040,7 +1040,8 @@ impl CStr { /// ``` #[inline] #[stable(feature = "cstr_from_bytes", since = "1.10.0")] - pub unsafe fn from_bytes_with_nul_unchecked(bytes: &[u8]) -> &CStr { + #[rustc_const_unstable(feature = "const_cstr_unchecked")] + pub const unsafe fn from_bytes_with_nul_unchecked(bytes: &[u8]) -> &CStr { &*(bytes as *const [u8] as *const CStr) } @@ -1471,4 +1472,13 @@ mod tests { assert_eq!(&*rc2, cstr); assert_eq!(&*arc2, cstr); } + + #[test] + fn cstr_const_constructor() { + const CSTR: &'static CStr = unsafe { + CStr::from_bytes_with_nul_unchecked(b"Hello, world!\0") + }; + + assert_eq!(CSTR.to_str().unwrap(), "Hello, world!"); + } } diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 7ae4f2de4c36..afe0b67e3302 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -253,6 +253,8 @@ #![feature(min_const_fn)] #![feature(const_int_ops)] #![feature(const_ip)] +#![feature(const_raw_ptr_deref)] +#![feature(const_cstr_unchecked)] #![feature(core_intrinsics)] #![feature(dropck_eyepatch)] #![feature(exact_size_is_empty)] diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index bbadfa01221b..adbe2f9d4393 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -441,10 +441,10 @@ declare_features! ( // Allows macro invocations on modules expressions and statements and // procedural macros to expand to non-items. - (active, proc_macro_mod, "1.27.0", Some(38356), None), - (active, proc_macro_expr, "1.27.0", Some(38356), None), - (active, proc_macro_non_items, "1.27.0", Some(38356), None), - (active, proc_macro_gen, "1.27.0", Some(38356), None), + (active, proc_macro_mod, "1.27.0", Some(54727), None), + (active, proc_macro_expr, "1.27.0", Some(54727), None), + (active, proc_macro_non_items, "1.27.0", Some(54727), None), + (active, proc_macro_gen, "1.27.0", Some(54727), None), // #[doc(alias = "...")] (active, doc_alias, "1.27.0", Some(50146), None), @@ -502,7 +502,7 @@ declare_features! ( (active, custom_test_frameworks, "1.30.0", Some(50297), None), // Non-builtin attributes in inner attribute position - (active, custom_inner_attributes, "1.30.0", Some(38356), None), + (active, custom_inner_attributes, "1.30.0", Some(54726), None), // Self struct constructor (RFC 2302) (active, self_struct_ctor, "1.30.0", Some(51994), None), diff --git a/src/test/run-pass/issues/issue-54696.rs b/src/test/run-pass/issues/issue-54696.rs new file mode 100644 index 000000000000..d8408ed85491 --- /dev/null +++ b/src/test/run-pass/issues/issue-54696.rs @@ -0,0 +1,8 @@ +// run-pass + +fn main() { + // We shouldn't promote this + &(main as fn() == main as fn()); + // Also check nested case + &(&(main as fn()) == &(main as fn())); +} diff --git a/src/test/ui-fulldeps/proc-macro/auxiliary/multispan.rs b/src/test/ui-fulldeps/proc-macro/auxiliary/multispan.rs index cecd9ef4d994..383016f990eb 100644 --- a/src/test/ui-fulldeps/proc-macro/auxiliary/multispan.rs +++ b/src/test/ui-fulldeps/proc-macro/auxiliary/multispan.rs @@ -11,7 +11,7 @@ // no-prefer-dynamic #![crate_type = "proc-macro"] -#![feature(proc_macro_diagnostic, proc_macro_span)] +#![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)] extern crate proc_macro; diff --git a/src/test/ui-fulldeps/proc-macro/auxiliary/three-equals.rs b/src/test/ui-fulldeps/proc-macro/auxiliary/three-equals.rs index 70151278947d..569a458f55a4 100644 --- a/src/test/ui-fulldeps/proc-macro/auxiliary/three-equals.rs +++ b/src/test/ui-fulldeps/proc-macro/auxiliary/three-equals.rs @@ -11,7 +11,7 @@ // no-prefer-dynamic #![crate_type = "proc-macro"] -#![feature(proc_macro_diagnostic, proc_macro_span)] +#![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)] extern crate proc_macro; diff --git a/src/test/ui/coherence/coherence-impls-copy.stderr b/src/test/ui/coherence/coherence-impls-copy.stderr index 24e7e85b1a96..613ee0a269e7 100644 --- a/src/test/ui/coherence/coherence-impls-copy.stderr +++ b/src/test/ui/coherence/coherence-impls-copy.stderr @@ -14,7 +14,7 @@ LL | impl Copy for &'static NotSync {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl<'a, T> std::marker::Copy for &'a T + - impl<'_, T> std::marker::Copy for &T where T: ?Sized; error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`: @@ -24,7 +24,7 @@ LL | impl Copy for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl<'a, T> std::marker::Copy for &'a T + - impl<'_, T> std::marker::Copy for &T where T: ?Sized; error[E0206]: the trait `Copy` may not be implemented for this type diff --git a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr index bc8a99f55483..f31d962852e4 100644 --- a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr +++ b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr @@ -14,7 +14,7 @@ error[E0716]: temporary value dropped while borrowed | LL | let y: &'static usize = &(&1 as *const i32 as usize + 1); //~ ERROR does not live long enough | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use -LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough +... LL | } | - temporary value is freed at the end of this statement | @@ -25,11 +25,22 @@ error[E0716]: temporary value dropped while borrowed | LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use +LL | let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough +LL | } + | - temporary value is freed at the end of this statement + | + = note: borrowed value must be valid for the static lifetime... + +error[E0716]: temporary value dropped while borrowed + --> $DIR/promoted_raw_ptr_ops.rs:18:29 + | +LL | let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use LL | } | - temporary value is freed at the end of this statement | = note: borrowed value must be valid for the static lifetime... -error: aborting due to 3 previous errors +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.rs b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.rs index 3b437f69d8d6..c915886ca259 100644 --- a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.rs +++ b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.rs @@ -15,4 +15,5 @@ fn main() { //~^ ERROR does not live long enough let y: &'static usize = &(&1 as *const i32 as usize + 1); //~ ERROR does not live long enough let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough + let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough } diff --git a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.stderr b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.stderr index 90c73c095fba..baf12c5ac591 100644 --- a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.stderr +++ b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.stderr @@ -14,7 +14,7 @@ error[E0597]: borrowed value does not live long enough | LL | let y: &'static usize = &(&1 as *const i32 as usize + 1); //~ ERROR does not live long enough | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough +... LL | } | - temporary value only lives until here | @@ -25,11 +25,22 @@ error[E0597]: borrowed value does not live long enough | LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough +LL | let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough +LL | } + | - temporary value only lives until here + | + = note: borrowed value must be valid for the static lifetime... + +error[E0597]: borrowed value does not live long enough + --> $DIR/promoted_raw_ptr_ops.rs:18:29 + | +LL | let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here | = note: borrowed value must be valid for the static lifetime... -error: aborting due to 3 previous errors +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/e0119/issue-28981.stderr b/src/test/ui/e0119/issue-28981.stderr index afcbab4a5c6c..4886ad771757 100644 --- a/src/test/ui/e0119/issue-28981.stderr +++ b/src/test/ui/e0119/issue-28981.stderr @@ -5,7 +5,7 @@ LL | impl Deref for Foo { } //~ ERROR must be used | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl<'a, T> std::ops::Deref for &'a T + - impl<'_, T> std::ops::Deref for &T where T: ?Sized; error[E0210]: type parameter `Foo` must be used as the type parameter for some local type (e.g. `MyStruct`) diff --git a/src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs b/src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs new file mode 100644 index 000000000000..56dd6691abbe --- /dev/null +++ b/src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs @@ -0,0 +1,25 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// run-pass + +#![allow(warnings)] + +#![feature(impl_header_lifetime_elision)] + +// This works for functions... +fn foo<'a>(x: &str, y: &'a str) {} + +// ...so this should work for impls +impl<'a> Foo<&str> for &'a str {} +trait Foo {} + +fn main() { +} diff --git a/src/test/ui/issue-53840.rs b/src/test/ui/issue-53840.rs new file mode 100644 index 000000000000..ece3caf78e21 --- /dev/null +++ b/src/test/ui/issue-53840.rs @@ -0,0 +1,27 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. +enum E { + Foo(String, String, String), +} + +struct Bar { + a: String, + b: String, +} + +fn main() { + let bar = Bar { a: "1".to_string(), b: "2".to_string() }; + match E::Foo("".into(), "".into(), "".into()) { + E::Foo(a, b, ref c) => {} + } + match bar { + Bar {a, ref b} => {} + } +} diff --git a/src/test/ui/issue-53840.stderr b/src/test/ui/issue-53840.stderr new file mode 100644 index 000000000000..961e4c0ff628 --- /dev/null +++ b/src/test/ui/issue-53840.stderr @@ -0,0 +1,20 @@ +error[E0009]: cannot bind by-move and by-ref in the same pattern + --> $DIR/issue-53840.rs:22:16 + | +LL | E::Foo(a, b, ref c) => {} + | ^ ^ ----- both by-ref and by-move used + | | | + | | by-move pattern here + | by-move pattern here + +error[E0009]: cannot bind by-move and by-ref in the same pattern + --> $DIR/issue-53840.rs:25:14 + | +LL | Bar {a, ref b} => {} + | ^ ----- both by-ref and by-move used + | | + | by-move pattern here + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0009`. diff --git a/src/test/run-pass/issues/issue-10396.rs b/src/test/ui/issues/issue-10396.rs similarity index 97% rename from src/test/run-pass/issues/issue-10396.rs rename to src/test/ui/issues/issue-10396.rs index 5b7bfe1a02ec..4b4571f99db8 100644 --- a/src/test/run-pass/issues/issue-10396.rs +++ b/src/test/ui/issues/issue-10396.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #[derive(Debug)] enum Foo<'s> { diff --git a/src/test/run-pass/issues/issue-10456.rs b/src/test/ui/issues/issue-10456.rs similarity index 98% rename from src/test/run-pass/issues/issue-10456.rs rename to src/test/ui/issues/issue-10456.rs index 66b813f82a4b..ed8c5e965706 100644 --- a/src/test/run-pass/issues/issue-10456.rs +++ b/src/test/ui/issues/issue-10456.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 pub struct Foo; diff --git a/src/test/run-pass/issues/issue-10763.rs b/src/test/ui/issues/issue-10763.rs similarity index 97% rename from src/test/run-pass/issues/issue-10763.rs rename to src/test/ui/issues/issue-10763.rs index 705cc3fad132..08653b1c6969 100644 --- a/src/test/run-pass/issues/issue-10763.rs +++ b/src/test/ui/issues/issue-10763.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-10853.rs b/src/test/ui/issues/issue-10853.rs similarity index 97% rename from src/test/run-pass/issues/issue-10853.rs rename to src/test/ui/issues/issue-10853.rs index 4a67d256f5de..6e2aea4d1ab4 100644 --- a/src/test/run-pass/issues/issue-10853.rs +++ b/src/test/ui/issues/issue-10853.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 #![deny(missing_docs)] diff --git a/src/test/run-pass/issues/issue-10902.rs b/src/test/ui/issues/issue-10902.rs similarity index 98% rename from src/test/run-pass/issues/issue-10902.rs rename to src/test/ui/issues/issue-10902.rs index df9dc0b63d9c..24bf90b2d9d9 100644 --- a/src/test/run-pass/issues/issue-10902.rs +++ b/src/test/ui/issues/issue-10902.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-11384.rs b/src/test/ui/issues/issue-11384.rs similarity index 97% rename from src/test/run-pass/issues/issue-11384.rs rename to src/test/ui/issues/issue-11384.rs index 5f11bf2841ec..af4e7fc389ed 100644 --- a/src/test/run-pass/issues/issue-11384.rs +++ b/src/test/ui/issues/issue-11384.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 trait Common { fn dummy(&self) { } } diff --git a/src/test/run-pass/issues/issue-11592.rs b/src/test/ui/issues/issue-11592.rs similarity index 97% rename from src/test/run-pass/issues/issue-11592.rs rename to src/test/ui/issues/issue-11592.rs index 1157f9b7e76b..11c6fecd78d4 100644 --- a/src/test/run-pass/issues/issue-11592.rs +++ b/src/test/ui/issues/issue-11592.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass //! Ensure the private trait Bar isn't complained about. #![deny(missing_docs)] diff --git a/src/test/run-pass/issues/issue-11612.rs b/src/test/ui/issues/issue-11612.rs similarity index 98% rename from src/test/run-pass/issues/issue-11612.rs rename to src/test/ui/issues/issue-11612.rs index ba17a02dd387..293dd6dfaaa5 100644 --- a/src/test/run-pass/issues/issue-11612.rs +++ b/src/test/ui/issues/issue-11612.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // #11612 // We weren't updating the auto adjustments with all the resolved diff --git a/src/test/run-pass/issues/issue-11869.rs b/src/test/ui/issues/issue-11869.rs similarity index 97% rename from src/test/run-pass/issues/issue-11869.rs rename to src/test/ui/issues/issue-11869.rs index b3543f726daa..102b79ac2038 100644 --- a/src/test/run-pass/issues/issue-11869.rs +++ b/src/test/ui/issues/issue-11869.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-1251.rs b/src/test/ui/issues/issue-1251.rs similarity index 97% rename from src/test/run-pass/issues/issue-1251.rs rename to src/test/ui/issues/issue-1251.rs index f9d48b8c835a..b42404ce7739 100644 --- a/src/test/run-pass/issues/issue-1251.rs +++ b/src/test/ui/issues/issue-1251.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_attributes)] #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-12729.rs b/src/test/ui/issues/issue-12729.rs similarity index 97% rename from src/test/run-pass/issues/issue-12729.rs rename to src/test/ui/issues/issue-12729.rs index efcc05cc1964..2447bceeea6f 100644 --- a/src/test/run-pass/issues/issue-12729.rs +++ b/src/test/ui/issues/issue-12729.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-13105.rs b/src/test/ui/issues/issue-13105.rs similarity index 97% rename from src/test/run-pass/issues/issue-13105.rs rename to src/test/ui/issues/issue-13105.rs index 906f8ca5e7d3..78e0caca0baf 100644 --- a/src/test/run-pass/issues/issue-13105.rs +++ b/src/test/ui/issues/issue-13105.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 trait Foo { diff --git a/src/test/run-pass/issues/issue-13167.rs b/src/test/ui/issues/issue-13167.rs similarity index 98% rename from src/test/run-pass/issues/issue-13167.rs rename to src/test/ui/issues/issue-13167.rs index ac0645cd403a..e44ac88566c4 100644 --- a/src/test/run-pass/issues/issue-13167.rs +++ b/src/test/ui/issues/issue-13167.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 use std::slice; diff --git a/src/test/run-pass/issues/issue-13214.rs b/src/test/ui/issues/issue-13214.rs similarity index 98% rename from src/test/run-pass/issues/issue-13214.rs rename to src/test/ui/issues/issue-13214.rs index 1c119bb634df..b22942652c45 100644 --- a/src/test/run-pass/issues/issue-13214.rs +++ b/src/test/ui/issues/issue-13214.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // defining static with struct that contains enum // with &'static str variant used to cause ICE diff --git a/src/test/run-pass/issues/issue-13405.rs b/src/test/ui/issues/issue-13405.rs similarity index 97% rename from src/test/run-pass/issues/issue-13405.rs rename to src/test/ui/issues/issue-13405.rs index a8ca38838d19..ed35d3edccfc 100644 --- a/src/test/run-pass/issues/issue-13405.rs +++ b/src/test/ui/issues/issue-13405.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(unused_variables)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-13703.rs b/src/test/ui/issues/issue-13703.rs similarity index 97% rename from src/test/run-pass/issues/issue-13703.rs rename to src/test/ui/issues/issue-13703.rs index d0f8be64ef39..e954f94b664a 100644 --- a/src/test/run-pass/issues/issue-13703.rs +++ b/src/test/ui/issues/issue-13703.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 pub struct Foo<'a, 'b: 'a> { foo: &'a &'b isize } diff --git a/src/test/run-pass/issues/issue-13775.rs b/src/test/ui/issues/issue-13775.rs similarity index 97% rename from src/test/run-pass/issues/issue-13775.rs rename to src/test/ui/issues/issue-13775.rs index ae4992299177..27fcbf789418 100644 --- a/src/test/run-pass/issues/issue-13775.rs +++ b/src/test/ui/issues/issue-13775.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 trait Foo { diff --git a/src/test/run-pass/issues/issue-13837.rs b/src/test/ui/issues/issue-13837.rs similarity index 97% rename from src/test/run-pass/issues/issue-13837.rs rename to src/test/ui/issues/issue-13837.rs index 98a86748851a..1e67964093bd 100644 --- a/src/test/run-pass/issues/issue-13837.rs +++ b/src/test/ui/issues/issue-13837.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-14082.rs b/src/test/ui/issues/issue-14082.rs similarity index 97% rename from src/test/run-pass/issues/issue-14082.rs rename to src/test/ui/issues/issue-14082.rs index 01d3c9534f2f..5a1452fe3574 100644 --- a/src/test/run-pass/issues/issue-14082.rs +++ b/src/test/ui/issues/issue-14082.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 #![allow(unused_imports, dead_code)] diff --git a/src/test/run-pass/issues/issue-14254.rs b/src/test/ui/issues/issue-14254.rs similarity index 99% rename from src/test/run-pass/issues/issue-14254.rs rename to src/test/ui/issues/issue-14254.rs index 4e03535f6133..033b7341db1e 100644 --- a/src/test/run-pass/issues/issue-14254.rs +++ b/src/test/ui/issues/issue-14254.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 trait Foo: Sized { diff --git a/src/test/run-pass/issues/issue-14330.rs b/src/test/ui/issues/issue-14330.rs similarity index 97% rename from src/test/run-pass/issues/issue-14330.rs rename to src/test/ui/issues/issue-14330.rs index fe54c1cf05c8..edba1a3bd8fb 100644 --- a/src/test/run-pass/issues/issue-14330.rs +++ b/src/test/ui/issues/issue-14330.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_imports)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-14837.rs b/src/test/ui/issues/issue-14837.rs similarity index 97% rename from src/test/run-pass/issues/issue-14837.rs rename to src/test/ui/issues/issue-14837.rs index 9945c6e4407a..0c6617e0ab7b 100644 --- a/src/test/run-pass/issues/issue-14837.rs +++ b/src/test/ui/issues/issue-14837.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 #[deny(dead_code)] diff --git a/src/test/run-pass/issues/issue-14901.rs b/src/test/ui/issues/issue-14901.rs similarity index 97% rename from src/test/run-pass/issues/issue-14901.rs rename to src/test/ui/issues/issue-14901.rs index 7612c5bc8557..18a6cfde3bdf 100644 --- a/src/test/run-pass/issues/issue-14901.rs +++ b/src/test/ui/issues/issue-14901.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass pub trait Reader {} enum Wrapper<'a> { diff --git a/src/test/run-pass/issues/issue-14933.rs b/src/test/ui/issues/issue-14933.rs similarity index 97% rename from src/test/run-pass/issues/issue-14933.rs rename to src/test/ui/issues/issue-14933.rs index 30365bb3e4f4..54a2ca8c9eda 100644 --- a/src/test/run-pass/issues/issue-14933.rs +++ b/src/test/ui/issues/issue-14933.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 pub type BigRat = T; diff --git a/src/test/run-pass/issues/issue-14936.rs b/src/test/ui/issues/issue-14936.rs similarity index 99% rename from src/test/run-pass/issues/issue-14936.rs rename to src/test/ui/issues/issue-14936.rs index 4249a83e3c22..d90814daf5f2 100644 --- a/src/test/run-pass/issues/issue-14936.rs +++ b/src/test/ui/issues/issue-14936.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_macros)] #![allow(dead_code)] #![feature(asm)] diff --git a/src/test/run-pass/issues/issue-14959.rs b/src/test/ui/issues/issue-14959.rs similarity index 99% rename from src/test/run-pass/issues/issue-14959.rs rename to src/test/ui/issues/issue-14959.rs index fc245fb42449..8b56b4240194 100644 --- a/src/test/run-pass/issues/issue-14959.rs +++ b/src/test/ui/issues/issue-14959.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 #![feature(fn_traits, unboxed_closures)] diff --git a/src/test/run-pass/issues/issue-15108.rs b/src/test/ui/issues/issue-15108.rs similarity index 96% rename from src/test/run-pass/issues/issue-15108.rs rename to src/test/ui/issues/issue-15108.rs index 7288ff23cb40..e650db05a6b2 100644 --- a/src/test/run-pass/issues/issue-15108.rs +++ b/src/test/ui/issues/issue-15108.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 fn main() {} diff --git a/src/test/run-pass/issues/issue-15261.rs b/src/test/ui/issues/issue-15261.rs similarity index 97% rename from src/test/run-pass/issues/issue-15261.rs rename to src/test/ui/issues/issue-15261.rs index 263f9b0bd4b2..f5f9978ed9b1 100644 --- a/src/test/run-pass/issues/issue-15261.rs +++ b/src/test/ui/issues/issue-15261.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/run-pass/issues/issue-15689-2.rs b/src/test/ui/issues/issue-15689-2.rs similarity index 97% rename from src/test/run-pass/issues/issue-15689-2.rs rename to src/test/ui/issues/issue-15689-2.rs index dedc66336e7b..30bde2aa8581 100644 --- a/src/test/run-pass/issues/issue-15689-2.rs +++ b/src/test/ui/issues/issue-15689-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-15735.rs b/src/test/ui/issues/issue-15735.rs similarity index 97% rename from src/test/run-pass/issues/issue-15735.rs rename to src/test/ui/issues/issue-15735.rs index 5ac47bd68bcf..fbe39b27efc3 100644 --- a/src/test/run-pass/issues/issue-15735.rs +++ b/src/test/ui/issues/issue-15735.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] struct A<'a> { a: &'a i32, diff --git a/src/test/run-pass/issues/issue-16596.rs b/src/test/ui/issues/issue-16596.rs similarity index 97% rename from src/test/run-pass/issues/issue-16596.rs rename to src/test/ui/issues/issue-16596.rs index d9583809a89f..01383c07806c 100644 --- a/src/test/run-pass/issues/issue-16596.rs +++ b/src/test/ui/issues/issue-16596.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] trait MatrixRow { fn dummy(&self) { }} diff --git a/src/test/run-pass/issues/issue-16668.rs b/src/test/ui/issues/issue-16668.rs similarity index 98% rename from src/test/run-pass/issues/issue-16668.rs rename to src/test/ui/issues/issue-16668.rs index fdb49c689843..d8af37621780 100644 --- a/src/test/run-pass/issues/issue-16668.rs +++ b/src/test/ui/issues/issue-16668.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] struct Parser<'a, I, O> { parse: Box Result + 'a> diff --git a/src/test/run-pass/issues/issue-17121.rs b/src/test/ui/issues/issue-17121.rs similarity index 98% rename from src/test/run-pass/issues/issue-17121.rs rename to src/test/ui/issues/issue-17121.rs index fafcdde2bbe3..f280d60e1ce3 100644 --- a/src/test/run-pass/issues/issue-17121.rs +++ b/src/test/ui/issues/issue-17121.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 // ignore-cloudabi no std::fs diff --git a/src/test/run-pass/issues/issue-17336.rs b/src/test/ui/issues/issue-17336.rs similarity index 97% rename from src/test/run-pass/issues/issue-17336.rs rename to src/test/ui/issues/issue-17336.rs index b1a77d73aa47..b1cbdb87bcd7 100644 --- a/src/test/run-pass/issues/issue-17336.rs +++ b/src/test/ui/issues/issue-17336.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_must_use)] #[allow(dead_code)] fn check(a: &str) { diff --git a/src/test/run-pass/issues/issue-17450.rs b/src/test/ui/issues/issue-17450.rs similarity index 97% rename from src/test/run-pass/issues/issue-17450.rs rename to src/test/ui/issues/issue-17450.rs index 67a44951ae03..f5af630cd184 100644 --- a/src/test/run-pass/issues/issue-17450.rs +++ b/src/test/ui/issues/issue-17450.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code, warnings)] static mut x: isize = 3; diff --git a/src/test/run-pass/issues/issue-17718-const-destructors.rs b/src/test/ui/issues/issue-17718-const-destructors.rs similarity index 97% rename from src/test/run-pass/issues/issue-17718-const-destructors.rs rename to src/test/ui/issues/issue-17718-const-destructors.rs index 16f9cea82fa1..da7a9f13ef2f 100644 --- a/src/test/run-pass/issues/issue-17718-const-destructors.rs +++ b/src/test/ui/issues/issue-17718-const-destructors.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] struct A; impl Drop for A { diff --git a/src/test/run-pass/issues/issue-17732.rs b/src/test/ui/issues/issue-17732.rs similarity index 97% rename from src/test/run-pass/issues/issue-17732.rs rename to src/test/ui/issues/issue-17732.rs index c0ab42b4264b..e5b4a2e3edd3 100644 --- a/src/test/run-pass/issues/issue-17732.rs +++ b/src/test/ui/issues/issue-17732.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-17746.rs b/src/test/ui/issues/issue-17746.rs similarity index 97% rename from src/test/run-pass/issues/issue-17746.rs rename to src/test/ui/issues/issue-17746.rs index 0cdefc290a86..18299c6acb39 100644 --- a/src/test/run-pass/issues/issue-17746.rs +++ b/src/test/ui/issues/issue-17746.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Regression test for #17746 diff --git a/src/test/run-pass/issues/issue-17904.rs b/src/test/ui/issues/issue-17904.rs similarity index 97% rename from src/test/run-pass/issues/issue-17904.rs rename to src/test/ui/issues/issue-17904.rs index 9b76c9fca2ae..8de0f6d2922c 100644 --- a/src/test/run-pass/issues/issue-17904.rs +++ b/src/test/ui/issues/issue-17904.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Test that we can parse where clauses on various forms of tuple // structs. diff --git a/src/test/run-pass/issues/issue-18083.rs b/src/test/ui/issues/issue-18083.rs similarity index 98% rename from src/test/run-pass/issues/issue-18083.rs rename to src/test/ui/issues/issue-18083.rs index 9118ad28493d..c370b3605f81 100644 --- a/src/test/run-pass/issues/issue-18083.rs +++ b/src/test/ui/issues/issue-18083.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(unused_imports)] // These crossed imports should resolve fine, and not block on diff --git a/src/test/run-pass/issues/issue-18088.rs b/src/test/ui/issues/issue-18088.rs similarity index 97% rename from src/test/run-pass/issues/issue-18088.rs rename to src/test/ui/issues/issue-18088.rs index cff5ba70128d..74014fde36ba 100644 --- a/src/test/run-pass/issues/issue-18088.rs +++ b/src/test/ui/issues/issue-18088.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass pub trait Indexable: std::ops::Index { fn index2(&self, i: usize) -> &T { diff --git a/src/test/run-pass/issues/issue-18188.rs b/src/test/ui/issues/issue-18188.rs similarity index 98% rename from src/test/run-pass/issues/issue-18188.rs rename to src/test/ui/issues/issue-18188.rs index 60d8edc9d590..b047ee4a4d6d 100644 --- a/src/test/run-pass/issues/issue-18188.rs +++ b/src/test/ui/issues/issue-18188.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 pub trait Promisable: Send + Sync {} diff --git a/src/test/run-pass/issues/issue-1821.rs b/src/test/ui/issues/issue-1821.rs similarity index 97% rename from src/test/run-pass/issues/issue-1821.rs rename to src/test/ui/issues/issue-1821.rs index d37b6df6e34a..8518547ac255 100644 --- a/src/test/run-pass/issues/issue-1821.rs +++ b/src/test/ui/issues/issue-1821.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/run-pass/issues/issue-18446.rs b/src/test/ui/issues/issue-18446-2.rs similarity index 97% rename from src/test/run-pass/issues/issue-18446.rs rename to src/test/ui/issues/issue-18446-2.rs index 09f3e451ad13..90cc9b4bc433 100644 --- a/src/test/run-pass/issues/issue-18446.rs +++ b/src/test/ui/issues/issue-18446-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Test that methods in trait impls should override default methods. diff --git a/src/test/run-pass/issues/issue-1866.rs b/src/test/ui/issues/issue-1866.rs similarity index 98% rename from src/test/run-pass/issues/issue-1866.rs rename to src/test/ui/issues/issue-1866.rs index f27d8032dd66..eb670b4a5828 100644 --- a/src/test/run-pass/issues/issue-1866.rs +++ b/src/test/ui/issues/issue-1866.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/run-pass/issues/issue-18738.rs b/src/test/ui/issues/issue-18738.rs similarity index 97% rename from src/test/run-pass/issues/issue-18738.rs rename to src/test/ui/issues/issue-18738.rs index 8ed663cbbd6f..defd8f97cbcb 100644 --- a/src/test/run-pass/issues/issue-18738.rs +++ b/src/test/ui/issues/issue-18738.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #[derive(Eq, PartialEq, PartialOrd, Ord)] enum Test<'a> { diff --git a/src/test/run-pass/issues/issue-18809.rs b/src/test/ui/issues/issue-18809.rs similarity index 97% rename from src/test/run-pass/issues/issue-18809.rs rename to src/test/ui/issues/issue-18809.rs index 1895b3bdfe45..f4ce51b677ad 100644 --- a/src/test/run-pass/issues/issue-18809.rs +++ b/src/test/ui/issues/issue-18809.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass trait Tup { type T0; type T1; diff --git a/src/test/run-pass/issues/issue-18906.rs b/src/test/ui/issues/issue-18906.rs similarity index 98% rename from src/test/run-pass/issues/issue-18906.rs rename to src/test/ui/issues/issue-18906.rs index 4f771752c865..15701a2a45ab 100644 --- a/src/test/run-pass/issues/issue-18906.rs +++ b/src/test/ui/issues/issue-18906.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-18988.rs b/src/test/ui/issues/issue-18988.rs similarity index 97% rename from src/test/run-pass/issues/issue-18988.rs rename to src/test/ui/issues/issue-18988.rs index 691d41174303..6aadef691387 100644 --- a/src/test/run-pass/issues/issue-18988.rs +++ b/src/test/ui/issues/issue-18988.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] pub trait Foo : Send { } diff --git a/src/test/run-pass/issues/issue-19037.rs b/src/test/ui/issues/issue-19037.rs similarity index 97% rename from src/test/run-pass/issues/issue-19037.rs rename to src/test/ui/issues/issue-19037.rs index 350c17415dac..59b7d40ae0d8 100644 --- a/src/test/run-pass/issues/issue-19037.rs +++ b/src/test/ui/issues/issue-19037.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-19081.rs b/src/test/ui/issues/issue-19081.rs similarity index 97% rename from src/test/run-pass/issues/issue-19081.rs rename to src/test/ui/issues/issue-19081.rs index 56ceaaf9884a..4188670f8f67 100644 --- a/src/test/run-pass/issues/issue-19081.rs +++ b/src/test/ui/issues/issue-19081.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass pub trait Hasher { type State; diff --git a/src/test/run-pass/issues/issue-19097.rs b/src/test/ui/issues/issue-19097.rs similarity index 97% rename from src/test/run-pass/issues/issue-19097.rs rename to src/test/ui/issues/issue-19097.rs index 1ad7f524be46..8198a40b0c1d 100644 --- a/src/test/run-pass/issues/issue-19097.rs +++ b/src/test/ui/issues/issue-19097.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // regression test for #19097 diff --git a/src/test/run-pass/issues/issue-19098.rs b/src/test/ui/issues/issue-19098.rs similarity index 97% rename from src/test/run-pass/issues/issue-19098.rs rename to src/test/ui/issues/issue-19098.rs index 5b114659ae9e..c985f7aad143 100644 --- a/src/test/run-pass/issues/issue-19098.rs +++ b/src/test/ui/issues/issue-19098.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass pub trait Handler { fn handle(&self, _: &mut String); } diff --git a/src/test/run-pass/issues/issue-19102.rs b/src/test/ui/issues/issue-19102.rs similarity index 97% rename from src/test/run-pass/issues/issue-19102.rs rename to src/test/ui/issues/issue-19102.rs index c26dca255b99..48b5fece1dfc 100644 --- a/src/test/run-pass/issues/issue-19102.rs +++ b/src/test/ui/issues/issue-19102.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_imports)] #![deny(unused_qualifications)] diff --git a/src/test/run-pass/issues/issue-19129-1.rs b/src/test/ui/issues/issue-19129-1.rs similarity index 97% rename from src/test/run-pass/issues/issue-19129-1.rs rename to src/test/ui/issues/issue-19129-1.rs index cdb23e627c97..97bd20be7d71 100644 --- a/src/test/run-pass/issues/issue-19129-1.rs +++ b/src/test/ui/issues/issue-19129-1.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 trait Trait { diff --git a/src/test/run-pass/issues/issue-19129-2.rs b/src/test/ui/issues/issue-19129-2.rs similarity index 97% rename from src/test/run-pass/issues/issue-19129-2.rs rename to src/test/ui/issues/issue-19129-2.rs index 8d43ece36802..9b1bc2b8ec45 100644 --- a/src/test/run-pass/issues/issue-19129-2.rs +++ b/src/test/ui/issues/issue-19129-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_variables)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-19398.rs b/src/test/ui/issues/issue-19398.rs similarity index 97% rename from src/test/run-pass/issues/issue-19398.rs rename to src/test/ui/issues/issue-19398.rs index dd2a796dba34..c8a7292b2430 100644 --- a/src/test/run-pass/issues/issue-19398.rs +++ b/src/test/ui/issues/issue-19398.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 trait T { diff --git a/src/test/run-pass/issues/issue-19404.rs b/src/test/ui/issues/issue-19404.rs similarity index 98% rename from src/test/run-pass/issues/issue-19404.rs rename to src/test/ui/issues/issue-19404.rs index 3f8aad4e0b14..f74b2eb1065b 100644 --- a/src/test/run-pass/issues/issue-19404.rs +++ b/src/test/ui/issues/issue-19404.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(unused_variables)] use std::any::TypeId; diff --git a/src/test/run-pass/issues/issue-19479.rs b/src/test/ui/issues/issue-19479.rs similarity index 97% rename from src/test/run-pass/issues/issue-19479.rs rename to src/test/ui/issues/issue-19479.rs index 6326dfd8fe05..fae040a092f6 100644 --- a/src/test/run-pass/issues/issue-19479.rs +++ b/src/test/ui/issues/issue-19479.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 trait Base { diff --git a/src/test/run-pass/issues/issue-19631.rs b/src/test/ui/issues/issue-19631.rs similarity index 97% rename from src/test/run-pass/issues/issue-19631.rs rename to src/test/ui/issues/issue-19631.rs index 604e3d608741..c46cb2c87df9 100644 --- a/src/test/run-pass/issues/issue-19631.rs +++ b/src/test/ui/issues/issue-19631.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-19632.rs b/src/test/ui/issues/issue-19632.rs similarity index 97% rename from src/test/run-pass/issues/issue-19632.rs rename to src/test/ui/issues/issue-19632.rs index 5784886e94c9..c641aee29409 100644 --- a/src/test/run-pass/issues/issue-19632.rs +++ b/src/test/ui/issues/issue-19632.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-19850.rs b/src/test/ui/issues/issue-19850.rs similarity index 98% rename from src/test/run-pass/issues/issue-19850.rs rename to src/test/ui/issues/issue-19850.rs index f5b1697528f0..179135baf257 100644 --- a/src/test/run-pass/issues/issue-19850.rs +++ b/src/test/ui/issues/issue-19850.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_variables)] // Test that `::Output` and `Self::Output` are accepted as type annotations in let // bindings diff --git a/src/test/run-pass/issues/issue-19982.rs b/src/test/ui/issues/issue-19982-2.rs similarity index 98% rename from src/test/run-pass/issues/issue-19982.rs rename to src/test/ui/issues/issue-19982-2.rs index 380cb3cac228..8c3462dcf45d 100644 --- a/src/test/run-pass/issues/issue-19982.rs +++ b/src/test/ui/issues/issue-19982-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 #![feature(fn_traits, unboxed_closures)] diff --git a/src/test/run-pass/issues/issue-20009.rs b/src/test/ui/issues/issue-20009.rs similarity index 97% rename from src/test/run-pass/issues/issue-20009.rs rename to src/test/ui/issues/issue-20009.rs index 604395b3dc7c..a08bd49f599d 100644 --- a/src/test/run-pass/issues/issue-20009.rs +++ b/src/test/ui/issues/issue-20009.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // Check that associated types are `Sized` // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-20091.rs b/src/test/ui/issues/issue-20091.rs similarity index 98% rename from src/test/run-pass/issues/issue-20091.rs rename to src/test/ui/issues/issue-20091.rs index 46d11b9d9b7d..cd90e828889d 100644 --- a/src/test/run-pass/issues/issue-20091.rs +++ b/src/test/ui/issues/issue-20091.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(stable_features)] // ignore-cloudabi no processes diff --git a/src/test/run-pass/issues/issue-20186.rs b/src/test/ui/issues/issue-20186.rs similarity index 97% rename from src/test/run-pass/issues/issue-20186.rs rename to src/test/ui/issues/issue-20186.rs index 16ac2babd427..fddb1391017d 100644 --- a/src/test/run-pass/issues/issue-20186.rs +++ b/src/test/ui/issues/issue-20186.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(unused_variables)] struct Foo; diff --git a/src/test/run-pass/issues/issue-20396.rs b/src/test/ui/issues/issue-20396.rs similarity index 97% rename from src/test/run-pass/issues/issue-20396.rs rename to src/test/ui/issues/issue-20396.rs index 6f0ce7ca2d46..13e0347cb080 100644 --- a/src/test/run-pass/issues/issue-20396.rs +++ b/src/test/ui/issues/issue-20396.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/src/test/run-pass/issues/issue-20414.rs b/src/test/ui/issues/issue-20414.rs similarity index 98% rename from src/test/run-pass/issues/issue-20414.rs rename to src/test/ui/issues/issue-20414.rs index f42ba1ff3036..72be151a3bc9 100644 --- a/src/test/run-pass/issues/issue-20414.rs +++ b/src/test/ui/issues/issue-20414.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-20454.rs b/src/test/ui/issues/issue-20454.rs similarity index 97% rename from src/test/run-pass/issues/issue-20454.rs rename to src/test/ui/issues/issue-20454.rs index e00ddf4905fd..ba15236324e3 100644 --- a/src/test/run-pass/issues/issue-20454.rs +++ b/src/test/ui/issues/issue-20454.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_must_use)] use std::thread; diff --git a/src/test/run-pass/issues/issue-2063-resource.rs b/src/test/ui/issues/issue-2063-resource.rs similarity index 97% rename from src/test/run-pass/issues/issue-2063-resource.rs rename to src/test/ui/issues/issue-2063-resource.rs index 6e30c1320400..bfe2d7acde67 100644 --- a/src/test/run-pass/issues/issue-2063-resource.rs +++ b/src/test/ui/issues/issue-2063-resource.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // test that autoderef of a type like this does not // cause compiler to loop. Note that no instances diff --git a/src/test/run-pass/issues/issue-20644.rs b/src/test/ui/issues/issue-20644.rs similarity index 98% rename from src/test/run-pass/issues/issue-20644.rs rename to src/test/ui/issues/issue-20644.rs index c53565262e81..8e50c0becb39 100644 --- a/src/test/run-pass/issues/issue-20644.rs +++ b/src/test/ui/issues/issue-20644.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(unused_imports)] #![allow(stable_features)] diff --git a/src/test/run-pass/issues/issue-20763-1.rs b/src/test/ui/issues/issue-20763-1.rs similarity index 98% rename from src/test/run-pass/issues/issue-20763-1.rs rename to src/test/ui/issues/issue-20763-1.rs index df85f615cd2a..bebbc914a459 100644 --- a/src/test/run-pass/issues/issue-20763-1.rs +++ b/src/test/ui/issues/issue-20763-1.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-20763-2.rs b/src/test/ui/issues/issue-20763-2.rs similarity index 98% rename from src/test/run-pass/issues/issue-20763-2.rs rename to src/test/ui/issues/issue-20763-2.rs index 489b87ce90f8..87f4e54a6ada 100644 --- a/src/test/run-pass/issues/issue-20763-2.rs +++ b/src/test/ui/issues/issue-20763-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-20797.rs b/src/test/ui/issues/issue-20797.rs similarity index 99% rename from src/test/run-pass/issues/issue-20797.rs rename to src/test/ui/issues/issue-20797.rs index 9c8a2571deb4..70be78ee7b2d 100644 --- a/src/test/run-pass/issues/issue-20797.rs +++ b/src/test/ui/issues/issue-20797.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // ignore-cloudabi no std::fs // Regression test for #20797. diff --git a/src/test/run-pass/issues/issue-20825.rs b/src/test/ui/issues/issue-20825-2.rs similarity index 97% rename from src/test/run-pass/issues/issue-20825.rs rename to src/test/ui/issues/issue-20825-2.rs index 62435fd343e8..fe2756e28140 100644 --- a/src/test/run-pass/issues/issue-20825.rs +++ b/src/test/ui/issues/issue-20825-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass pub trait Subscriber { type Input; } diff --git a/src/test/run-pass/issues/issue-21140.rs b/src/test/ui/issues/issue-21140.rs similarity index 97% rename from src/test/run-pass/issues/issue-21140.rs rename to src/test/ui/issues/issue-21140.rs index ebd5f6752e3a..fd04b7fcee8e 100644 --- a/src/test/run-pass/issues/issue-21140.rs +++ b/src/test/ui/issues/issue-21140.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass pub trait Trait where Self::Out: std::fmt::Display { type Out; } diff --git a/src/test/run-pass/issues/issue-21174.rs b/src/test/ui/issues/issue-21174-2.rs similarity index 97% rename from src/test/run-pass/issues/issue-21174.rs rename to src/test/ui/issues/issue-21174-2.rs index f387b93d8f92..e7524a942b22 100644 --- a/src/test/run-pass/issues/issue-21174.rs +++ b/src/test/ui/issues/issue-21174-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(unused_variables)] trait Trait<'a> { diff --git a/src/test/run-pass/issues/issue-21245.rs b/src/test/ui/issues/issue-21245.rs similarity index 99% rename from src/test/run-pass/issues/issue-21245.rs rename to src/test/ui/issues/issue-21245.rs index 234d70e4dd01..64b322f472bb 100644 --- a/src/test/run-pass/issues/issue-21245.rs +++ b/src/test/ui/issues/issue-21245.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Regression test for issue #21245. Check that we are able to infer // the types in these examples correctly. It used to be that diff --git a/src/test/run-pass/issues/issue-21363.rs b/src/test/ui/issues/issue-21363.rs similarity index 97% rename from src/test/run-pass/issues/issue-21363.rs rename to src/test/ui/issues/issue-21363.rs index e7f7a80a1dee..06c5ccbb6ccd 100644 --- a/src/test/run-pass/issues/issue-21363.rs +++ b/src/test/ui/issues/issue-21363.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 #![no_implicit_prelude] diff --git a/src/test/run-pass/issues/issue-21402.rs b/src/test/ui/issues/issue-21402.rs similarity index 97% rename from src/test/run-pass/issues/issue-21402.rs rename to src/test/ui/issues/issue-21402.rs index 041547a5728f..32633469ea46 100644 --- a/src/test/run-pass/issues/issue-21402.rs +++ b/src/test/ui/issues/issue-21402.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-21520.rs b/src/test/ui/issues/issue-21520.rs similarity index 98% rename from src/test/run-pass/issues/issue-21520.rs rename to src/test/ui/issues/issue-21520.rs index 33d79b661629..aac41196215d 100644 --- a/src/test/run-pass/issues/issue-21520.rs +++ b/src/test/ui/issues/issue-21520.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Test that the requirement (in `Bar`) that `T::Bar : 'static` does // not wind up propagating to `T`. diff --git a/src/test/run-pass/issues/issue-21562.rs b/src/test/ui/issues/issue-21562.rs similarity index 97% rename from src/test/run-pass/issues/issue-21562.rs rename to src/test/ui/issues/issue-21562.rs index 4e90ed7c4473..2cf97cec31c3 100644 --- a/src/test/run-pass/issues/issue-21562.rs +++ b/src/test/ui/issues/issue-21562.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/run-pass/issues/issue-21622.rs b/src/test/ui/issues/issue-21622.rs similarity index 97% rename from src/test/run-pass/issues/issue-21622.rs rename to src/test/ui/issues/issue-21622.rs index 16db178452e7..880b3524e107 100644 --- a/src/test/run-pass/issues/issue-21622.rs +++ b/src/test/ui/issues/issue-21622.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/src/test/run-pass/issues/issue-21634.rs b/src/test/ui/issues/issue-21634.rs similarity index 98% rename from src/test/run-pass/issues/issue-21634.rs rename to src/test/ui/issues/issue-21634.rs index 8c914ac5adc6..d21f56239531 100644 --- a/src/test/run-pass/issues/issue-21634.rs +++ b/src/test/ui/issues/issue-21634.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(stable_features)] #![feature(cfg_target_feature)] diff --git a/src/test/run-pass/issues/issue-21726.rs b/src/test/ui/issues/issue-21726.rs similarity index 98% rename from src/test/run-pass/issues/issue-21726.rs rename to src/test/ui/issues/issue-21726.rs index ffdff9aa2baf..b25fe1bc9540 100644 --- a/src/test/run-pass/issues/issue-21726.rs +++ b/src/test/ui/issues/issue-21726.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Regression test for #21726: an issue arose around the rules for // subtyping of projection types that resulted in an unconstrained diff --git a/src/test/run-pass/issues/issue-21891.rs b/src/test/ui/issues/issue-21891.rs similarity index 97% rename from src/test/run-pass/issues/issue-21891.rs rename to src/test/ui/issues/issue-21891.rs index 90a496617b0c..d83cf08d1733 100644 --- a/src/test/run-pass/issues/issue-21891.rs +++ b/src/test/ui/issues/issue-21891.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/run-pass/issues/issue-22066.rs b/src/test/ui/issues/issue-22066.rs similarity index 97% rename from src/test/run-pass/issues/issue-22066.rs rename to src/test/ui/issues/issue-22066.rs index ef4753703bf5..76dae2a2602e 100644 --- a/src/test/run-pass/issues/issue-22066.rs +++ b/src/test/ui/issues/issue-22066.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass pub trait LineFormatter<'a> { type Iter: Iterator + 'a; fn iter(&'a self, line: &'a str) -> Self::Iter; diff --git a/src/test/run-pass/issues/issue-22356.rs b/src/test/ui/issues/issue-22356.rs similarity index 98% rename from src/test/run-pass/issues/issue-22356.rs rename to src/test/ui/issues/issue-22356.rs index 6e62ae069829..87ea53a3f204 100644 --- a/src/test/run-pass/issues/issue-22356.rs +++ b/src/test/ui/issues/issue-22356.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(type_alias_bounds)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-22375.rs b/src/test/ui/issues/issue-22375.rs similarity index 96% rename from src/test/run-pass/issues/issue-22375.rs rename to src/test/ui/issues/issue-22375.rs index cf7ff0c404c0..a30f5f763875 100644 --- a/src/test/run-pass/issues/issue-22375.rs +++ b/src/test/ui/issues/issue-22375.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass trait A> {} fn main() {} diff --git a/src/test/run-pass/issues/issue-22471.rs b/src/test/ui/issues/issue-22471.rs similarity index 97% rename from src/test/run-pass/issues/issue-22471.rs rename to src/test/ui/issues/issue-22471.rs index b93f1f354c61..c13b9dd9248a 100644 --- a/src/test/run-pass/issues/issue-22471.rs +++ b/src/test/ui/issues/issue-22471.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(type_alias_bounds)] diff --git a/src/test/run-pass/issues/issue-22777.rs b/src/test/ui/issues/issue-22777.rs similarity index 99% rename from src/test/run-pass/issues/issue-22777.rs rename to src/test/ui/issues/issue-22777.rs index 92ad7a43d4d1..c97c10073e39 100644 --- a/src/test/run-pass/issues/issue-22777.rs +++ b/src/test/ui/issues/issue-22777.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // This test is reduced from libsyntax. It is just checking that we // can successfully deal with a "deep" structure, which the drop-check // was hitting a recursion limit on at one point. diff --git a/src/test/run-pass/issues/issue-22781.rs b/src/test/ui/issues/issue-22781.rs similarity index 98% rename from src/test/run-pass/issues/issue-22781.rs rename to src/test/ui/issues/issue-22781.rs index 8849b505e4b0..21e6138e4965 100644 --- a/src/test/run-pass/issues/issue-22781.rs +++ b/src/test/ui/issues/issue-22781.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_variables)] use std::collections::HashMap; use std::collections::hash_map::Entry::Vacant; diff --git a/src/test/run-pass/issues/issue-22814.rs b/src/test/ui/issues/issue-22814.rs similarity index 97% rename from src/test/run-pass/issues/issue-22814.rs rename to src/test/ui/issues/issue-22814.rs index 13c7dab37511..0d11484d9687 100644 --- a/src/test/run-pass/issues/issue-22814.rs +++ b/src/test/ui/issues/issue-22814.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass trait Test {} macro_rules! test { diff --git a/src/test/run-pass/issues/issue-22894.rs b/src/test/ui/issues/issue-22894.rs similarity index 97% rename from src/test/run-pass/issues/issue-22894.rs rename to src/test/ui/issues/issue-22894.rs index d1cd8efd73c2..f5ecd17d7881 100644 --- a/src/test/run-pass/issues/issue-22894.rs +++ b/src/test/ui/issues/issue-22894.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #[allow(dead_code)] static X: &'static str = &*""; fn main() {} diff --git a/src/test/run-pass/issues/issue-2311-2.rs b/src/test/ui/issues/issue-2311-2.rs similarity index 97% rename from src/test/run-pass/issues/issue-2311-2.rs rename to src/test/ui/issues/issue-2311-2.rs index 493ff6f01cbe..cc6376eb6689 100644 --- a/src/test/run-pass/issues/issue-2311-2.rs +++ b/src/test/ui/issues/issue-2311-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/run-pass/issues/issue-2311.rs b/src/test/ui/issues/issue-2311.rs similarity index 97% rename from src/test/run-pass/issues/issue-2311.rs rename to src/test/ui/issues/issue-2311.rs index 816754c4617e..77e014e27859 100644 --- a/src/test/run-pass/issues/issue-2311.rs +++ b/src/test/ui/issues/issue-2311.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(non_camel_case_types)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-2312.rs b/src/test/ui/issues/issue-2312.rs similarity index 97% rename from src/test/run-pass/issues/issue-2312.rs rename to src/test/ui/issues/issue-2312.rs index 9975f8a5aa72..0de460a30ab4 100644 --- a/src/test/run-pass/issues/issue-2312.rs +++ b/src/test/ui/issues/issue-2312.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/run-pass/issues/issue-23406.rs b/src/test/ui/issues/issue-23406.rs similarity index 97% rename from src/test/run-pass/issues/issue-23406.rs rename to src/test/ui/issues/issue-23406.rs index 771f62a6323f..eef35fe6f248 100644 --- a/src/test/run-pass/issues/issue-23406.rs +++ b/src/test/ui/issues/issue-23406.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] trait Inner { type T; diff --git a/src/test/run-pass/issues/issue-23442.rs b/src/test/ui/issues/issue-23442.rs similarity index 98% rename from src/test/run-pass/issues/issue-23442.rs rename to src/test/ui/issues/issue-23442.rs index 1b31516be17f..9907cf6b687e 100644 --- a/src/test/run-pass/issues/issue-23442.rs +++ b/src/test/ui/issues/issue-23442.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] use std::marker::PhantomData; diff --git a/src/test/run-pass/issues/issue-23477.rs b/src/test/ui/issues/issue-23477.rs similarity index 97% rename from src/test/run-pass/issues/issue-23477.rs rename to src/test/ui/issues/issue-23477.rs index c862b0dbc2fa..6d4fdcd08b64 100644 --- a/src/test/run-pass/issues/issue-23477.rs +++ b/src/test/ui/issues/issue-23477.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // compiler-flags: -g pub struct Dst { diff --git a/src/test/run-pass/issues/issue-23550.rs b/src/test/ui/issues/issue-23550.rs similarity index 98% rename from src/test/run-pass/issues/issue-23550.rs rename to src/test/ui/issues/issue-23550.rs index 143e0babcd96..e5b672bc3e7c 100644 --- a/src/test/run-pass/issues/issue-23550.rs +++ b/src/test/ui/issues/issue-23550.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![feature(core_intrinsics)] #![allow(warnings)] diff --git a/src/test/run-pass/issues/issue-23649-3.rs b/src/test/ui/issues/issue-23649-3.rs similarity index 97% rename from src/test/run-pass/issues/issue-23649-3.rs rename to src/test/ui/issues/issue-23649-3.rs index 067628ec12af..b2c9183c16c9 100644 --- a/src/test/run-pass/issues/issue-23649-3.rs +++ b/src/test/ui/issues/issue-23649-3.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #[derive(PartialEq)] struct Slice { slice: [u8] } diff --git a/src/test/run-pass/issues/issue-24085.rs b/src/test/ui/issues/issue-24085.rs similarity index 98% rename from src/test/run-pass/issues/issue-24085.rs rename to src/test/ui/issues/issue-24085.rs index 06350a80730a..e74f993df67d 100644 --- a/src/test/run-pass/issues/issue-24085.rs +++ b/src/test/ui/issues/issue-24085.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Regression test for #24085. Errors were occurring in region // inference due to the requirement that `'a:b'`, which was getting diff --git a/src/test/run-pass/issues/issue-24161.rs b/src/test/ui/issues/issue-24161.rs similarity index 97% rename from src/test/run-pass/issues/issue-24161.rs rename to src/test/ui/issues/issue-24161.rs index 8bb88be7c562..fb50f4dc8db0 100644 --- a/src/test/run-pass/issues/issue-24161.rs +++ b/src/test/ui/issues/issue-24161.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #[derive(Copy,Clone)] struct Functions { diff --git a/src/test/run-pass/issues/issue-24227.rs b/src/test/ui/issues/issue-24227.rs similarity index 97% rename from src/test/run-pass/issues/issue-24227.rs rename to src/test/ui/issues/issue-24227.rs index 86241b1763ae..f2c67e19eef7 100644 --- a/src/test/run-pass/issues/issue-24227.rs +++ b/src/test/ui/issues/issue-24227.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // This resulted in an ICE. Test for future-proofing // Issue #24227 diff --git a/src/test/run-pass/issues/issue-24389.rs b/src/test/ui/issues/issue-24389.rs similarity index 97% rename from src/test/run-pass/issues/issue-24389.rs rename to src/test/ui/issues/issue-24389.rs index 5eb622bb932b..704a71dbb1ed 100644 --- a/src/test/run-pass/issues/issue-24389.rs +++ b/src/test/ui/issues/issue-24389.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] struct Foo; diff --git a/src/test/run-pass/issues/issue-24434.rs b/src/test/ui/issues/issue-24434.rs similarity index 97% rename from src/test/run-pass/issues/issue-24434.rs rename to src/test/ui/issues/issue-24434.rs index 7fdd6f8ee8be..490d6dfadec5 100644 --- a/src/test/run-pass/issues/issue-24434.rs +++ b/src/test/ui/issues/issue-24434.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_attributes)] // compile-flags:--cfg set1 diff --git a/src/test/run-pass/issues/issue-2487-a.rs b/src/test/ui/issues/issue-2487-a.rs similarity index 98% rename from src/test/run-pass/issues/issue-2487-a.rs rename to src/test/ui/issues/issue-2487-a.rs index 6bd1757f64ce..bff4eb92806d 100644 --- a/src/test/run-pass/issues/issue-2487-a.rs +++ b/src/test/ui/issues/issue-2487-a.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/run-pass/issues/issue-2502.rs b/src/test/ui/issues/issue-2502.rs similarity index 98% rename from src/test/run-pass/issues/issue-2502.rs rename to src/test/ui/issues/issue-2502.rs index 938a8e290444..24ba19c4b7f2 100644 --- a/src/test/run-pass/issues/issue-2502.rs +++ b/src/test/ui/issues/issue-2502.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/run-pass/issues/issue-25180.rs b/src/test/ui/issues/issue-25180.rs similarity index 97% rename from src/test/run-pass/issues/issue-25180.rs rename to src/test/ui/issues/issue-25180.rs index 04a28fb8f0a2..5f15393dacc1 100644 --- a/src/test/run-pass/issues/issue-25180.rs +++ b/src/test/ui/issues/issue-25180.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/run-pass/issues/issue-25394.rs b/src/test/ui/issues/issue-25394.rs similarity index 97% rename from src/test/run-pass/issues/issue-25394.rs rename to src/test/ui/issues/issue-25394.rs index 4e7b6242712b..eaa44623f40e 100644 --- a/src/test/run-pass/issues/issue-25394.rs +++ b/src/test/ui/issues/issue-25394.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #[derive(Debug)] struct Row([T]); diff --git a/src/test/run-pass/issues/issue-26095.rs b/src/test/ui/issues/issue-26095.rs similarity index 97% rename from src/test/run-pass/issues/issue-26095.rs rename to src/test/ui/issues/issue-26095.rs index cc7f7cdbab1f..cf33cf3cb6e1 100644 --- a/src/test/run-pass/issues/issue-26095.rs +++ b/src/test/ui/issues/issue-26095.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/run-pass/issues/issue-2611-3.rs b/src/test/ui/issues/issue-2611-3.rs similarity index 97% rename from src/test/run-pass/issues/issue-2611-3.rs rename to src/test/ui/issues/issue-2611-3.rs index 99fd1a727f55..29a8200104ac 100644 --- a/src/test/run-pass/issues/issue-2611-3.rs +++ b/src/test/ui/issues/issue-2611-3.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Tests that impls are allowed to have looser, more permissive bounds // than the traits require. diff --git a/src/test/run-pass/issues/issue-26205.rs b/src/test/ui/issues/issue-26205.rs similarity index 98% rename from src/test/run-pass/issues/issue-26205.rs rename to src/test/ui/issues/issue-26205.rs index ce96c3dd5a2a..ccadee457506 100644 --- a/src/test/run-pass/issues/issue-26205.rs +++ b/src/test/ui/issues/issue-26205.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] use std::ops::{Deref, DerefMut}; diff --git a/src/test/run-pass/issues/issue-26646.rs b/src/test/ui/issues/issue-26646.rs similarity index 97% rename from src/test/run-pass/issues/issue-26646.rs rename to src/test/ui/issues/issue-26646.rs index 05602f7504eb..a587db00dcf2 100644 --- a/src/test/run-pass/issues/issue-26646.rs +++ b/src/test/ui/issues/issue-26646.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![deny(unused_attributes)] #[repr(C)] diff --git a/src/test/run-pass/issues/issue-26997.rs b/src/test/ui/issues/issue-26997.rs similarity index 97% rename from src/test/run-pass/issues/issue-26997.rs rename to src/test/ui/issues/issue-26997.rs index 03430e1ac687..1a4850d24591 100644 --- a/src/test/run-pass/issues/issue-26997.rs +++ b/src/test/ui/issues/issue-26997.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] pub struct Foo { x: isize, diff --git a/src/test/run-pass/issues/issue-27105.rs b/src/test/ui/issues/issue-27105.rs similarity index 97% rename from src/test/run-pass/issues/issue-27105.rs rename to src/test/ui/issues/issue-27105.rs index e565acde2f01..c2a0baaba284 100644 --- a/src/test/run-pass/issues/issue-27105.rs +++ b/src/test/ui/issues/issue-27105.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass use std::cell::RefCell; use std::rc::Rc; diff --git a/src/test/run-pass/issues/issue-27281.rs b/src/test/ui/issues/issue-27281.rs similarity index 97% rename from src/test/run-pass/issues/issue-27281.rs rename to src/test/ui/issues/issue-27281.rs index 1dc4ac5cdcc9..1dfbe21921ec 100644 --- a/src/test/run-pass/issues/issue-27281.rs +++ b/src/test/ui/issues/issue-27281.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass pub trait Trait<'a> { type T; type U; diff --git a/src/test/run-pass/issues/issue-2748-a.rs b/src/test/ui/issues/issue-2748-a.rs similarity index 97% rename from src/test/run-pass/issues/issue-2748-a.rs rename to src/test/ui/issues/issue-2748-a.rs index db7b46a4dc5a..8c8d3c557fc7 100644 --- a/src/test/run-pass/issues/issue-2748-a.rs +++ b/src/test/ui/issues/issue-2748-a.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_snake_case)] diff --git a/src/test/run-pass/issues/issue-27583.rs b/src/test/ui/issues/issue-27583.rs similarity index 99% rename from src/test/run-pass/issues/issue-27583.rs rename to src/test/ui/issues/issue-27583.rs index 1a1ad2bc1945..c0a981f60ee0 100644 --- a/src/test/run-pass/issues/issue-27583.rs +++ b/src/test/ui/issues/issue-27583.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // Regression test for issue #27583. Unclear how useful this will be // going forward, since the issue in question was EXTREMELY sensitive // to compiler internals (like the precise numbering of nodes), but diff --git a/src/test/run-pass/issues/issue-27889.rs b/src/test/ui/issues/issue-27889.rs similarity index 98% rename from src/test/run-pass/issues/issue-27889.rs rename to src/test/ui/issues/issue-27889.rs index 82d178835e2d..4e4ef64c5b68 100644 --- a/src/test/run-pass/issues/issue-27889.rs +++ b/src/test/ui/issues/issue-27889.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_assignments)] #![allow(unused_variables)] // Test that a field can have the same name in different variants diff --git a/src/test/run-pass/issues/issue-2804-2.rs b/src/test/ui/issues/issue-2804-2.rs similarity index 98% rename from src/test/run-pass/issues/issue-2804-2.rs rename to src/test/ui/issues/issue-2804-2.rs index 3e64d78ba027..1894d50ed992 100644 --- a/src/test/run-pass/issues/issue-2804-2.rs +++ b/src/test/ui/issues/issue-2804-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Minimized version of issue-2804.rs. Both check that callee IDs don't // clobber the previous node ID in a macro expr diff --git a/src/test/run-pass/issues/issue-28279.rs b/src/test/ui/issues/issue-28279.rs similarity index 98% rename from src/test/run-pass/issues/issue-28279.rs rename to src/test/ui/issues/issue-28279.rs index bd5129a8ae4d..c3f2c73e845f 100644 --- a/src/test/run-pass/issues/issue-28279.rs +++ b/src/test/ui/issues/issue-28279.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] use std::rc::Rc; diff --git a/src/test/run-pass/issues/issue-28561.rs b/src/test/ui/issues/issue-28561.rs similarity index 99% rename from src/test/run-pass/issues/issue-28561.rs rename to src/test/ui/issues/issue-28561.rs index 5927ce77f8ed..28fac2cba0fa 100644 --- a/src/test/run-pass/issues/issue-28561.rs +++ b/src/test/ui/issues/issue-28561.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #[derive(Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] struct Array { f00: [T; 00], diff --git a/src/test/run-pass/issues/issue-28600.rs b/src/test/ui/issues/issue-28600.rs similarity index 97% rename from src/test/run-pass/issues/issue-28600.rs rename to src/test/ui/issues/issue-28600.rs index 0f3573f7e62e..88842ad9ca59 100644 --- a/src/test/run-pass/issues/issue-28600.rs +++ b/src/test/ui/issues/issue-28600.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // #28600 ICE: pub extern fn with parameter type &str inside struct impl struct Test; diff --git a/src/test/run-pass/issues/issue-28822.rs b/src/test/ui/issues/issue-28822.rs similarity index 97% rename from src/test/run-pass/issues/issue-28822.rs rename to src/test/ui/issues/issue-28822.rs index 1dda72129523..af8531feff23 100644 --- a/src/test/run-pass/issues/issue-28822.rs +++ b/src/test/ui/issues/issue-28822.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![feature(min_const_fn)] diff --git a/src/test/run-pass/issues/issue-28871.rs b/src/test/ui/issues/issue-28871.rs similarity index 98% rename from src/test/run-pass/issues/issue-28871.rs rename to src/test/ui/issues/issue-28871.rs index 2be324092742..0602b9b2297e 100644 --- a/src/test/run-pass/issues/issue-28871.rs +++ b/src/test/ui/issues/issue-28871.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // Regression test for #28871. The problem is that rustc encountered // two ways to project, one from a where clause and one from the where // clauses on the trait definition. (In fact, in this case, the where diff --git a/src/test/run-pass/issues/issue-28936.rs b/src/test/ui/issues/issue-28936.rs similarity index 98% rename from src/test/run-pass/issues/issue-28936.rs rename to src/test/ui/issues/issue-28936.rs index 1e3e3474c171..fd0538387957 100644 --- a/src/test/run-pass/issues/issue-28936.rs +++ b/src/test/ui/issues/issue-28936.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass pub type Session = i32; pub struct StreamParser<'a, T> { _tokens: T, diff --git a/src/test/run-pass/issues/issue-28999.rs b/src/test/ui/issues/issue-28999.rs similarity index 97% rename from src/test/run-pass/issues/issue-28999.rs rename to src/test/ui/issues/issue-28999.rs index bb5747ca7443..7f4ccc971b77 100644 --- a/src/test/run-pass/issues/issue-28999.rs +++ b/src/test/ui/issues/issue-28999.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass pub struct Xyz<'a, V> { pub v: (V, &'a u32), } diff --git a/src/test/run-pass/issues/issue-29030.rs b/src/test/ui/issues/issue-29030.rs similarity index 97% rename from src/test/run-pass/issues/issue-29030.rs rename to src/test/ui/issues/issue-29030.rs index 9f4b2cffbbb1..08460e18c133 100644 --- a/src/test/run-pass/issues/issue-29030.rs +++ b/src/test/ui/issues/issue-29030.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #[derive(Debug)] struct Message<'a, P: 'a = &'a [u8]> { diff --git a/src/test/run-pass/issues/issue-29037.rs b/src/test/ui/issues/issue-29037.rs similarity index 98% rename from src/test/run-pass/issues/issue-29037.rs rename to src/test/ui/issues/issue-29037.rs index 3148e61827ff..cb15e4048b95 100644 --- a/src/test/run-pass/issues/issue-29037.rs +++ b/src/test/ui/issues/issue-29037.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // This test ensures that each pointer type `P` is covariant in `X`. diff --git a/src/test/run-pass/issues/issue-2904.rs b/src/test/ui/issues/issue-2904.rs similarity index 99% rename from src/test/run-pass/issues/issue-2904.rs rename to src/test/ui/issues/issue-2904.rs index ab40c2e0bbec..2e91979a517d 100644 --- a/src/test/run-pass/issues/issue-2904.rs +++ b/src/test/ui/issues/issue-2904.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] diff --git a/src/test/run-pass/issues/issue-29048.rs b/src/test/ui/issues/issue-29048.rs similarity index 97% rename from src/test/run-pass/issues/issue-29048.rs rename to src/test/ui/issues/issue-29048.rs index f889cd8af617..cbd0eab8b1c5 100644 --- a/src/test/run-pass/issues/issue-29048.rs +++ b/src/test/ui/issues/issue-29048.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass pub struct Chan; pub struct ChanSelect<'c, T> { chans: Vec<(&'c Chan, T)>, diff --git a/src/test/run-pass/issues/issue-29071.rs b/src/test/ui/issues/issue-29071.rs similarity index 97% rename from src/test/run-pass/issues/issue-29071.rs rename to src/test/ui/issues/issue-29071.rs index 1eab5a7bbdad..874978826cad 100644 --- a/src/test/run-pass/issues/issue-29071.rs +++ b/src/test/ui/issues/issue-29071.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/run-pass/issues/issue-29276.rs b/src/test/ui/issues/issue-29276.rs similarity index 97% rename from src/test/run-pass/issues/issue-29276.rs rename to src/test/ui/issues/issue-29276.rs index 9f2a0d6bc99b..4ea720bfb7ca 100644 --- a/src/test/run-pass/issues/issue-29276.rs +++ b/src/test/ui/issues/issue-29276.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] struct S([u8; { struct Z; 0 }]); diff --git a/src/test/run-pass/issues/issue-29516.rs b/src/test/ui/issues/issue-29516.rs similarity index 97% rename from src/test/run-pass/issues/issue-29516.rs rename to src/test/ui/issues/issue-29516.rs index 55caa65f1cfe..8315585e15ed 100644 --- a/src/test/run-pass/issues/issue-29516.rs +++ b/src/test/ui/issues/issue-29516.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![feature(optin_builtin_traits)] auto trait NotSame {} diff --git a/src/test/run-pass/issues/issue-29540.rs b/src/test/ui/issues/issue-29540.rs similarity index 99% rename from src/test/run-pass/issues/issue-29540.rs rename to src/test/ui/issues/issue-29540.rs index 7e01efcd05f3..0dbd830c1350 100644 --- a/src/test/run-pass/issues/issue-29540.rs +++ b/src/test/ui/issues/issue-29540.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #[derive(Debug)] pub struct Config { pub name: String, diff --git a/src/test/run-pass/issues/issue-29710.rs b/src/test/ui/issues/issue-29710.rs similarity index 97% rename from src/test/run-pass/issues/issue-29710.rs rename to src/test/ui/issues/issue-29710.rs index fa768340b71a..971aac8f694d 100644 --- a/src/test/run-pass/issues/issue-29710.rs +++ b/src/test/ui/issues/issue-29710.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![deny(unused_results)] #![allow(dead_code)] diff --git a/src/test/run-pass/issues/issue-29740.rs b/src/test/ui/issues/issue-29740.rs similarity index 99% rename from src/test/run-pass/issues/issue-29740.rs rename to src/test/ui/issues/issue-29740.rs index 3854ad38bdcd..e383b712f24a 100644 --- a/src/test/run-pass/issues/issue-29740.rs +++ b/src/test/ui/issues/issue-29740.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Regression test for #29740. Inefficient MIR matching algorithms // generated way too much code for this sort of case, leading to OOM. diff --git a/src/test/run-pass/issues/issue-31260.rs b/src/test/ui/issues/issue-31260.rs similarity index 97% rename from src/test/run-pass/issues/issue-31260.rs rename to src/test/ui/issues/issue-31260.rs index 82d0d5b5ffbb..085a6e19eb15 100644 --- a/src/test/run-pass/issues/issue-31260.rs +++ b/src/test/ui/issues/issue-31260.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] pub struct Struct { pub field: K, diff --git a/src/test/run-pass/issues/issue-3149.rs b/src/test/ui/issues/issue-3149.rs similarity index 98% rename from src/test/run-pass/issues/issue-3149.rs rename to src/test/ui/issues/issue-3149.rs index 4eb3378a089e..507af2f6c2a4 100644 --- a/src/test/run-pass/issues/issue-3149.rs +++ b/src/test/ui/issues/issue-3149.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_snake_case)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-31597.rs b/src/test/ui/issues/issue-31597.rs similarity index 98% rename from src/test/run-pass/issues/issue-31597.rs rename to src/test/ui/issues/issue-31597.rs index f3995511b0fc..163b7385c8bc 100644 --- a/src/test/run-pass/issues/issue-31597.rs +++ b/src/test/ui/issues/issue-31597.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] trait Make { type Out; diff --git a/src/test/run-pass/issues/issue-32324.rs b/src/test/ui/issues/issue-32324.rs similarity index 98% rename from src/test/run-pass/issues/issue-32324.rs rename to src/test/ui/issues/issue-32324.rs index 483ddaeb9578..92d88d543a58 100644 --- a/src/test/run-pass/issues/issue-32324.rs +++ b/src/test/ui/issues/issue-32324.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] trait Resources { diff --git a/src/test/run-pass/issues/issue-33264.rs b/src/test/ui/issues/issue-33264.rs similarity index 98% rename from src/test/run-pass/issues/issue-33264.rs rename to src/test/ui/issues/issue-33264.rs index 1c0ad2a659e8..9b17dae0eef9 100644 --- a/src/test/run-pass/issues/issue-33264.rs +++ b/src/test/ui/issues/issue-33264.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // only-x86_64 #![allow(dead_code, non_upper_case_globals)] diff --git a/src/test/run-pass/issues/issue-33287.rs b/src/test/ui/issues/issue-33287.rs similarity index 97% rename from src/test/run-pass/issues/issue-33287.rs rename to src/test/ui/issues/issue-33287.rs index 31f44ffa34db..1816d7d4f887 100644 --- a/src/test/run-pass/issues/issue-33287.rs +++ b/src/test/ui/issues/issue-33287.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(unused_variables)] const A: [u32; 1] = [0]; diff --git a/src/test/run-pass/issues/issue-33903.rs b/src/test/ui/issues/issue-33903.rs similarity index 97% rename from src/test/run-pass/issues/issue-33903.rs rename to src/test/ui/issues/issue-33903.rs index e521b594aa23..bcbb73ce65b9 100644 --- a/src/test/run-pass/issues/issue-33903.rs +++ b/src/test/ui/issues/issue-33903.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Issue 33903: // Built-in indexing should be used even when the index is not diff --git a/src/test/run-pass/issues/issue-34194.rs b/src/test/ui/issues/issue-34194.rs similarity index 97% rename from src/test/run-pass/issues/issue-34194.rs rename to src/test/ui/issues/issue-34194.rs index dfc0a34651a3..986048a03ee1 100644 --- a/src/test/run-pass/issues/issue-34194.rs +++ b/src/test/ui/issues/issue-34194.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] struct A { diff --git a/src/test/run-pass/issues/issue-3424.rs b/src/test/ui/issues/issue-3424.rs similarity index 98% rename from src/test/run-pass/issues/issue-3424.rs rename to src/test/ui/issues/issue-3424.rs index cf1b00226617..7bf0c4393c30 100644 --- a/src/test/run-pass/issues/issue-3424.rs +++ b/src/test/ui/issues/issue-3424.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_camel_case_types)] // rustc --test ignores2.rs && ./ignores2 diff --git a/src/test/run-pass/issues/issue-34751.rs b/src/test/ui/issues/issue-34751.rs similarity index 97% rename from src/test/run-pass/issues/issue-34751.rs rename to src/test/ui/issues/issue-34751.rs index d4758b80e979..e39e3c3b309b 100644 --- a/src/test/run-pass/issues/issue-34751.rs +++ b/src/test/ui/issues/issue-34751.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // #34751 ICE: 'rustc' panicked at 'assertion failed: !substs.has_regions_escaping_depth(0)' diff --git a/src/test/run-pass/issues/issue-34780.rs b/src/test/ui/issues/issue-34780.rs similarity index 97% rename from src/test/run-pass/issues/issue-34780.rs rename to src/test/ui/issues/issue-34780.rs index b7f2871a8d15..90b462a7432f 100644 --- a/src/test/run-pass/issues/issue-34780.rs +++ b/src/test/ui/issues/issue-34780.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(stable_features)] #![feature(associated_consts)] diff --git a/src/test/run-pass/issues/issue-35376.rs b/src/test/ui/issues/issue-35376.rs similarity index 98% rename from src/test/run-pass/issues/issue-35376.rs rename to src/test/ui/issues/issue-35376.rs index ee8c6c9f35c2..0265a5845f98 100644 --- a/src/test/run-pass/issues/issue-35376.rs +++ b/src/test/ui/issues/issue-35376.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![feature(specialization)] fn main() {} diff --git a/src/test/run-pass/issues/issue-35546.rs b/src/test/ui/issues/issue-35546.rs similarity index 98% rename from src/test/run-pass/issues/issue-35546.rs rename to src/test/ui/issues/issue-35546.rs index 13d099081b05..79680565ee17 100644 --- a/src/test/run-pass/issues/issue-35546.rs +++ b/src/test/ui/issues/issue-35546.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Regression test for #35546. Check that we are able to codegen // this. Before we had problems because of the drop glue signature diff --git a/src/test/run-pass/issues/issue-3563-2.rs b/src/test/ui/issues/issue-3563-2.rs similarity index 97% rename from src/test/run-pass/issues/issue-3563-2.rs rename to src/test/ui/issues/issue-3563-2.rs index 534bec59018e..916adc83223a 100644 --- a/src/test/run-pass/issues/issue-3563-2.rs +++ b/src/test/ui/issues/issue-3563-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 trait Canvas { diff --git a/src/test/run-pass/issues/issue-36075.rs b/src/test/ui/issues/issue-36075.rs similarity index 97% rename from src/test/run-pass/issues/issue-36075.rs rename to src/test/ui/issues/issue-36075.rs index 4042bd197949..fdc10ae936b9 100644 --- a/src/test/run-pass/issues/issue-36075.rs +++ b/src/test/ui/issues/issue-36075.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] trait DeclarationParser { type Declaration; diff --git a/src/test/run-pass/issues/issue-3609.rs b/src/test/ui/issues/issue-3609.rs similarity index 98% rename from src/test/run-pass/issues/issue-3609.rs rename to src/test/ui/issues/issue-3609.rs index abbaf630e78e..070b2e538d7b 100644 --- a/src/test/run-pass/issues/issue-3609.rs +++ b/src/test/ui/issues/issue-3609.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] diff --git a/src/test/run-pass/issues/issue-36744-without-calls.rs b/src/test/ui/issues/issue-36744-without-calls.rs similarity index 97% rename from src/test/run-pass/issues/issue-36744-without-calls.rs rename to src/test/ui/issues/issue-36744-without-calls.rs index ad54d6e403cb..8a47ebbd0a89 100644 --- a/src/test/run-pass/issues/issue-36744-without-calls.rs +++ b/src/test/ui/issues/issue-36744-without-calls.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // Tests for an LLVM abort when storing a lifetime-parametric fn into // context that is expecting one that is not lifetime-parametric // (i.e. has no `for <'_>`). diff --git a/src/test/run-pass/issues/issue-37598.rs b/src/test/ui/issues/issue-37598.rs similarity index 97% rename from src/test/run-pass/issues/issue-37598.rs rename to src/test/ui/issues/issue-37598.rs index 3001591c406e..9956301dcc9b 100644 --- a/src/test/run-pass/issues/issue-37598.rs +++ b/src/test/ui/issues/issue-37598.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![feature(slice_patterns)] diff --git a/src/test/run-pass/issues/issue-37655.rs b/src/test/ui/issues/issue-37655.rs similarity index 98% rename from src/test/run-pass/issues/issue-37655.rs rename to src/test/ui/issues/issue-37655.rs index 899686befc23..472b3383727a 100644 --- a/src/test/run-pass/issues/issue-37655.rs +++ b/src/test/ui/issues/issue-37655.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // Regression test for #37655. The problem was a false edge created by // coercion that wound up requiring that `'a` (in `split()`) outlive // `'b`, which shouldn't be necessary. diff --git a/src/test/run-pass/issues/issue-37725.rs b/src/test/ui/issues/issue-37725.rs similarity index 97% rename from src/test/run-pass/issues/issue-37725.rs rename to src/test/ui/issues/issue-37725.rs index 8b29dad918d3..fa5bb362c9f6 100644 --- a/src/test/run-pass/issues/issue-37725.rs +++ b/src/test/ui/issues/issue-37725.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] trait Foo { fn foo(&self); diff --git a/src/test/run-pass/issues/issue-37733.rs b/src/test/ui/issues/issue-37733.rs similarity index 97% rename from src/test/run-pass/issues/issue-37733.rs rename to src/test/ui/issues/issue-37733.rs index a982cae26212..04a4c19785b5 100644 --- a/src/test/run-pass/issues/issue-37733.rs +++ b/src/test/ui/issues/issue-37733.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] type A = for<> fn(); diff --git a/src/test/run-pass/issues/issue-38727.rs b/src/test/ui/issues/issue-38727.rs similarity index 97% rename from src/test/run-pass/issues/issue-38727.rs rename to src/test/ui/issues/issue-38727.rs index ccf0e1c2bdbd..5774d08473ad 100644 --- a/src/test/run-pass/issues/issue-38727.rs +++ b/src/test/ui/issues/issue-38727.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #[repr(u64)] enum A { diff --git a/src/test/run-pass/issues/issue-3874.rs b/src/test/ui/issues/issue-3874.rs similarity index 97% rename from src/test/run-pass/issues/issue-3874.rs rename to src/test/ui/issues/issue-3874.rs index 2b1e25d2a1a7..791a4bb8af0a 100644 --- a/src/test/run-pass/issues/issue-3874.rs +++ b/src/test/ui/issues/issue-3874.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-3888-2.rs b/src/test/ui/issues/issue-3888-2.rs similarity index 97% rename from src/test/run-pass/issues/issue-3888-2.rs rename to src/test/ui/issues/issue-3888-2.rs index 2d702dac0285..79b206799ad2 100644 --- a/src/test/run-pass/issues/issue-3888-2.rs +++ b/src/test/ui/issues/issue-3888-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-39089.rs b/src/test/ui/issues/issue-39089.rs similarity index 97% rename from src/test/run-pass/issues/issue-39089.rs rename to src/test/ui/issues/issue-39089.rs index 6908563a81ce..f6acc4b814df 100644 --- a/src/test/run-pass/issues/issue-39089.rs +++ b/src/test/ui/issues/issue-39089.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] fn f Sized>() {} diff --git a/src/test/run-pass/issues/issue-39467.rs b/src/test/ui/issues/issue-39467.rs similarity index 97% rename from src/test/run-pass/issues/issue-39467.rs rename to src/test/ui/issues/issue-39467.rs index d54cf3f27c51..417b3160a4d9 100644 --- a/src/test/run-pass/issues/issue-39467.rs +++ b/src/test/ui/issues/issue-39467.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] macro_rules! expr { () => { () } } diff --git a/src/test/run-pass/issues/issue-3979-2.rs b/src/test/ui/issues/issue-3979-2.rs similarity index 97% rename from src/test/run-pass/issues/issue-3979-2.rs rename to src/test/ui/issues/issue-3979-2.rs index 9b8e5817c6c1..adfd5873ea77 100644 --- a/src/test/run-pass/issues/issue-3979-2.rs +++ b/src/test/ui/issues/issue-3979-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 trait A { diff --git a/src/test/run-pass/issues/issue-3991.rs b/src/test/ui/issues/issue-3991.rs similarity index 97% rename from src/test/run-pass/issues/issue-3991.rs rename to src/test/ui/issues/issue-3991.rs index 9028066cfacd..90fa1f8c3e09 100644 --- a/src/test/run-pass/issues/issue-3991.rs +++ b/src/test/ui/issues/issue-3991.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-39984.rs b/src/test/ui/issues/issue-39984.rs similarity index 97% rename from src/test/run-pass/issues/issue-39984.rs rename to src/test/ui/issues/issue-39984.rs index c90585cb734e..cd4b32688d35 100644 --- a/src/test/run-pass/issues/issue-39984.rs +++ b/src/test/ui/issues/issue-39984.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(unreachable_code)] // Regression test for issue #39984. diff --git a/src/test/run-pass/issues/issue-40136.rs b/src/test/ui/issues/issue-40136.rs similarity index 97% rename from src/test/run-pass/issues/issue-40136.rs rename to src/test/ui/issues/issue-40136.rs index 00d33fae13c1..77f4466ae54e 100644 --- a/src/test/run-pass/issues/issue-40136.rs +++ b/src/test/ui/issues/issue-40136.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] macro_rules! m { () => { 0 } } diff --git a/src/test/run-pass/issues/issue-4025.rs b/src/test/ui/issues/issue-4025.rs similarity index 98% rename from src/test/run-pass/issues/issue-4025.rs rename to src/test/ui/issues/issue-4025.rs index 41af0826c00a..470dd1e430f9 100644 --- a/src/test/run-pass/issues/issue-4025.rs +++ b/src/test/ui/issues/issue-4025.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(unused_mut)] /* diff --git a/src/test/run-pass/issues/issue-40962.rs b/src/test/ui/issues/issue-40962.rs similarity index 97% rename from src/test/run-pass/issues/issue-40962.rs rename to src/test/ui/issues/issue-40962.rs index 9c9fb2ce9cbe..8b2a53f4032e 100644 --- a/src/test/run-pass/issues/issue-40962.rs +++ b/src/test/ui/issues/issue-40962.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass macro_rules! m { ($i:meta) => { #[derive($i)] diff --git a/src/test/run-pass/issues/issue-41272.rs b/src/test/ui/issues/issue-41272.rs similarity index 97% rename from src/test/run-pass/issues/issue-41272.rs rename to src/test/ui/issues/issue-41272.rs index 827edd39d2f9..ff8c234ae5ed 100644 --- a/src/test/run-pass/issues/issue-41272.rs +++ b/src/test/ui/issues/issue-41272.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] struct Foo; diff --git a/src/test/run-pass/issues/issue-41298.rs b/src/test/ui/issues/issue-41298.rs similarity index 97% rename from src/test/run-pass/issues/issue-41298.rs rename to src/test/ui/issues/issue-41298.rs index 189c419c5dbb..808e6a7f05fa 100644 --- a/src/test/run-pass/issues/issue-41298.rs +++ b/src/test/ui/issues/issue-41298.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] struct Function { t: T, f: F } diff --git a/src/test/run-pass/issues/issue-41628.rs b/src/test/ui/issues/issue-41628.rs similarity index 97% rename from src/test/run-pass/issues/issue-41628.rs rename to src/test/ui/issues/issue-41628.rs index f4b9588ff056..ac626f0ba387 100644 --- a/src/test/run-pass/issues/issue-41628.rs +++ b/src/test/ui/issues/issue-41628.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![deny(dead_code)] #[used] diff --git a/src/test/run-pass/issues/issue-41936-variance-coerce-unsized-cycle.rs b/src/test/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs similarity index 98% rename from src/test/run-pass/issues/issue-41936-variance-coerce-unsized-cycle.rs rename to src/test/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs index 1a4b283a81be..96c9a565233f 100644 --- a/src/test/run-pass/issues/issue-41936-variance-coerce-unsized-cycle.rs +++ b/src/test/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Regression test for #41936. The coerce-unsized trait check in // coherence was using subtyping, which triggered variance diff --git a/src/test/run-pass/issues/issue-42467.rs b/src/test/ui/issues/issue-42467.rs similarity index 98% rename from src/test/run-pass/issues/issue-42467.rs rename to src/test/ui/issues/issue-42467.rs index 82bab74a49b6..2acefd718c93 100644 --- a/src/test/run-pass/issues/issue-42467.rs +++ b/src/test/ui/issues/issue-42467.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] struct Foo(T); diff --git a/src/test/run-pass/issues/issue-42956.rs b/src/test/ui/issues/issue-42956.rs similarity index 98% rename from src/test/run-pass/issues/issue-42956.rs rename to src/test/ui/issues/issue-42956.rs index 2210facf294a..9dff9f662820 100644 --- a/src/test/run-pass/issues/issue-42956.rs +++ b/src/test/ui/issues/issue-42956.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(stable_features)] #![feature(associated_consts)] diff --git a/src/test/run-pass/issues/issue-43057.rs b/src/test/ui/issues/issue-43057.rs similarity index 97% rename from src/test/run-pass/issues/issue-43057.rs rename to src/test/ui/issues/issue-43057.rs index 26140246a7f1..ba363e9e29e2 100644 --- a/src/test/run-pass/issues/issue-43057.rs +++ b/src/test/ui/issues/issue-43057.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused)] macro_rules! column { diff --git a/src/test/run-pass/issues/issue-43357.rs b/src/test/ui/issues/issue-43357.rs similarity index 97% rename from src/test/run-pass/issues/issue-43357.rs rename to src/test/ui/issues/issue-43357.rs index 558b0712bb1f..d42f0de4849d 100644 --- a/src/test/run-pass/issues/issue-43357.rs +++ b/src/test/ui/issues/issue-43357.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] trait Trait { type Output; diff --git a/src/test/run-pass/issues/issue-43483.rs b/src/test/ui/issues/issue-43483.rs similarity index 97% rename from src/test/run-pass/issues/issue-43483.rs rename to src/test/ui/issues/issue-43483.rs index 841bc629ce5b..9622265ce2e0 100644 --- a/src/test/run-pass/issues/issue-43483.rs +++ b/src/test/ui/issues/issue-43483.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(unused_variables)] trait VecN { diff --git a/src/test/run-pass/issues/issue-44005.rs b/src/test/ui/issues/issue-44005.rs similarity index 98% rename from src/test/run-pass/issues/issue-44005.rs rename to src/test/ui/issues/issue-44005.rs index 699cb18ffc72..c3599294e37e 100644 --- a/src/test/run-pass/issues/issue-44005.rs +++ b/src/test/ui/issues/issue-44005.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass pub trait Foo<'a> { type Bar; fn foo(&'a self) -> Self::Bar; diff --git a/src/test/run-pass/issues/issue-44056.rs b/src/test/ui/issues/issue-44056.rs similarity index 97% rename from src/test/run-pass/issues/issue-44056.rs rename to src/test/ui/issues/issue-44056.rs index 50fe99970668..b2f0e917749d 100644 --- a/src/test/run-pass/issues/issue-44056.rs +++ b/src/test/ui/issues/issue-44056.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // only-x86_64 // no-prefer-dynamic // compile-flags: -Ctarget-feature=+avx -Clto diff --git a/src/test/run-pass/issues/issue-44247.rs b/src/test/ui/issues/issue-44247.rs similarity index 97% rename from src/test/run-pass/issues/issue-44247.rs rename to src/test/ui/issues/issue-44247.rs index c1204aa43a22..29c4b977d65d 100644 --- a/src/test/run-pass/issues/issue-44247.rs +++ b/src/test/ui/issues/issue-44247.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] trait T { type X; diff --git a/src/test/run-pass/issues/issue-44373.rs b/src/test/ui/issues/issue-44373-2.rs similarity index 97% rename from src/test/run-pass/issues/issue-44373.rs rename to src/test/ui/issues/issue-44373-2.rs index 2ed79dd89c8e..ccc99f0ecc48 100644 --- a/src/test/run-pass/issues/issue-44373.rs +++ b/src/test/ui/issues/issue-44373-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // compile-flags: -Z borrowck=compare diff --git a/src/test/run-pass/issues/issue-44402.rs b/src/test/ui/issues/issue-44402.rs similarity index 98% rename from src/test/run-pass/issues/issue-44402.rs rename to src/test/ui/issues/issue-44402.rs index 6863fdbb5669..f44f261041a3 100644 --- a/src/test/run-pass/issues/issue-44402.rs +++ b/src/test/ui/issues/issue-44402.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![feature(never_type)] #![feature(exhaustive_patterns)] diff --git a/src/test/run-pass/issues/issue-4464.rs b/src/test/ui/issues/issue-4464.rs similarity index 97% rename from src/test/run-pass/issues/issue-4464.rs rename to src/test/ui/issues/issue-4464.rs index fda063e8ddd2..a1b2040450ad 100644 --- a/src/test/run-pass/issues/issue-4464.rs +++ b/src/test/ui/issues/issue-4464.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-44730.rs b/src/test/ui/issues/issue-44730.rs similarity index 97% rename from src/test/run-pass/issues/issue-44730.rs rename to src/test/ui/issues/issue-44730.rs index 0f4d2e174fc0..61b266e2b7e2 100644 --- a/src/test/run-pass/issues/issue-44730.rs +++ b/src/test/ui/issues/issue-44730.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass //! dox #![deny(missing_docs)] diff --git a/src/test/run-pass/issues/issue-44851.rs b/src/test/ui/issues/issue-44851.rs similarity index 97% rename from src/test/run-pass/issues/issue-44851.rs rename to src/test/ui/issues/issue-44851.rs index 1e9f4d3e4e54..4a302be05e70 100644 --- a/src/test/run-pass/issues/issue-44851.rs +++ b/src/test/ui/issues/issue-44851.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass macro_rules! a { () => { "a" } } diff --git a/src/test/run-pass/issues/issue-45425.rs b/src/test/ui/issues/issue-45425.rs similarity index 97% rename from src/test/run-pass/issues/issue-45425.rs rename to src/test/ui/issues/issue-45425.rs index dfc7c8a8795b..2b5b7ff18155 100644 --- a/src/test/run-pass/issues/issue-45425.rs +++ b/src/test/ui/issues/issue-45425.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] use std::ops::Add; diff --git a/src/test/run-pass/issues/issue-46959.rs b/src/test/ui/issues/issue-46959.rs similarity index 97% rename from src/test/run-pass/issues/issue-46959.rs rename to src/test/ui/issues/issue-46959.rs index baaff2d4581d..0e585378fa7f 100644 --- a/src/test/run-pass/issues/issue-46959.rs +++ b/src/test/ui/issues/issue-46959.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![deny(non_camel_case_types)] #[allow(dead_code)] diff --git a/src/test/run-pass/issues/issue-46964.rs b/src/test/ui/issues/issue-46964.rs similarity index 98% rename from src/test/run-pass/issues/issue-46964.rs rename to src/test/ui/issues/issue-46964.rs index ad4d6e3ac1a6..61c5a1a56ced 100644 --- a/src/test/run-pass/issues/issue-46964.rs +++ b/src/test/ui/issues/issue-46964.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass mod my_mod { #[derive(Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash)] pub struct Name<'a> { diff --git a/src/test/run-pass/issues/issue-47673.rs b/src/test/ui/issues/issue-47673.rs similarity index 97% rename from src/test/run-pass/issues/issue-47673.rs rename to src/test/ui/issues/issue-47673.rs index 1e733a0c4d6f..7cef527acd79 100644 --- a/src/test/run-pass/issues/issue-47673.rs +++ b/src/test/ui/issues/issue-47673.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(unused_imports)] use {{}, {}}; diff --git a/src/test/run-pass/issues/issue-47703-1.rs b/src/test/ui/issues/issue-47703-1.rs similarity index 98% rename from src/test/run-pass/issues/issue-47703-1.rs rename to src/test/ui/issues/issue-47703-1.rs index 7cf34d3cd428..446ca27a53e7 100644 --- a/src/test/run-pass/issues/issue-47703-1.rs +++ b/src/test/ui/issues/issue-47703-1.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![feature(nll)] diff --git a/src/test/run-pass/issues/issue-47703-tuple.rs b/src/test/ui/issues/issue-47703-tuple.rs similarity index 97% rename from src/test/run-pass/issues/issue-47703-tuple.rs rename to src/test/ui/issues/issue-47703-tuple.rs index ee9d7f38dbea..c2b4673a09fb 100644 --- a/src/test/run-pass/issues/issue-47703-tuple.rs +++ b/src/test/ui/issues/issue-47703-tuple.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![feature(nll)] diff --git a/src/test/run-pass/issues/issue-47703.rs b/src/test/ui/issues/issue-47703.rs similarity index 97% rename from src/test/run-pass/issues/issue-47703.rs rename to src/test/ui/issues/issue-47703.rs index 17353c8e59f7..084eab05d68e 100644 --- a/src/test/run-pass/issues/issue-47703.rs +++ b/src/test/ui/issues/issue-47703.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![feature(nll)] diff --git a/src/test/run-pass/issues/issue-47722.rs b/src/test/ui/issues/issue-47722.rs similarity index 98% rename from src/test/run-pass/issues/issue-47722.rs rename to src/test/ui/issues/issue-47722.rs index a8e0faeed060..39fbe33d823f 100644 --- a/src/test/run-pass/issues/issue-47722.rs +++ b/src/test/ui/issues/issue-47722.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Tests that automatic coercions from &mut T to *mut T diff --git a/src/test/run-pass/issues/issue-47789.rs b/src/test/ui/issues/issue-47789.rs similarity index 97% rename from src/test/run-pass/issues/issue-47789.rs rename to src/test/ui/issues/issue-47789.rs index 349aa4f73abc..57957aed3db7 100644 --- a/src/test/run-pass/issues/issue-47789.rs +++ b/src/test/ui/issues/issue-47789.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/run-pass/issues/issue-4830.rs b/src/test/ui/issues/issue-4830.rs similarity index 97% rename from src/test/run-pass/issues/issue-4830.rs rename to src/test/ui/issues/issue-4830.rs index 5140162ae435..274305dfa78e 100644 --- a/src/test/run-pass/issues/issue-4830.rs +++ b/src/test/ui/issues/issue-4830.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-48551.rs b/src/test/ui/issues/issue-48551.rs similarity index 98% rename from src/test/run-pass/issues/issue-48551.rs rename to src/test/ui/issues/issue-48551.rs index b4059d1fd751..2da1059d74a1 100644 --- a/src/test/run-pass/issues/issue-48551.rs +++ b/src/test/ui/issues/issue-48551.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // Regression test for #48551. Covers a case where duplicate candidates // arose during associated type projection. diff --git a/src/test/run-pass/issues/issue-51655.rs b/src/test/ui/issues/issue-51655.rs similarity index 97% rename from src/test/run-pass/issues/issue-51655.rs rename to src/test/ui/issues/issue-51655.rs index 17c04a4097a8..d8c69fd3d55b 100644 --- a/src/test/run-pass/issues/issue-51655.rs +++ b/src/test/ui/issues/issue-51655.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] const PATH_DOT: &[u8] = &[b'.']; diff --git a/src/test/run-pass/issues/issue-5353.rs b/src/test/ui/issues/issue-5353.rs similarity index 98% rename from src/test/run-pass/issues/issue-5353.rs rename to src/test/ui/issues/issue-5353.rs index d9d078313316..0c5de871f098 100644 --- a/src/test/run-pass/issues/issue-5353.rs +++ b/src/test/ui/issues/issue-5353.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-5572.rs b/src/test/ui/issues/issue-5572.rs similarity index 97% rename from src/test/run-pass/issues/issue-5572.rs rename to src/test/ui/issues/issue-5572.rs index 02f12a0303a5..90465668d810 100644 --- a/src/test/run-pass/issues/issue-5572.rs +++ b/src/test/ui/issues/issue-5572.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-5754.rs b/src/test/ui/issues/issue-5754.rs similarity index 97% rename from src/test/run-pass/issues/issue-5754.rs rename to src/test/ui/issues/issue-5754.rs index 9b9026304598..d60edcad0db6 100644 --- a/src/test/run-pass/issues/issue-5754.rs +++ b/src/test/ui/issues/issue-5754.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(improper_ctypes)] diff --git a/src/test/run-pass/issues/issue-5884.rs b/src/test/ui/issues/issue-5884.rs similarity index 97% rename from src/test/run-pass/issues/issue-5884.rs rename to src/test/ui/issues/issue-5884.rs index 82d87d9d270a..d0c898e3f36b 100644 --- a/src/test/run-pass/issues/issue-5884.rs +++ b/src/test/ui/issues/issue-5884.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-5900.rs b/src/test/ui/issues/issue-5900.rs similarity index 97% rename from src/test/run-pass/issues/issue-5900.rs rename to src/test/ui/issues/issue-5900.rs index edb4ead53e42..4dc5a6123883 100644 --- a/src/test/run-pass/issues/issue-5900.rs +++ b/src/test/ui/issues/issue-5900.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-5950.rs b/src/test/ui/issues/issue-5950.rs similarity index 97% rename from src/test/run-pass/issues/issue-5950.rs rename to src/test/ui/issues/issue-5950.rs index 239f96804139..6cdd36efaa71 100644 --- a/src/test/run-pass/issues/issue-5950.rs +++ b/src/test/ui/issues/issue-5950.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-6341.rs b/src/test/ui/issues/issue-6341.rs similarity index 97% rename from src/test/run-pass/issues/issue-6341.rs rename to src/test/ui/issues/issue-6341.rs index ca79e304b15f..758e33536bd3 100644 --- a/src/test/run-pass/issues/issue-6341.rs +++ b/src/test/ui/issues/issue-6341.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 #[derive(PartialEq)] diff --git a/src/test/run-pass/issues/issue-6470.rs b/src/test/ui/issues/issue-6470.rs similarity index 97% rename from src/test/run-pass/issues/issue-6470.rs rename to src/test/ui/issues/issue-6470.rs index a23a6532b155..00eb3b6348d3 100644 --- a/src/test/run-pass/issues/issue-6470.rs +++ b/src/test/ui/issues/issue-6470.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(improper_ctypes)] diff --git a/src/test/run-pass/issues/issue-6557.rs b/src/test/ui/issues/issue-6557.rs similarity index 97% rename from src/test/run-pass/issues/issue-6557.rs rename to src/test/ui/issues/issue-6557.rs index 886d13c4c6f1..ddec8b3f9345 100644 --- a/src/test/run-pass/issues/issue-6557.rs +++ b/src/test/ui/issues/issue-6557.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-6898.rs b/src/test/ui/issues/issue-6898.rs similarity index 98% rename from src/test/run-pass/issues/issue-6898.rs rename to src/test/ui/issues/issue-6898.rs index b9a3a24585b5..20174f241a40 100644 --- a/src/test/run-pass/issues/issue-6898.rs +++ b/src/test/ui/issues/issue-6898.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass // pretty-expanded FIXME #23616 use std::mem; diff --git a/src/test/run-pass/issues/issue-6991.rs b/src/test/ui/issues/issue-6991.rs similarity index 97% rename from src/test/run-pass/issues/issue-6991.rs rename to src/test/ui/issues/issue-6991.rs index 3d1108e84ad2..1de1f8b1a865 100644 --- a/src/test/run-pass/issues/issue-6991.rs +++ b/src/test/ui/issues/issue-6991.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/src/test/run-pass/issues/issue-7268.rs b/src/test/ui/issues/issue-7268.rs similarity index 97% rename from src/test/run-pass/issues/issue-7268.rs rename to src/test/ui/issues/issue-7268.rs index 961f90dfc377..b4d0255fa10b 100644 --- a/src/test/run-pass/issues/issue-7268.rs +++ b/src/test/ui/issues/issue-7268.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-7607-2.rs b/src/test/ui/issues/issue-7607-2.rs similarity index 97% rename from src/test/run-pass/issues/issue-7607-2.rs rename to src/test/ui/issues/issue-7607-2.rs index fa97eae7cb33..9c05717c1d71 100644 --- a/src/test/run-pass/issues/issue-7607-2.rs +++ b/src/test/ui/issues/issue-7607-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-7673-cast-generically-implemented-trait.rs b/src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs similarity index 98% rename from src/test/run-pass/issues/issue-7673-cast-generically-implemented-trait.rs rename to src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs index 6e5a6c551ebf..d3af62e8836c 100644 --- a/src/test/run-pass/issues/issue-7673-cast-generically-implemented-trait.rs +++ b/src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-8171-default-method-self-inherit-builtin-trait.rs b/src/test/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs similarity index 97% rename from src/test/run-pass/issues/issue-8171-default-method-self-inherit-builtin-trait.rs rename to src/test/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs index 9ddc63a208ae..27859e1a2aef 100644 --- a/src/test/run-pass/issues/issue-8171-default-method-self-inherit-builtin-trait.rs +++ b/src/test/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-8398.rs b/src/test/ui/issues/issue-8398.rs similarity index 97% rename from src/test/run-pass/issues/issue-8398.rs rename to src/test/ui/issues/issue-8398.rs index 2458e91daeb8..36c24be5fce3 100644 --- a/src/test/run-pass/issues/issue-8398.rs +++ b/src/test/ui/issues/issue-8398.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-8521.rs b/src/test/ui/issues/issue-8521.rs similarity index 97% rename from src/test/run-pass/issues/issue-8521.rs rename to src/test/ui/issues/issue-8521.rs index b70a79bed3ca..724ac962f3b3 100644 --- a/src/test/run-pass/issues/issue-8521.rs +++ b/src/test/ui/issues/issue-8521.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass trait Foo1 {} trait A {} diff --git a/src/test/run-pass/issues/issue-8578.rs b/src/test/ui/issues/issue-8578.rs similarity index 98% rename from src/test/run-pass/issues/issue-8578.rs rename to src/test/ui/issues/issue-8578.rs index 4cf39e3e5f05..0c5cbf24700a 100644 --- a/src/test/run-pass/issues/issue-8578.rs +++ b/src/test/ui/issues/issue-8578.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/src/test/run-pass/issues/issue-9110.rs b/src/test/ui/issues/issue-9110.rs similarity index 97% rename from src/test/run-pass/issues/issue-9110.rs rename to src/test/ui/issues/issue-9110.rs index 150df681ea4d..86314659fcbe 100644 --- a/src/test/run-pass/issues/issue-9110.rs +++ b/src/test/ui/issues/issue-9110.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 #![allow(non_snake_case)] diff --git a/src/test/run-pass/issues/issue-9243.rs b/src/test/ui/issues/issue-9243.rs similarity index 97% rename from src/test/run-pass/issues/issue-9243.rs rename to src/test/ui/issues/issue-9243.rs index f079268d6e10..3f5721a3df7a 100644 --- a/src/test/run-pass/issues/issue-9243.rs +++ b/src/test/ui/issues/issue-9243.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // Regression test for issue 9243 #![allow(non_upper_case_globals)] diff --git a/src/test/run-pass/issues/issue-9249.rs b/src/test/ui/issues/issue-9249.rs similarity index 97% rename from src/test/run-pass/issues/issue-9249.rs rename to src/test/ui/issues/issue-9249.rs index eb66c565a78c..3013fde84dcc 100644 --- a/src/test/run-pass/issues/issue-9249.rs +++ b/src/test/ui/issues/issue-9249.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-9719.rs b/src/test/ui/issues/issue-9719.rs similarity index 98% rename from src/test/run-pass/issues/issue-9719.rs rename to src/test/ui/issues/issue-9719.rs index f98eba1cfdf8..c3845dd61066 100644 --- a/src/test/run-pass/issues/issue-9719.rs +++ b/src/test/ui/issues/issue-9719.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/rust-2018/auxiliary/trait-import-suggestions.rs b/src/test/ui/rust-2018/auxiliary/trait-import-suggestions.rs new file mode 100644 index 000000000000..611fa83854b9 --- /dev/null +++ b/src/test/ui/rust-2018/auxiliary/trait-import-suggestions.rs @@ -0,0 +1,15 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +pub trait Baz { + fn baz(&self) { } +} + +impl Baz for u32 { } diff --git a/src/test/ui/rust-2018/trait-import-suggestions.rs b/src/test/ui/rust-2018/trait-import-suggestions.rs new file mode 100644 index 000000000000..d603d8212ed3 --- /dev/null +++ b/src/test/ui/rust-2018/trait-import-suggestions.rs @@ -0,0 +1,41 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// edition:2018 +// aux-build:trait-import-suggestions.rs +// compile-flags:--extern trait-import-suggestions + +mod foo { + mod foobar { + pub(crate) trait Foobar { + fn foobar(&self) { } + } + + impl Foobar for u32 { } + } + + pub(crate) trait Bar { + fn bar(&self) { } + } + + impl Bar for u32 { } + + fn in_foo() { + let x: u32 = 22; + x.foobar(); + } +} + +fn main() { + let x: u32 = 22; + x.bar(); + x.baz(); + let y = u32::from_str("33"); +} diff --git a/src/test/ui/rust-2018/trait-import-suggestions.stderr b/src/test/ui/rust-2018/trait-import-suggestions.stderr new file mode 100644 index 000000000000..59fe7b958e34 --- /dev/null +++ b/src/test/ui/rust-2018/trait-import-suggestions.stderr @@ -0,0 +1,43 @@ +error[E0599]: no method named `foobar` found for type `u32` in the current scope + --> $DIR/trait-import-suggestions.rs:32:11 + | +LL | x.foobar(); + | ^^^^^^ + | + = help: items from traits can only be used if the trait is in scope + = note: the following trait is implemented but not in scope, perhaps add a `use` for it: + `use crate::foo::foobar::Foobar;` + +error[E0599]: no method named `bar` found for type `u32` in the current scope + --> $DIR/trait-import-suggestions.rs:38:7 + | +LL | x.bar(); + | ^^^ + | + = help: items from traits can only be used if the trait is in scope +help: the following trait is implemented but not in scope, perhaps add a `use` for it: + | +LL | use crate::foo::Bar; + | + +error[E0599]: no method named `baz` found for type `u32` in the current scope + --> $DIR/trait-import-suggestions.rs:39:7 + | +LL | x.baz(); + | ^^^ + +error[E0599]: no function or associated item named `from_str` found for type `u32` in the current scope + --> $DIR/trait-import-suggestions.rs:40:13 + | +LL | let y = u32::from_str("33"); + | ^^^^^^^^^^^^^ function or associated item not found in `u32` + | + = help: items from traits can only be used if the trait is in scope +help: the following trait is implemented but not in scope, perhaps add a `use` for it: + | +LL | use std::str::FromStr; + | + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/span/issue-36530.stderr b/src/test/ui/span/issue-36530.stderr index 78d81ad04930..98361c879ff6 100644 --- a/src/test/ui/span/issue-36530.stderr +++ b/src/test/ui/span/issue-36530.stderr @@ -6,7 +6,7 @@ LL | #[foo] //~ ERROR is currently unknown to the compiler | = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: non-builtin inner attributes are unstable (see issue #38356) +error[E0658]: non-builtin inner attributes are unstable (see issue #54726) --> $DIR/issue-36530.rs:15:5 | LL | #![foo] //~ ERROR is currently unknown to the compiler diff --git a/src/tools/cargo b/src/tools/cargo index de314a8b2d45..ad6e5c0037d8 160000 --- a/src/tools/cargo +++ b/src/tools/cargo @@ -1 +1 @@ -Subproject commit de314a8b2d45bce4958fc23939c5e4286e31621c +Subproject commit ad6e5c0037d88602a1c95051e42b392ed5ffcbe8