about summary refs log tree commit diff
path: root/src/tools/tidy
AgeCommit message (Collapse)AuthorLines
2019-03-28Auto merge of #59336 - gnzlbg:hint_black_box, r=alexcrichtonbors-0/+4
Moves test::black_box to core::hint and fix black_box on wasm32 and asm.js This changes removes a cyclic dependency between the "test" and "libtest" crates, where "libtest" depends on "test" for "black_box", but "test" depends on "libtest" for everything else. I've chosen the "hint" module because there seems to be enough consensus in the discussion of RFC2360 that this module is where such an intrinsic would belong, but this PR does not implement that RFC! If that RFC ever gets merged, the API, docs, etc. of this API will need to change. This PR just move the implementation of the already existing API. For backwards compatibility reasons I've chosen to also keep the "test" feature gate for these instead of adding a new feature gate. If we change the feature gate, we'll potentially all benchmarks, and while that's something that we could do, it seems unnecessary to do that now - if RFC2360 gets merged, we'll need to do that anyways. Backwards compatibility is also why we continue to re-export "black_box" from the "test" crate. This PR also fixes black_box on the wasm32 target, which now supports inline assembly, and uses volatile loads on the asm.js target. r? @Amanieu (cc @rust-lang/libs)
2019-03-26Add exception for libcore/hint.rs to pal lint of tidy scriptgnzlbg-0/+4
2019-03-26Rollup merge of #59315 - Zoxc:move-query, r=oli-obkMazdak Farrokhzad-0/+1
Add no_hash to query macro and move some queries over r? @oli-obk
2019-03-25SGX target: fix std unit testsJethro Beekman-0/+1
2019-03-20Allow itertoolsJohn Kåre Alsaker-0/+1
2019-03-05Create a derive macro for HashStableJohn Kåre Alsaker-0/+1
2019-03-02Rollup merge of #58842 - mati865:53005, r=alexcrichtonkennytm-1/+1
Forbid duplicating Cargo as a dependency Fixes https://github.com/rust-lang/rust/issues/53005
2019-03-01Forbid duplicating Cargo as a dependencyMateusz Mikuła-1/+1
2019-03-01tidy: deny(rust_2018_idioms)Mazdak Farrokhzad-8/+9
2019-02-27Fix tidy check for language and library featuresDan Robertson-10/+12
2019-02-18Add constant_time_eq to license exception list of tidy toolflip1995-0/+1
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-3/+3
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-11Allow platform specific testsOliver Scherer-0/+1
2019-02-10tools: doc commentsAlexander Regueiro-3/+3
2019-02-04Transition tidy and unstable-book-gento 2018 editionHirokazu Hata-1/+2
2019-01-30Add exception for new dependency in license checkerJames Munns-0/+1
2019-01-29Update stdsimdgnzlbg-0/+2
2019-01-26Bump bootstrap compiler to 1.33 betaMark Rousskov-1/+1
2019-01-25Rebase to the llvm-project monorepoJosh Stone-0/+1
The new git submodule src/llvm-project is a monorepo replacing src/llvm and src/tools/{clang,lld,lldb}. This also serves as a rebase for these projects to the new 8.x branch from trunk. The src/llvm-emscripten fork is unchanged for now.
2019-01-13Added check for copyright notices.Alexander Regueiro-2/+10
2019-01-13Cosmetic improvementsAlexander Regueiro-114/+122
2019-01-13Update the const fn tracking issue to the new metabugvarkor-6/+5
2018-12-28Update cargo, rls, miriEric Huss-0/+5
2018-12-25Remove licensesMark Rousskov-130/+0
2018-12-19FIXME(44217) remove fixme because the allocator logic was removed, but ↵Niv Kaminer-1/+1
platform specific code remains
2018-12-14std: Use `rustc_demangle` from crates.ioAlex Crichton-0/+1
No more need to duplicate the demangling routine between crates.io and the standard library, we can use the exact same one!
2018-12-11std: Depend directly on crates.io cratesAlex Crichton-8/+2
Ever since we added a Cargo-based build system for the compiler the standard library has always been a little special, it's never been able to depend on crates.io crates for runtime dependencies. This has been a result of various limitations, namely that Cargo doesn't understand that crates from crates.io depend on libcore, so Cargo tries to build crates before libcore is finished. I had an idea this afternoon, however, which lifts the strategy from #52919 to directly depend on crates.io crates from the standard library. After all is said and done this removes a whopping three submodules that we need to manage! The basic idea here is that for any crate `std` depends on it adds an *optional* dependency on an empty crate on crates.io, in this case named `rustc-std-workspace-core`. This crate is overridden via `[patch]` in this repository to point to a local crate we write, and *that* has a `path` dependency on libcore. Note that all `no_std` crates also depend on `compiler_builtins`, but if we're not using submodules we can publish `compiler_builtins` to crates.io and all crates can depend on it anyway! The basic strategy then looks like: * The standard library (or some transitive dep) decides to depend on a crate `foo`. * The standard library adds ```toml [dependencies] foo = { version = "0.1", features = ['rustc-dep-of-std'] } ``` * The crate `foo` has an optional dependency on `rustc-std-workspace-core` * The crate `foo` has an optional dependency on `compiler_builtins` * The crate `foo` has a feature `rustc-dep-of-std` which activates these crates and any other necessary infrastructure in the crate. A sample commit for `dlmalloc` [turns out to be quite simple][commit]. After that all `no_std` crates should largely build "as is" and still be publishable on crates.io! Notably they should be able to continue to use stable Rust if necessary, since the `rename-dependency` feature of Cargo is soon stabilizing. As a proof of concept, this commit removes the `dlmalloc`, `libcompiler_builtins`, and `libc` submodules from this repository. Long thorns in our side these are now gone for good and we can directly depend on crates.io! It's hoped that in the long term we can bring in other crates as necessary, but for now this is largely intended to simply make it easier to manage these crates and remove submodules. This should be a transparent non-breaking change for all users, but one possible stickler is that this almost for sure breaks out-of-tree `std`-building tools like `xargo` and `cargo-xbuild`. I think it should be relatively easy to get them working, however, as all that's needed is an entry in the `[patch]` section used to build the standard library. Hopefully we can work with these tools to solve this problem! [commit]: https://github.com/alexcrichton/dlmalloc-rs/commit/28ee12db813a3b650a7c25d1c36d2c17dcb88ae3
2018-12-10Update Cargo submodule and its dependenciesAlex Crichton-1/+17
Hopefully just another routine update! So far this starts to enable the `std::arch` in stage0 builds of rustc. This means that we may need stage0/not(stage0) in stdsimd itself, but more and more code is starting to use `std::arch` so I think it's time to start shifting the balance of work here.
2018-12-09Remove compile-fail-fulldeps test suiteVadim Petrochenkov-6/+3
2018-12-07use top level `fs` functions where appropriateAndy Russell-22/+10
This commit replaces many usages of `File::open` and reading or writing with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code complexity, and will improve performance for most reads, since the functions allocate the buffer to be the size of the file. I believe that this commit will not impact behavior in any way, so some matches will check the error kind in case the file was not valid UTF-8. Some of these cases may not actually care about the error.
2018-12-07Add x86_64-fortanix-unknown-sgx target to libstd and dependenciesJethro Beekman-0/+1
The files src/libstd/sys/sgx/*.rs are mostly copied/adapted from the wasm target. This also updates the dlmalloc submodule to the very latest version.
2018-12-03Update cargoEric Huss-0/+1
2018-11-26libcore: Add va_list lang item and intrinsicsDan Robertson-0/+7
- Add the llvm intrinsics used to manipulate a va_list. - Add the va_list lang item in order to allow implementing VaList in libcore.
2018-11-22Move Cargo.{toml,lock} to the repository root directory.Eduard-Mihai Burtescu-7/+7
2018-11-17Update Cargo submoduleAlex Crichton-0/+2
Brings in some fixes and stabilizations!
2018-11-11std: Delete the `alloc_system` crateAlex Crichton-2/+0
This commit deletes the `alloc_system` crate from the standard distribution. This unstable crate is no longer needed in the modern stable global allocator world, but rather its functionality is folded directly into the standard library. The standard library was already the only stable location to access this crate, and as a result this should not affect any stable code.
2018-11-02Use `jemalloc-sys` on Linux and OSX compilersAlex Crichton-1/+1
This commit adds opt-in support to the compiler to link to `jemalloc` in the compiler. When activated the compiler will depend on `jemalloc-sys`, instruct jemalloc to unprefix its symbols, and then link to it. The feature is activated by default on Linux/OSX compilers for x86_64/i686 platforms, and it's not enabled anywhere else for now. We may be able to opt-in other platforms in the future! Also note that the opt-in only happens on CI, it's otherwise unconditionally turned off by default. Closes #36963
2018-11-02Remove all jemalloc-related contentAlex Crichton-4/+0
This commit removes all jemalloc related submodules, configuration, etc, from the bootstrap, from the standard library, and from the compiler. This will be followed up with a change to use jemalloc specifically as part of rustc on blessed platforms.
2018-10-23fix typos in various placesMatthias Krüger-1/+1
2018-10-19ignore target foldersDouglas Campos-0/+1
when you try to edit a crate inside the compiler tree using rls, it generates it's assets under target/rls, then tidy is trying to validate line lenghts for C headers, etc
2018-09-21Update CargoAlex Crichton-0/+1
This commit brings in a few Cargo updates * Updates Cargo with experimental HTTP/2 support - a post on the forums will be made about testing this when available. * Bumps Cargo's own version number
2018-09-07Rollup merge of #53895 - joshtriplett:tidy-tidy, r=nikomatsakiskennytm-57/+44
tidy: Cleanups and clippy warning fixes This eliminates various clippy warnings in the tidy tool, as well as making some related cleanups. These changes should not introduce any functional differences.
2018-09-04Breaking change upgradesMark Rousskov-1/+3
2018-09-03Add memmap crate to tidy whitelist.Michael Woerister-0/+1
2018-09-01tidy: features.rs: Remove a redundant .containsJosh Triplett-4/+0
The match expression immediately below it checks the same condition.
2018-09-01tidy: features.rs: Use splitn rather than a complex sliceJosh Triplett-1/+1
2018-09-01tidy: features.rs: collect_lib_features: SimplifyJosh Triplett-8/+5
Use `if let` to simplify a match, and use `contains_key` instead of `get`.
2018-09-01tidy: Use an inclusive range rather than a +1 boundJosh Triplett-1/+1
This improves readability and eliminates a clippy warning.
2018-09-01tidy: Eliminate an unnecessary .into_iter()Josh Triplett-1/+1
2018-09-01tidy: deps: Hoist a complex multi-line if condition into a letJosh Triplett-2/+3
This makes the code more readable, and eliminates a clippy warning.