about summary refs log tree commit diff
path: root/src/tools/tidy
AgeCommit message (Collapse)AuthorLines
2022-11-05Rollup merge of #103956 - JakobDegen:tidy-bless, r=jyn514Matthias Krüger-7/+11
Make mir opt unused file check blessable Makes it slightly nicer to work with. Can't write automated test but tested locally via ``` $ touch src/test/mir-opt/random $ x test tidy // shows failure $ x test tidy --bless // file gone ``` r? `@jyn514`
2022-11-04Rollup merge of #103958 - chenyukang:yukang/fix-103951-count-limit, r=jyn514Matthias Krüger-26/+34
Test tidy should not count untracked paths towards entries limit Fixes #103951 r? `@jyn514`
2022-11-04test tidy should not count untracked paths towards entries limityukang-26/+34
2022-11-03Make mir opt unused file check blessableJakob Degen-7/+11
2022-11-03Move some tests from `src/test/ui` to more reasonable placesDeadbeef-1/+1
2022-11-02Ban dashes in miropt test file namesJakob Degen-3/+37
2022-11-02Rollup merge of #103275 - Manishearth:tinystrup, r=pnkfelixDylan DPC-0/+2
Update tinystr Tinystr has changed a ton since the old version and is much less unsafe, updated some of the dependencies that use it.
2022-10-31Detect unused files in `src/test/mir-opt` and error on them in tidy.Jakob Degen-0/+40
2022-10-23Update list of allowed cranelift dependenciesbjorn3-0/+2
2022-10-20Move some tests for more reasonable placesCaio-1/+1
2022-10-19allowlist displaydocManish Goregaokar-0/+1
2022-10-19Update licenseManish Goregaokar-0/+1
2022-10-14Also run alphabetical check in src and librarynils-6/+6
2022-10-14Rollup merge of #102938 - c410-f3r:here-we-go-again, r=petrochenkovDylan DPC-2/+2
Move some tests to more reasonable directories r? ``@petrochenkov``
2022-10-13Move some tests to more reasonable directoriesCaio-2/+2
2022-10-12tidy: error if a lang feature is already presentest31-126/+137
If a lang feature gets declared twice, like for example as a result of a mistake during stabilization, emit an error in tidy. Library features already have this logic.
2022-10-12Error if tidy-alphabetical-end was not foundNilstrieb-4/+19
2022-10-12Add tidy directoy `tidy-alphabetical`Nilstrieb-0/+101
It can be used to ensure that a list of things is sorted alphabetically. It goes off lines, but contains several heuristics to work with normal Rust code (looking at indentation, ignoring comments and attributes).
2022-10-10Rollup merge of #102846 - zertosh:update-syn, r=dtolnayMatthias Krüger-4/+6
update to syn-1.0.102 This update removes the only `.gitignore` found in `rustc-src`: vendor/syn/tests/.gitignore vendor/syn-1.0.91/tests/.gitignore vendor/syn-1.0.95/tests/.gitignore To check-in `rustc-src` for hermetic builds in environments with restrictive `.gitignore` policies, one has to remove these `tests/.gitignore` and patch the respective `.cargo-checksum.json`.`syn` >1.0.101 includes dtolnay/syn@3c49303bed7a, which removes its `tests/.gitignore`. Now the `syn` crates.io package has no `.gitignore`. [`rustc-src`'s `vendor`][] is produced from the root `Cargo.toml`, `src/tools/rust-analyzer/Cargo.toml`, `compiler/rustc_codegen_cranelift/Cargo.toml`, and `src/bootstrap/Cargo.toml`. `rustc_codegen_cranelift` does not use `syn`. [`rustc-src`'s `vendor`]: https://github.com/rust-lang/rust/blob/c0784109daa0/src/bootstrap/dist.rs#L934-L940 This was produced with: cargo update --package syn --precise 1.0.102 \ cargo update --package syn --precise 1.0.102 \ --manifest-path src/tools/rust-analyzer/Cargo.toml cargo update --package syn --precise 1.0.102 \ --manifest-path src/bootstrap/Cargo.toml
2022-10-10Rollup merge of #102055 - c410-f3r:moar-errors, r=petrochenkovDylan DPC-2/+2
Move some tests to more reasonable directories r? ``@petrochenkov``
2022-10-09update to syn-1.0.102Andres Suarez-4/+6
2022-10-01make tidy accept multi-line `rustc_const_unstable` attributesMaybe Waffle-1/+3
2022-09-29more clear function and variable namesRalf Jung-17/+14
2022-09-29make tidy dependency error less confusingRalf Jung-1/+1
2022-09-22Rollup merge of #102030 - est31:tidy_walk_no_reexport, r=Mark-SimulacrumYuki Okushi-21/+28
Don't crate-locally reexport walk functions in tidy I've moved the walk functions into their own module in #100591 and didn't want to make changing the paths everywhere in tidy part of the PRs diff, so I just reexported the functions locally. This PR removes the crate-local reexport and instead does module level reexports. I'm not sure how much it's worth it and whether the new state is better, idk. Feel free to have any opinion on this.
2022-09-20Move some tests to more reasonable directoriesCaio-2/+2
2022-09-19Don't crate-locally reexport walk functions in tidyest31-21/+28
2022-09-19Add all submodules to the list of directories tidy skipsest31-0/+6
I ran git config --file .gitmodules --name-only --get-regexp path and added all submodules that were not already in the list to it.
2022-09-17Allow using `tinyvec_macros` dependency, which was introduced by newer ↵Charles Lew-0/+2
version of `tinyvec`
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.