about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2021-03-01Rollup merge of #82578 - camsteffen:diag-items, r=oli-obkJoshua Nelson-41/+42
Add some diagnostic items for Clippy
2021-03-01:arrow_up: rust-analyzerLaurențiu Nicola-17/+15
2021-03-01Use a crate to produce rustdoc tree comparisons instead of the `diff` commandMichael Howell-13/+71
It doesn't exist on Windows, so we bring our own unified diff implementation. Fixes #82409
2021-03-01Use diagnostic items in into_iter_collectionsCameron Steffen-24/+22
2021-03-01Auto merge of #78360 - tmiasko:storage-markers, r=wesleywiser,oli-obkbors-0/+1
Remove storage markers if they won't be used during code generation The storage markers constitute a substantial portion of all MIR statements. At the same time, for builds without any optimizations, the storage markers have no further use during and after MIR optimization phase. If storage markers are not necessary for code generation, remove them.
2021-03-01Rollup merge of #82507 - jyn514:tidy-windows, r=Mark-SimulacrumYuki Okushi-0/+5
Rename the `tidy` binary to `rust-tidy` This avoids naming collisions, particularly on Windows where the dynamic library variable is PATH and setting it causes the in-tree `tidy` to take precedence over the HTML tidy used by compiletest. This doesn't change the x.py interface in any way, it still accepts `x.py test tidy` and prints error messages about `tidy`. It only changes the name of the file on disk. Fixes https://github.com/rust-lang/rust/issues/82501.
2021-02-28Auto merge of #82603 - RalfJung:miri, r=RalfJungbors-7/+10
update Miri Pulls in a fix for unnecessary rebuilds that basically breaks Playground.
2021-02-28update MiriRalf Jung-7/+10
2021-02-28Update tracing to 0.1.25Tomasz Miąsko-1/+2
2021-02-28Auto merge of #82594 - nagisa:nagisa/remove-rumprun, r=petrochenkovbors-1/+0
Remove the x86_64-rumprun-netbsd target Herein we remove the target from the compiler and the code from libstd intended to support the now-defunct rumprun project. Closes #81514
2021-02-28compiletest: run mir-opt tests with -C opt-level=1Tomasz Miąsko-0/+1
The storage markers are removed at -C opt-level=0 and as a result output of mir opt tests vary based on used optimization level. Use opt-level=1 for mir-opt tests to avoid the issue.
2021-02-27Rollup merge of #82537 - wesleywiser:update_measureme, r=oli-obkDylan DPC-0/+1
Update measureme dependency to the latest version This version adds the ability to use `rdpmc` hardware-based performance counters instead of wall-clock time for measuring duration. This also introduces a dependency on the `perf-event-open-sys` crate on Linux which is used when using hardware counters. r? ```@oli-obk```
2021-02-27Remove the x86_64-rumprun-netbsd targetSimonas Kazlauskas-1/+0
Closes #81514
2021-02-26Add missing diagnostic item SymbolsCameron Steffen-17/+20
2021-02-27Rollup merge of #82490 - ehuss:update-cargo, r=ehussDylan DPC-0/+0
Update cargo 11 commits in bf5a5d5e5d3ae842a63bfce6d070dfd438cf6070..572e201536dc2e4920346e28037b63c0f4d88b3c 2021-02-18 15:49:14 +0000 to 2021-02-24 16:51:20 +0000 - Pass the error message format to rustdoc (rust-lang/cargo#9128) - Fix test target_in_environment_contains_lower_case (rust-lang/cargo#9203) - Fix hang on broken stderr. (rust-lang/cargo#9201) - Make it more clear which module is being tested when running cargo test (rust-lang/cargo#9195) - Updates to edition handling. (rust-lang/cargo#9184) - Add --cfg and --rustc-cfg flags to output compiler configuration (rust-lang/cargo#9002) - Run rustdoc doctests relative to the workspace (rust-lang/cargo#9105) - Add support for [env] section in .cargo/config.toml (rust-lang/cargo#9175) - Add schema field and `features2` to the index. (rust-lang/cargo#9161) - Document the default location where cargo install emitting build artifacts (rust-lang/cargo#9189) - Do not exit prematurely if anything failed installing. (rust-lang/cargo#9185)
2021-02-27Rollup merge of #82394 - lnicola:rust-analyzer-2021-02-22, r=jonas-schievinkDylan DPC-17/+17
:arrow_up: rust-analyzer
2021-02-27Rollup merge of #82057 - upsuper-forks:cstr, r=davidtwco,wesleywiserDylan DPC-0/+1
Replace const_cstr with cstr crate This PR replaces the `const_cstr` macro inside `rustc_data_structures` with `cstr` macro from [cstr](https://crates.io/crates/cstr) crate. The two macros basically serve the same purpose, which is to generate `&'static CStr` from a string literal. `cstr` is better because it validates the literal at compile time, while the existing `const_cstr` does it at runtime when `debug_assertions` is enabled. In addition, the value `cstr` generates can be used in constant context (which is seemingly not needed anywhere currently, though).
2021-02-26Rollup merge of #81940 - jhpratt:stabilize-str_split_once, r=m-ou-seGuillaume Gomez-2/+2
Stabilize str_split_once Closes #74773
2021-02-25Update measureme dependency to the latest versionWesley Wiser-0/+1
This version adds the ability to use `rdpmc` hardware-based performance counters instead of wall-clock time for measuring duration. This also introduces a dependency on the `perf-event-open-sys` crate on Linux which is used when using hardware counters.
2021-02-25Rollup merge of #82502 - jyn514:tidy, r=petrochenkovAaron Hill-6/+12
Only look for HTML `tidy` when running rustdoc tests This avoids printing lots of unnecessary errors, as well as making the test suite slightly faster. This doesn't fix the windows bug tracked by https://github.com/rust-lang/rust/issues/82501, though. r? `@petrochenkov`
2021-02-25Rollup merge of #82467 - ojeda:tidy-normalize-safety-comments, r=kennytmAaron Hill-1/+1
library: Normalize safety-for-unsafe-block comments Almost all safety comments are of the form `// SAFETY:`, so normalize the rest and fix a few of them that should have been a `/// # Safety` section instead. Furthermore, make `tidy` only allow the uppercase form. While currently `tidy` only checks `core`, it is a good idea to prevent `core` from drifting to non-uppercase comments, so that later we can start checking `alloc` etc. too. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-02-25Fix Clippy build and testflip1995-3/+6
2021-02-25Merge commit '928e72dd10749875cbd412f74bfbfd7765dbcd8a' into clippyupflip1995-3273/+6454
2021-02-24Rename the `tidy` binary to `rust-tidy`Joshua Nelson-0/+5
This avoids naming collisions, particularly on Windows where the dynamic library variable is PATH and setting it causes the in-tree `tidy` to take precedence over the HTML tidy used by compiletest.
2021-02-24Only look for `tidy` when running rustdoc testsJoshua Nelson-6/+12
This avoids printing lots of unnecessary errors, as well as making the test suite slightly faster.
2021-02-24Update cargoEric Huss-0/+0
2021-02-24library: Normalize safety-for-unsafe-block commentsMiguel Ojeda-1/+1
Almost all safety comments are of the form `// SAFETY:`, so normalize the rest and fix a few of them that should have been a `/// # Safety` section instead. Furthermore, make `tidy` only allow the uppercase form. While currently `tidy` only checks `core`, it is a good idea to prevent `core` from drifting to non-uppercase comments, so that later we can start checking `alloc` etc. too. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-02-23Rollup merge of #82311 - aDotInTheVoid:jsondocck-improvements, r=jyn514Dylan DPC-17/+56
Jsondocck improvements Adds 2 new commands, ```@is``` and ```@set`.`` ```@is``` works like ```@has`,`` except instead of checking if any value matches, it checks that there is exactly one value, and it matches. This allows more precise testing. ```@set``` gets a value, and saves it to be used later. This makes it possible to check that an item appears in the correct module. Once this lands, the rest of the test suite can be upgraded to use these. cc ``@CraftSpider`` ``@rustbot`` modify labels: +T-rustdoc +A-rustdoc-json +A-testsuite
2021-02-22Simplify Error Handling.Nixon Enraght-Moony-29/+21
2021-02-22:arrow_up: rust-analyzerLaurențiu Nicola-17/+17
2021-02-22Auto merge of #79979 - GuillaumeGomez:rustdoc-gui-tests, r=Mark-Simulacrumbors-1/+94
Rustdoc gui tests This is a reopening of #70533. For this first version, there will be no screenshot comparison. Also, a big change compared to the previous version: the tests are now hosted in the rust repository directly. Since there is no image, it's pretty lightweight to say the least. So now, only remains the nodejs script to run the tests and the tests themselves. Just one thing is missing: where should I put the documentation for these tests? I'm not sure where would be the best place for that. The doc will contain important information like the documentation of the framework used and how to install it (`npm install browser-ui-test`, but still needs to be put somewhere so no one is lost). We'd also need to install the package when running the CI too. For now, it runs as long as we have nodejs installed, but I think we don't it to run in all nodejs targets? cc `@jyn514` r? `@Mark-Simulacrum`
2021-02-21Extract string_to_value to its own functionNixon Enraght-Moony-17/+13
2021-02-21Apply suggestions from code reviewNixon Enraght-Moony-3/+3
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-02-21Add new rustdoc-gui test suiteGuillaume Gomez-1/+94
2021-02-21Auto merge of #82340 - kennytm:fix-82254, r=Mark-Simulacrumbors-16/+34
Fix some Python2→3 error in publish_toolstate.py Fix #82254. The error is primarily due to `data = json.dumps(…)` producing a `str` instead of a `bytes`, which are different types on Python 3. But then `urllib.request.urlopen(…, data)` cannot accept `data` as a `str`, thus the error. This PR added `.encode()` call after `json.dumps()` to ensure we are sending `bytes`. Additionally, we added type annotation to ensure things can statically type-check with `mypy` on both Python 2 and 3.
2021-02-21Auto merge of #82253 - RalfJung:miri, r=RalfJungbors-10/+7
update Miri Fixes Miri breakage (no issue was created as the toolstate tracking is currently broken: https://github.com/rust-lang/rust/issues/82254)
2021-02-20Fix some Python2->3 error in publish_toolstate.py by type-checking itkennytm-16/+34
2021-02-20update MiriRalf Jung-10/+7
2021-02-20Implement using @set valuesNixon Enraght-Moony-5/+17
2021-02-20Implement @setNixon Enraght-Moony-0/+23
2021-02-20Add @is command to jsondocckNixon Enraght-Moony-1/+17
2021-02-19Move try_print_query_stack to rustc_interface.Camille GILLOT-3/+1
2021-02-19Rollup merge of #82275 - ehuss:update-cargo, r=ehussDylan DPC-0/+0
Update cargo 8 commits in ab64d1393b5b77c66b6534ef5023a1b89ee7bf64..bf5a5d5e5d3ae842a63bfce6d070dfd438cf6070 2021-02-10 00:19:10 +0000 to 2021-02-18 15:49:14 +0000 - Propagate `lto=off` harder (rust-lang/cargo#9182) - refactor: make deref intentions more straightforward (rust-lang/cargo#9183) - Update link for no_std attribute. (rust-lang/cargo#9174) - Remove mention of --message-format taking multiple values (rust-lang/cargo#9173) - Emit warning on env variable case mismatch (rust-lang/cargo#9169) - Implement Rustdoc versioning checks (rust-lang/cargo#8640) - Bump to 0.53.0, update changelog (rust-lang/cargo#9168) - Prevent testsuite from loading config out of sandbox. (rust-lang/cargo#9164)
2021-02-19Rollup merge of #82238 - petrochenkov:nocratemod, r=Aaron1011Dylan DPC-3/+6
ast: Keep expansion status for out-of-line module items I.e. whether a module `mod foo;` is already loaded from a file or not. This is a pre-requisite to correctly treating inner attributes on such modules (https://github.com/rust-lang/rust/issues/81661). With this change AST structures for `mod` items diverge even more for AST structure for the crate root, which previously used `ast::Mod`. Therefore this PR removes `ast::Mod` from `ast::Crate` in the first commit, these two things are sufficiently different from each other, at least at syntactic level. Customization points for visiting a "`mod` item or crate root" were also removed from AST visitors (`fn visit_mod`). `ast::Mod` itself was refactored away in the second commit in favor of `ItemKind::Mod(Unsafe, ModKind)`.
2021-02-18Update cargoEric Huss-0/+0
2021-02-18Rollup merge of #82215 - TaKO8Ki:replace-if-let-while-let, r=varkorDylan DPC-1/+1
Replace if-let and while-let with `if let` and `while let` This pull request replaces if-let and while-let with `if let` and `while let`. closes https://github.com/rust-lang/rust/issues/82205
2021-02-18ast: Keep expansion status for out-of-line module itemsVadim Petrochenkov-3/+6
Also remove `ast::Mod` which is mostly redundant now
2021-02-18Rollup merge of #82203 - c410-f3r:tests-tests-tests, r=Dylan-DPCYuki Okushi-2/+2
Move some tests to more reasonable directories - 4 cc #81941
2021-02-17Auto merge of #81993 - flip1995:clippyup, r=Manishearthbors-610/+1802
Update Clippy Biweekly Clippy update r? `@Manishearth`
2021-02-17replace if-let and while-let with `if let` and `while let`Takayuki Maeda-1/+1