summary refs log tree commit diff
path: root/src/tools/tidy
AgeCommit message (Collapse)AuthorLines
2020-07-10Avoid "whitelist"Tamir Duberstein-33/+34
Other terms are more inclusive and precise.
2020-07-03Add rust-analyzer submoduleAleksey Kladov-0/+1
The current plan is that submodule tracks the `release` branch of rust-analyzer, which is updated once a week. rust-analyzer is a workspace (with a virtual manifest), the actual binary is provide by `crates/rust-analyzer` package. Note that we intentionally don't add rust-analyzer to `Kind::Test`, for two reasons. *First*, at the moment rust-analyzer's test suite does a couple of things which might not work in the context of rust repository. For example, it shells out directly to `rustup` and `rustfmt`. So, making this work requires non-trivial efforts. *Second*, it seems unlikely that running tests in rust-lang/rust repo would provide any additional guarantees. rust-analyzer builds with stable and does not depend on the specifics of the compiler, so changes to compiler can't break ra, unless they break stability guarantee. Additionally, rust-analyzer itself is gated on bors, so we are pretty confident that test suite passes.
2020-06-26Update mdbook.Eric Huss-3/+0
2020-06-26Remove mdbook-linkcheck.Eric Huss-3/+0
2020-06-26Rollup merge of #73729 - nellshamrell:disable-collectionsbenches-android, ↵Manish Goregaokar-0/+1
r=sfackler disable collectionbenches for android Fixes #73535 Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
2020-06-25Support configurable deny-warnings for all in-tree crates.Eric Huss-2/+0
2020-06-25add exception for liballoc benches to tidyNell Shamrell-0/+1
Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
2020-06-23Rollup merge of #73398 - oli-obk:const_raw_ptr_cmp, r=varkor,RalfJung,nagisaManish Goregaokar-4/+1
A way forward for pointer equality in const eval r? @varkor on the first commit and @RalfJung on the second commit cc #53020
2020-06-19Fix buildingJack Huey-1/+0
2020-06-19Implement fn_def_datumJack Huey-2/+1
2020-06-19Tidy got confused on `rustc_const_unstable` `issue`sOliver Scherer-4/+1
2020-05-27Auto merge of #72601 - JohnTitor:deps, r=Mark-Simulacrumbors-5/+0
Update transitive dependencies to remove some deps Similar to #71919, this removes some (duplicate) dependencies.
2020-05-26Update allowed crates listYuki Okushi-5/+0
2020-05-25Fix bug in shebang handlingRussell Cohen-0/+5
Shebang handling was too agressive in stripping out the first line in cases where it is actually _not_ a shebang, but instead, valid rust (#70528). This is a second attempt at resolving this issue (the first attempt was flawed, for, among other reasons, causing an ICE in certain cases (#71372, #71471). The behavior is now codified by a number of UI tests, but simply: For the first line to be a shebang, the following must all be true: 1. The line must start with `#!` 2. The line must contain a non whitespace character after `#!` 3. The next character in the file, ignoring comments & whitespace must not be `[` I believe this is a strict superset of what we used to allow, so perhaps a crater run is unnecessary, but probably not a terrible idea.
2020-05-22Replace `rustc_data_structures::sync::Once` with `OnceCell`Dylan MacKenzie-0/+1
2020-05-07Reintegrate chalk using chalk-solveJack Huey-0/+4
2020-05-02Add `psm` to the crate whitelistOliver Scherer-0/+2
2020-04-27No need to whitelist E0750 anymoreGuillaume Gomez-1/+1
2020-04-22Add checks to ensure that explanations have code examples using the error ↵Guillaume Gomez-15/+74
code and also that 'compile_fail' isn't mispelled
2020-04-05tidy: Update rustc-ap-syntax to -rustc_astIgor Matuszewski-1/+1
2020-04-02Add hash of source files in debug infoArlo Siemsen-1/+10
* Adds either an MD5 or SHA1 hash to the debug info. * Adds new unstable option `-Z src-hash-algorithm` to control the hashing algorithm.
2020-03-30rustc -> rustc_middle part 4 -- pacify tidyMazdak Farrokhzad-1/+1
2020-03-19Rollup merge of #69443 - ehuss:tidy-license, r=skade,Mark-SimulacrumMazdak Farrokhzad-340/+356
tidy: Better license checks. This implements some improvements to the license checks in tidy: * Use `cargo_metadata` instead of parsing vendored crates. This allows license checks to run without vendoring enabled, and allows the checks to run on PR builds. * Check for stale entries. * Check that the licenses for exceptions are what we think they are. * Verify exceptions do not leak into the runtime. Closes #62618 Closes #62619 Closes #63238 (I think) There are some substantive changes here. The follow licenses have changed from the original comments: * openssl BSD+advertising clause to Apache-2.0 * pest MPL2 to MIT/Apache-2.0 * smallvec MPL2 to MIT/Apache-2.0 * clippy lints MPL2 to MIT OR Apache-2.0
2020-03-13Auto merge of #67502 - Mark-Simulacrum:opt-catch, r=Mark-Simulacrumbors-0/+2
Optimize catch_unwind to match C++ try/catch This refactors the implementation of catching unwinds to allow LLVM to inline the "try" closure directly into the happy path, avoiding indirection. This means that the catch_unwind implementation is (after this PR) zero-cost unless a panic is thrown. https://rust.godbolt.org/z/cZcUSB is an example of the current codegen in a simple case. Notably, the codegen is *exactly the same* if `-Cpanic=abort` is passed, which is clearly not great. This PR, on the other hand, generates the following assembly: ```asm # -Cpanic=unwind: push rbx mov ebx,0x2a call QWORD PTR [rip+0x1c53c] # <happy> mov eax,ebx pop rbx ret mov rdi,rax call QWORD PTR [rip+0x1c537] # cleanup function call call QWORD PTR [rip+0x1c539] # <unfortunate> mov ebx,0xd mov eax,ebx pop rbx ret # -Cpanic=abort: push rax call QWORD PTR [rip+0x20a1] # <happy> mov eax,0x2a pop rcx ret ``` Fixes #64224, and resolves #64222.
2020-03-12tidy: Remove chalk-engine/chalk-macros.Eric Huss-2/+0
Removed in #69247 while this PR was waiting to merge.
2020-03-12tidy: Sort WHITELIST.Eric Huss-1/+1
2020-03-12tidy: Add `test` to RUNTIME_CRATES.Eric Huss-1/+1
2020-03-12tidy: Add some clarifying comments in license checks.Eric Huss-0/+5
2020-03-12tidy: Verify the runtime crates don't have license exceptions.Eric Huss-6/+57
2020-03-12tidy: check the licenses don't changeEric Huss-36/+60
2020-03-12tidy: Check if exceptions are no longer used.Eric Huss-12/+23
2020-03-12tidy: Use cargo_metadata for license checks.Eric Huss-308/+235
2020-03-11Rollup merge of #69603 - chrissimpkins:tidy-docs-update, r=petrochenkovMazdak Farrokhzad-2/+2
tidy: replace `make check` with `./x.py test` in documentation This PR includes a minor documentation update for tidy. It replaces the `make check` approach with `./x.py test` and describes how to execute the tidy checks (only) with ~~`./x.py test src/tools/tidy`~~ `./x.py test tidy`.
2020-03-09update tidy documentation to recommend ./x.py test tidyChris Simpkins-1/+1
2020-03-08Rollup merge of #69561 - JohnTitor:clean-up-unstable-book, r=Mark-SimulacrumMazdak Farrokhzad-30/+2
Clean up unstable book - #58402's feature was renamed to `tidy_test_never_used_anywhere_else` and it is now used for tidy only - `read_initializer` link is wrong and the doc should be auto-generated so removed - Add dummy doc for `link_cfg` - Stop generating `compiler_builtins_lib` doc in favor of b8ccc0f8a60ac16fdc00f4b2e36e1a5db8b78295 - Make `rustc_attrs` tracking issue "None"
2020-03-06fix various typosMatthias Krüger-1/+1
2020-03-02Ignore PAL lint for std::panickingMark Rousskov-0/+2
2020-02-29[tidy] update documentation from `make check` to `x.py test`Chris Simpkins-2/+2
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-29Stop generating `compiler_builtins_lib` docYuki Okushi-30/+2
2020-02-13Update books.Eric Huss-0/+1
2020-02-10submodules: update cargo from 9d32b7b01 to 3c53211c3Matthias Krüger-0/+1
Changes: ```` Update jobserver. Update tar. Emit report on error with Ztimings. Do not run `formats_source` if `rustfmt` is not available Fix rebuild_sub_package_then_while_package on HFS. Remove likely brittle test. Install rustfmt for testing in CI Fix build-std collisions. Fix BuildScriptOutput when a build script is run multiple times. Fix required-features using renamed dependencies. Fix using global options before an alias. Update changelog for 1.42. Bump to 0.44.0. Log rustfmt output if it fails; also do not check that rustfmt exists Update pretty_env_logger requirement from 0.3 to 0.4 Swap std::sync::mpsc channel with crossbeam_channel Fix tests on Linux/MacOS Fix typo. Add tests Deduplicate warnings about missing rustfmt Log entry 2: first implementation Refactor code Stabilize config-profile. Log entry 1 Format code Remove tempdir after install Keep existing package with git install Use non-ephemeral workspace Test that git install reads virtual manifest Fix failing test Search for root manifest with ephemeral workspaces Support out-dir in build section of Cargo configuration file ````
2020-01-29Use termize instead of term_sizeJohn Kåre Alsaker-1/+1
2020-01-21tidy: fix most clippy warningsMatthias Krüger-7/+7
2020-01-03Implement uncommon_codepoints lint.Charles Lew-0/+2
2019-12-26Add unicode-normalization to whitelist.Charles Lew-0/+1
2019-12-24Silence line length warningsMark Rousskov-3/+18
rustfmt tries its best already, we should not fight with it.
2019-12-22Format the worldMark Rousskov-506/+481
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-5/+13
2019-12-14Auto merge of #67136 - oli-obk:const_stability, r=Centrilbors-0/+1
Require stable/unstable annotations for the constness of all stable fns with a const modifier r? @RalfJung @Centril Every `#[stable]` const fn now needs either a `#[rustc_const_unstable]` attribute or a `#[rustc_const_stable]` attribute. You can't silently stabilize the constness of a function anymore.