about summary refs log tree commit diff
path: root/src/tools/tidy
AgeCommit message (Collapse)AuthorLines
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.
2018-09-01tidy: unstable_book.rs: Clean up directory iterationJosh Triplett-4/+3
Drop unnecessary .into_iter() (also fixing a clippy warning), and use path functions to handle file extensions.
2018-09-01tidy: Avoid "let ref mut = ..."Josh Triplett-6/+6
This also eliminates a clippy warning.
2018-09-01tidy: Use "const" instead of "static, and remove implied `'static` lifetimesJosh Triplett-6/+6
Dropping the redundant lifetimes also eliminates a clippy warning.
2018-09-01tidy: extdeps.rs: Avoid an unnecessary collect()Josh Triplett-2/+1
2018-09-01tidy: extdeps.rs: Clean up loop iteration to use "for"Josh Triplett-2/+1
Also eliminates a clippy lint.
2018-09-01tidy: cargo.rs: Clean up loop to use "for" instead of "while let"Josh Triplett-2/+1
Eliminates a clippy warning. Also drop the unnecessary `.peekable()`.
2018-09-01tidy: Clean up argument handlingJosh Triplett-5/+2
Use `.nth(n)` rather than `.skip(n).next()` (also fixes a clippy warning), and use `.into()` and a type signature rather than `PathBuf::from`.
2018-09-01tidy: Use is_empty() instead of len testsJosh Triplett-2/+2
Fixes a clippy warning, and improves readability.
2018-09-01tidy: Use chars for single-character patternsJosh Triplett-12/+12
Fixes the clippy "single_char_pattern" lint, and (marginally) improves performance.
2018-08-25Update Cargo submoduleAlex Crichton-1/+5
Also update Cargo's dependencies while we're at it
2018-08-25Auto merge of #53609 - bemeurer:tidy-ctfe, r=RalfJungbors-2/+0
Tidy CFTE/MIRI Fixes #53596
2018-08-24Rollup merge of #53617 - joshtriplett:tidy-no-license-header, r=Mark-Simulacrumkennytm-53/+0
tidy: Stop requiring a license header Previously approved in rust-lang/rust#43498 ; update tidy to match.
2018-08-23Removed librustc/mir/interpret and librustc_mir/interpreter from tidy skip listBernardo Meurer-2/+0
2018-08-23use String::new() instead of String::from(""), "".to_string(), "".to_owned() ↵Matthias Krüger-1/+1
or "".into()
2018-08-22tidy: Stop requiring a license headerJosh Triplett-53/+0
Previously approved in rust-lang/rust#43498 ; update tidy to match.
2018-08-18Use the new Entry::or_default method where possible.Eduard-Mihai Burtescu-4/+4
2018-08-17Rollup merge of #53399 - varkor:ignore-non-md-unstable_book, r=nikomatsakiskennytm-0/+1
Tidy: ignore non-Markdown files when linting for the Unstable Book Previously, any file would be assumed a `.md`, which is annoying when files like `.DS_STORE` slip in and then cause tidy errors.
2018-08-15Tidy: ignore non-Markdown files when linting for the Unstable Bookvarkor-0/+1
2018-08-14Add lldb to the buildTom Tromey-0/+2
This optionally adds lldb (and clang, which it needs) to the build. Because rust uses LLVM 7, and because clang 7 is not yet released, a recent git master version of clang is used. The lldb that is used includes the Rust plugin. lldb is only built when asked for, or when doing a nightly build on macOS. Only macOS is done for now due to difficulties with the Python dependency.
2018-08-14Tidy no longer fails when there are no files or subdirectories in a test ↵David Wood-9/+11
directory.
2018-08-09Deny future duplication of rustc-ap-syntaxAlex Crichton-1/+1
Enable the tidy check to forbid this! Closes #53006