summary refs log tree commit diff
path: root/src/tools/tidy
AgeCommit message (Collapse)AuthorLines
2022-09-14tidy will not check coding style in bootstrap/targetyukang-0/+1
2022-09-07Fix error printing mistake in tidyest31-2/+1
2022-09-04Auto merge of #101250 - klensy:bump-deps-08-22, r=Dylan-DPCbors-5/+0
bump deps Update few crates to drop old/duplicated versions. updates pest* crates (no separate changelog, sadly: https://github.com/pest-parser/pest/releases), thiserror, handlebars(https://github.com/sunng87/handlebars-rust/blob/v4.3.3/CHANGELOG.md#433---2022-07-20) to drop old ones: ``` Removing block-buffer v0.7.3 Removing block-padding v0.1.5 Removing byte-tools v0.3.1 Removing byteorder v1.3.4 Removing digest v0.8.1 Removing fake-simd v0.1.2 Removing generic-array v0.12.4 Updating handlebars v4.1.0 -> v4.3.3 Removing opaque-debug v0.2.3 Updating pest v2.1.3 -> v2.3.0 Updating pest_derive v2.1.0 -> v2.3.0 Updating pest_generator v2.1.3 -> v2.3.0 Updating pest_meta v2.1.3 -> v2.3.0 Removing quick-error v2.0.0 Removing sha-1 v0.8.2 Updating thiserror v1.0.30 -> v1.0.33 Updating thiserror-impl v1.0.30 -> v1.0.33 ``` combine v4.6.3 -> v4.6.6: drops `use_std` features, addressed this comment: https://github.com/rust-lang/rust/blob/4fd4de7ea358ad6fc28c5780533ea8ccc09e1006/src/tools/rustc-workspace-hack/Cargo.toml#L80-L82 im-rc v15.0.0 -> v15.1.0 to drop rand_xoshiro duplicated version ``` Updating im-rc v15.0.0 -> v15.1.0 Removing rand_xoshiro v0.4.0 ```
2022-09-01Auto merge of #100869 - nnethercote:replace-ThinVec, r=spastorinobors-0/+1
Replace `rustc_data_structures::thin_vec::ThinVec` with `thin_vec::ThinVec` `rustc_data_structures::thin_vec::ThinVec` looks like this: ``` pub struct ThinVec<T>(Option<Box<Vec<T>>>); ``` It's just a zero word if the vector is empty, but requires two allocations if it is non-empty. So it's only usable in cases where the vector is empty most of the time. This commit removes it in favour of `thin_vec::ThinVec`, which is also word-sized, but stores the length and capacity in the same allocation as the elements. It's good in a wider variety of situation, e.g. in enum variants where the vector is usually/always non-empty. The commit also: - Sorts some `Cargo.toml` dependency lists, to make additions easier. - Sorts some `use` item lists, to make additions easier. - Changes `clean_trait_ref_with_bindings` to take a `ThinVec<TypeBinding>` rather than a `&[TypeBinding]`, because this avoid some unnecessary allocations. r? `@spastorino`
2022-08-31update few crates to drop old depsklensy-5/+0
2022-08-29Auto merge of #98626 - oli-obk:tracing, r=lcnrbors-0/+1
bump tracing version Bump tracing dependency to 0.1.35 to give us features like printing the return value of functions
2022-08-29Replace `rustc_data_structures::thin_vec::ThinVec` with `thin_vec::ThinVec`.Nicholas Nethercote-0/+1
`rustc_data_structures::thin_vec::ThinVec` looks like this: ``` pub struct ThinVec<T>(Option<Box<Vec<T>>>); ``` It's just a zero word if the vector is empty, but requires two allocations if it is non-empty. So it's only usable in cases where the vector is empty most of the time. This commit removes it in favour of `thin_vec::ThinVec`, which is also word-sized, but stores the length and capacity in the same allocation as the elements. It's good in a wider variety of situation, e.g. in enum variants where the vector is usually/always non-empty. The commit also: - Sorts some `Cargo.toml` dependency lists, to make additions easier. - Sorts some `use` item lists, to make additions easier. - Changes `clean_trait_ref_with_bindings` to take a `ThinVec<TypeBinding>` rather than a `&[TypeBinding]`, because this avoid some unnecessary allocations.
2022-08-28Auto merge of #100863 - ehuss:sunset-rls, r=Mark-Simulacrumbors-2/+1
Sunset RLS This removes RLS per the plan outlined in https://blog.rust-lang.org/2022/07/01/RLS-deprecation.html. This replaces the `rls` executable with a small program which will display an alert telling the user that RLS is no longer available. An overview of the changes here: * Removes the rls submodule and replaces it with a small stub program. * `rls` is removed from `./x.py install`. I do not think users running `install` will need the stub. * `rls` is removed from `./x.py test`, it doesn't have any tests. Other things of note: * I kept `DIST_REQUIRE_ALL_TOOLS` even though it is no longer needed, with the thought that it could be useful in the feature. However, I could remove it if desired. * I kept `extra_deps` in `tool_extended` (which allows tools to depend on other things), even though it is no longer needed. This can also be removed if desired. * ~~This keeps RLS in the macOS `pkg` installer and the Windows `msi` installer. I kinda lean towards removing it from those, but I'm not sure?~~ RLS has been removed from pkg and msi. * This does not remove the analysis component. It is not clear if we should keep this or not. RLS was the primary user, but I think there are a few users that have made tools around it. * There will be several followup steps after this PR: * Updating the toolstate repo to remove RLS. * Updating documentation, such as rustc-dev-guide, to remove references to RLS. The alert looks like this in VSCode: <img width="989" alt="image" src="https://user-images.githubusercontent.com/43198/185817530-930c5842-24b5-4162-a213-016a25810955.png"> In Sublime it looks similar. I would appreciate if others could help test with other editors such as vim or Emacs.
2022-08-27Sunset RLSEric Huss-2/+1
2022-08-28Auto merge of #92845 - Amanieu:std_personality, r=Mark-Simulacrumbors-0/+2
Move EH personality functions to std These were previously in the panic_unwind crate with dummy stubs in the panic_abort crate. However it turns out that this is insufficient: we still need a proper personality function even with -C panic=abort to handle the following cases: 1) `extern "C-unwind"` still needs to catch foreign exceptions with -C panic=abort to turn them into aborts. This requires landing pads and a personality function. 2) ARM EHABI uses the personality function when creating backtraces. The dummy personality function in panic_abort was causing backtrace generation to get stuck in a loop since the personality function is responsible for advancing the unwind state to the next frame. Fixes #41004
2022-08-27tidy: move directory traversal utility functions into dedicated moduleest31-62/+74
2022-08-27tidy: forbid since values for features that point to the current release or ↵est31-5/+55
future ones It's a common phenomenon that feature stabilizations don't make it into a particular release, but the version is still inaccurate. Often this leads to subsequent changes to adjust/correct the version. Instead, require people to put a placeholder that gets replaced during beta branching time with the current rust version. That way, there is no chance that an error can be introduced. Usage of the placeholder is required on the nightly channel, and forbidden on the stable and beta channels.
2022-08-27Rollup merge of #100924 - est31:closure_to_fn_ptr, r=Mark-SimulacrumYuki Okushi-1/+1
Smaller improvements of tidy and the unicode generator
2022-08-24Add new allowed depsbjorn3-0/+6
2022-08-23Use direct pointer to filter_dirs functionest31-1/+1
2022-08-23Relax tidy rules for OS-specific codeAmanieu d'Antras-0/+2
2022-08-23Rollup merge of #100862 - ehuss:tidy-crossbeam, r=Mark-SimulacrumMatthias Krüger-5/+3
tidy: remove crossbeam-utils crossbeam-utils is no longer needed now that scoped threads are available in 1.63.
2022-08-21tidy: remove crossbeam-utilsEric Huss-5/+3
2022-08-18tidy: check fluent files for styleXiretza-9/+6
2022-08-12Use an extensionless `x` script for non-WindowsJosh Stone-1/+1
2022-08-08Add `x.sh` and `x.ps1` shell scriptsJoshua Nelson-3/+5
This is a more ambitious version of https://github.com/rust-lang/rust/pull/98716. It still changes the shebang back to python3, for compatibility with non-Unix systems, but also adds alternative entrypoints for systems without `python3` installed. These scripts will be necessary for the rust entrypoint (#94829), so I see little downside in adding them early.
2022-07-29Update tracing to 0.1.31Oli Scherer-0/+1
2022-07-25Update list of allowed dependenciesbjorn3-3/+11
Cranelift started depending on a couple of new crates
2022-07-21`region_outlives_predicate` no snapshotlcnr-2/+2
2022-07-17Auto merge of #99283 - RalfJung:miri, r=RalfJungbors-0/+1
update Miri Fixes https://github.com/rust-lang/rust/issues/99224 r? `@ghost`
2022-07-17make tidy accept another permutation of this license stringRalf Jung-0/+1
2022-07-08fixes post rebaseJane Losare-Lusby-1/+1
2022-07-01Lint against executable files in the root directoryMark Rousskov-8/+24
This avoids accidental introduction (such as in #97488).
2022-06-30get rid of some tidy 'unnecessarily ignored' warningsRalf Jung-9/+4
2022-06-22Remove individual crate checks for bootstrap in tidyJoshua Nelson-83/+0
This duplicates a lot of checking, and doesn't seem particularly useful - these are already caught in review. Note that this still keeps the license check.
2022-06-21Add bootstrap to tidy checkJoshua Nelson-3/+105
2022-06-21Move some tests to more reasonable directoriesCaio-1/+1
2022-06-13Move testsCaio-2/+2
2022-06-03Fully stabilize NLLJack Huey-2/+2
2022-06-03Auto merge of #97497 - c410-f3r:z-errors, r=petrochenkovbors-2/+2
Move some tests to more reasonable places r? `@petrochenkov`
2022-05-28Move some tests to more reasonable placesCaio-2/+2
2022-05-27Update to rebased rustc-rayon 0.4Josh Stone-0/+1
2022-05-20Move testsCaio-2/+2
2022-05-08Move some tests to more reasonable placesCaio-2/+2
2022-04-28Add new repeat expr test.Oli Scherer-1/+1
Also add repeat expr test folder and move all related tests to it
2022-04-27Auto merge of #96179 - klensy:bump-deps-04-22, r=Mark-Simulacrumbors-1/+0
Bump deps Update few deps: First commit: vulnerable or yanked ones: * openssl-src 111.17.0+1.1.1m -> 111.18.0+1.1.1n vuln https://rustsec.org/advisories/RUSTSEC-2022-0014 * crossbeam-channel 0.5.2 -> 0.5.4 yanked: https://github.com/crossbeam-rs/crossbeam/pull/802 (https://github.com/crossbeam-rs/crossbeam/blob/crossbeam-channel-0.5.4/crossbeam-channel/CHANGELOG.md) * crossbeam-utils 0.8.6 -> 0.8.8 yanked: https://github.com/crossbeam-rs/crossbeam/security/advisories/GHSA-qc84-gqf4-9926 (https://github.com/crossbeam-rs/crossbeam/blob/crossbeam-utils-0.8.8/crossbeam-utils/CHANGELOG.md) Second commit: no notable changes, most of them touched only to remove other ones: * Updating ammonia v3.1.3 -> v3.2.0 * Updating html5ever v0.25.1 -> v0.26.0 * Updating markup5ever v0.10.1 -> v0.11.0 * Removing markup5ever_rcdom v0.1.0 * Updating phf v0.8.0 -> v0.10.1 * Updating phf_codegen v0.8.0 -> v0.10.0 * Updating phf_generator v0.8.0 -> v0.10.0 * Updating phf_shared v0.8.0 -> v0.10.0 * Updating rand v0.8.4 -> v0.8.5 * Removing rand_hc v0.3.0 * Removing rand_pcg v0.2.1 * Updating string_cache v0.8.0 -> v0.8.3 * Updating string_cache_codegen v0.5.1 -> v0.5.2 * Removing xml5ever v0.16.1 drops markup5ever_rcdom, rand_hc, rand_pcg, xml5ever versions * rand 0.8.4 -> 0.8.5 (https://github.com/rust-random/rand/blob/0.8.5/CHANGELOG.md#085---2021-08-20) Third one is perf oriented: * proc-macro2 v1.0.30 -> v1.0.37 https://github.com/dtolnay/proc-macro2/compare/1.0.30...1.0.37 (https://github.com/dtolnay/proc-macro2/releases, for example https://github.com/dtolnay/proc-macro2/releases/tag/1.0.36) * quote v1.0.7 -> v1.0.18 https://github.com/dtolnay/quote/compare/1.0.7...1.0.18 (https://github.com/dtolnay/quote/releases) multiple perf improvements: https://github.com/dtolnay/quote/releases/tag/1.0.16, https://github.com/dtolnay/quote/releases/tag/1.0.14, https://github.com/dtolnay/quote/releases/tag/1.0.11 * syn v1.0.80 -> v1.0.91 https://github.com/dtolnay/syn/compare/1.0.80...1.0.91 (https://github.com/dtolnay/syn/releases): didn't find good examples, but given, that there exist private api across `proc-macro2`, `quote` by the same author, *i think* it may take advantage of it.
2022-04-26Move some tests to more reasonable placesCaio-2/+2
2022-04-22proc-macro2 v1.0.30 -> v1.0.37klensy-1/+0
quote v1.0.7 -> v1.0.18 syn v1.0.80 -> v1.0.91
2022-04-22Auto merge of #96144 - c410-f3r:z-errors, r=petrochenkovbors-1/+1
Move some tests to more reasonable places cc #73494 r? `@petrochenkov`
2022-04-21Move some tests to more reasonable directoriesCaio-1/+1
2022-04-20Update cargoEric Huss-0/+3
2022-04-05tidy: add fluent dependencies to whitelistDavid Wood-1/+19
Unfortunately, fluent comes with a lot of dependencies and these need to be added to the whitelist. Signed-off-by: David Wood <david.wood@huawei.com>
2022-03-28Added another folder to the `ui` dirOli Scherer-1/+1
2022-03-21Rollup merge of #95085 - ouz-a:master5, r=jackh726Matthias Krüger-1/+1
Return err instead of ICE Having `escaping_bound_vars` results in ICE when trying to create `ty::Binder::dummy`, to avoid it we return err like the line above. I think this requires a more sophisticated fix, I would love to investigate if mentorship is available 🤓 Fixes #95023 and #85350
2022-03-21Return err instead of ICEouz-a-1/+1