summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2021-06-16Backport 572c405da063d2628378b74a8f659ce90e0e7779 to 1.53Mark Rousskov-2/+2
This fixes a Clippy ICE on rustc std and the crates.io codebase (and potentially others).
2021-06-14Pass RUSTC_FORCE_INCREMENTAL to auxiliary testsMark Rousskov-1/+3
This won't enable incremental if -Cincremental is not already passed, but is seemingly necessary in the presence of -Zincremental-verify-ich which does not check for incremental being enabled before accessing incremental data structures, leading to an ICE.
2021-06-14Soft disable incrementalMark Rousskov-2/+14
This disables incremental (i.e., -Cincremental) taking effect unless an environment variable, RUSTC_FORCE_INCREMENTAL, is set to 1 in the environment of the running rustc. Currently incremental causes errors for many users, and we do not have an expectation of being able to quickly fix these errors in a backportable way - so, for now, disable incremental entirely. The user can still opt-in, but this way the majority of users merely get slower builds, not broken builds.
2021-06-10Revert clippy's path to the copy intrinsics (part of reverting PR 81238).Felix S. Klock II-2/+2
2021-05-27Merge commit 'c64b3ffbb53a177e59876a6b7cc5eaff44d93913' into betaflip1995-4/+31
2021-05-05Add `yansi-term` as a permitted dependencyJoshua Nelson-0/+2
2021-05-05Update RLS and RustfmtIgor Matuszewski-5/+5
2021-04-30Update Mirihyd-dev-7/+9
2021-04-30Auto merge of #84401 - crlf0710:impl_main_by_path, r=petrochenkovbors-1/+1
Implement RFC 1260 with feature_name `imported_main`. This is the second extraction part of #84062 plus additional adjustments. This (mostly) implements RFC 1260. However there's still one test case failure in the extern crate case. Maybe `LocalDefId` doesn't work here? I'm not sure. cc https://github.com/rust-lang/rust/issues/28937 r? `@petrochenkov`
2021-04-29Auto merge of #84189 - jyn514:clippy-dev, r=Mark-Simulacrumbors-10/+3
Implement `x.py test src/tools/clippy --bless` - Add clippy_dev to the rust workspace Before, it would give an error that it wasn't either included or excluded from the workspace: ``` error: current package believes it's in a workspace when it's not: current: /home/joshua/rustc/src/tools/clippy/clippy_dev/Cargo.toml workspace: /home/joshua/rustc/Cargo.toml this may be fixable by adding `src/tools/clippy/clippy_dev` to the `workspace.members` array of the manifest located at: /home/joshua/rustc/Cargo.toml Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest. ``` - Change clippy's copy of compiletest not to special-case rust-lang/rust. Using OUT_DIR confused `clippy_dev` and it couldn't find the test outputs. This is one of the reasons why `cargo dev bless` used to silently do nothing (the others were that `CARGO_TARGET_DIR` and `PROFILE` weren't set appropriately). - Run clippy_dev on test failure I tested this by removing a couple lines from a stderr file, and they were correctly replaced. - Fix clippy_dev warnings
2021-04-28Rollup merge of #84531 - Smittyvb:foo-not-feature, r=Mark-SimulacrumJack Huey-0/+9
Ignore commented out lines when finding features This fixes #76246, where commented out lines were being detected as features by `tidy`, by ignoring those lines when looking for features. It's still not perfect, since it can be fooled by things like: ```rust /* #[unstable(feature = "foo", issue = "1234")] */ ``` But luckily that never happens in `rustc`, so `foo` now ceases to appear in the unstable book.
2021-04-28Rollup merge of #84484 - jyn514:check-tools, r=Mark-SimulacrumJack Huey-2/+2
Don't rebuild rustdoc and clippy after checking bootstrap This works by unconditionally passing -Z unstable-options to the compiler. This has no affect in practice since bootstrap doesn't use `deny(rustc::internal)`. Fixes https://github.com/rust-lang/rust/issues/82461. r? ```@Mark-Simulacrum```
2021-04-29Implement RFC 1260 with feature_name `imported_main`.Charles Lew-1/+1
2021-04-28:arrow_up: rust-analyzerLaurențiu Nicola-18/+22
2021-04-28Auto merge of #84498 - workingjubilee:update-grab-bag, r=Mark-Simulacrumbors-3/+2
Update grab bag This PR slides a bunch of crate versions forward until suddenly a bunch of deps fall out of the tree! In doing so this mostly picks up a version bump in the `redox_users` crate which makes most of the features default to optional. crossbeam-utils 0.7 => 0.8.3 (where applicable) https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-utils/CHANGELOG.md directories 3.0.1 => 3.0.2 ignore 0.4.16 => 0.4.17 tempfile 3.0.5 => tempfile 3.2 Removes constant_time_eq from deps exceptions Removes arrayref from deps exceptions And also removes: - blake2b_simd - const_fn (the package, not the feature) - constant_time_eq - redox_users 0.3.4 - rust-argon2
2021-04-27Update cargoEric Huss-0/+0
2021-04-27Rollup merge of #84610 - flip1995:clippyup, r=Manishearth,flip1995Dylan DPC-326/+416
Update Clippy Out of cycle sync: I want to get https://github.com/rust-lang/rust-clippy/pull/7129 into beta that is branched next week. This sync only adds one new feature in efc4c6c, which looks fine to me. Otherwise it only contains bug fixes and/or restricts lints further. r? `@Manishearth`
2021-04-27Rollup merge of #84132 - Manishearth:lldb-nonstandard, r=Mark-SimulacrumDylan DPC-1/+1
Ignore nonstandard lldb version strings in compiletest Fixes https://github.com/rust-lang/rust/issues/84131 Unsure if I should do the same for the Apple LLDB branch above.
2021-04-27Switch `rustc::internal` from deny to warnJoshua Nelson-2/+2
These should still obey deny-warnings.
2021-04-27Implement `x.py test src/tools/clippy --bless`Joshua Nelson-10/+3
- Add clippy_dev to the rust workspace Before, it would give an error that it wasn't either included or excluded from the workspace: ``` error: current package believes it's in a workspace when it's not: current: /home/joshua/rustc/src/tools/clippy/clippy_dev/Cargo.toml workspace: /home/joshua/rustc/Cargo.toml this may be fixable by adding `src/tools/clippy/clippy_dev` to the `workspace.members` array of the manifest located at: /home/joshua/rustc/Cargo.toml Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest. ``` - Change clippy's copy of compiletest not to special-case rust-lang/rust. Using OUT_DIR confused `clippy_dev` and it couldn't find the test outputs. This is one of the reasons why `cargo dev bless` used to silently do nothing (the others were that `CARGO_TARGET_DIR` and `PROFILE` weren't set appropriately). - Run clippy_dev on test failure I tested this by removing a couple lines from a stderr file, and they were correctly replaced. - Fix clippy_dev warnings
2021-04-27Merge commit '7c7683c8efe447b251d6c5ca6cce51233060f6e8' into clippyupflip1995-326/+416
2021-04-25Rollup merge of #84547 - RalfJung:max_const_fn, r=oli-obkDylan DPC-1/+1
Get rid of is_min_const_fn This removes the last trace of the min_const_fn mechanism by making the unsafety checker agnostic about whether something is a min or "non-min" const fn. It seems this distinction was used to disallow some features inside `const fn`, but that is the responsibility of the const checker, not of the unsafety checker. No test seems to even notice this change in the unsafety checker so I guess we are good... r? `@oli-obk` Cc https://github.com/rust-lang/rust/issues/84510
2021-04-25Add starting anchorSmittyvb-1/+1
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-04-25update MiriRalf Jung-9/+7
2021-04-25fix clippyRalf Jung-1/+1
2021-04-24Auto merge of #84525 - JohnTitor:rollup-t2qigt3, r=JohnTitorbors-1551/+4649
Rollup of 8 pull requests Successful merges: - #83519 (Implement a lint that highlights all moves larger than a configured limit) - #84105 (stabilize `core::array::{from_ref,from_mut}` in `1.53.0`) - #84179 (Explicitly implement `!Send` and `!Sync` for `sys::{Args, Env}`) - #84427 (Update Clippy) - #84459 (rustdoc: Turn `JsonRenderer::mod_item_in` into `unreachable!()`) - #84460 (rustdoc: Remove unnecessary `is_crate` field from doctree::Module and clean::Module) - #84464 (rustdoc: Get rid of `clean::TypeKind`) - #84518 (Clean up DOM strings) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-04-25Rollup merge of #84427 - flip1995:clippyup, r=ManishearthYuki Okushi-1551/+4649
Update Clippy r? ```@Manishearth``` Biweekly Clippy update.
2021-04-24Auto merge of #84412 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo, rls ## cargo 18 commits in 65d57e6f384c2317f76626eac116f683e2b63665..0ed318d182e465cd66071b91ac3d265af63ef8a1 2021-04-04 15:07:52 +0000 to 2021-04-23 20:54:54 +0000 - Restore crates.io's `SourceId` hash value to before (rust-lang/cargo#9397) - Fix loading `branch=master` patches in the v3 lock transition (rust-lang/cargo#9392) - Update changelog for 1.52 beta changes. (rust-lang/cargo#9396) - Fix build-std updating the index on every build. (rust-lang/cargo#9393) - Fix typo in profile docs (rust-lang/cargo#9386) - Fix disagreement about lockfile ordering on stable/nightly (rust-lang/cargo#9384) - Don't give a hard error when the end-user specifies RUSTC_BOOTSTRAP=crate_name (rust-lang/cargo#9365) - Fix rust-lang/cargo#9350 (cargo build -Z help is missing options) (rust-lang/cargo#9369) - an struct -&gt; a struct (rust-lang/cargo#9379) - Handle man pages better on Windows. (rust-lang/cargo#9378) - fix: better error message when dependency/workspace member missing (rust-lang/cargo#9368) - Fix typo in book (rust-lang/cargo#9376) - Don't re-use rustc cache when RUSTC_WRAPPER changes (rust-lang/cargo#9348) - doc: add split-debuginfo doc in config chapter (rust-lang/cargo#9372) - refactor: remove `CargoResultExt` (rust-lang/cargo#9367) - Track "CARGO" in environment fingerprint. (rust-lang/cargo#9363) - Update clippy lint allow set. (rust-lang/cargo#9356) - Fix 'suport' typo in documentation (rust-lang/cargo#9338) ## rls 3 commits in 32c0fe006dcdc13e1ca0ca31de543e4436c1299e..74d1800c25498689c5b5120a1e8495fce0cd0d0d 2021-04-12 11:21:12 +0000 to 2021-04-22 21:29:51 +0000 - Bump default integration test message timeout to 30s (rust-lang-nursery/rls#1731) - itertools = 0.9, fst = 0.4 (rust-lang-nursery/rls#1729) - Update cargo (rust-lang-nursery/rls#1728)
2021-04-24Ignore commented out lines when finding featuresSmitty-0/+9
2021-04-23Lock down rand_core 0.5.1 to specific featuresJubilee Young-0/+1
2021-04-23Use latest crossbeamJubilee Young-1/+1
2021-04-23Remove arrayref, constant_time_eq from depsJubilee Young-2/+0
2021-04-23Update cargo, rlsEric Huss-0/+0
2021-04-24Rollup merge of #84359 - lnicola:rust-analyzer-2021-04-20, r=jonas-schievinkYuki Okushi-18/+17
:arrow_up: rust-analyzer
2021-04-22Merge commit '98e2b9f25b6db4b2680a3d388456d9f95cb28344' into clippyupflip1995-1551/+4649
2021-04-21Use arrayvec 0.7, drop smallvec 0.6Jubilee Young-1/+0
With the arrival of min const generics, many alt-vec libraries have updated to use it in some way and arrayvec is no exception. Use the latest with minor refactoring. Also, rustc_workspace_hack is the only user of smallvec 0.6 in the entire tree, so drop it.
2021-04-20:arrow_up: rust-analyzerLaurențiu Nicola-18/+17
2021-04-19fix suggestion for unsized function parameterslcnr-2/+2
2021-04-18Auto merge of #78880 - CDirkx:not_supported, r=joshtriplettbors-2/+4
Add `Unsupported` to `std::io::ErrorKind` I noticed a significant portion of the uses of `ErrorKind::Other` in std is for unsupported operations. The notion that a specific operation is not available on a target (and will thus never succeed) seems semantically distinct enough from just "an unspecified error occurred", which is why I am proposing to add the variant `Unsupported` to `std::io::ErrorKind`. **Implementation**: The following variant will be added to `std::io::ErrorKind`: ```rust /// This operation is unsupported on this platform. Unsupported ``` `std::io::ErrorKind::Unsupported` is an error returned when a given operation is not supported on a platform, and will thus never succeed; there is no way for the software to recover. It will be used instead of `Other` where appropriate, e.g. on wasm for file and network operations. `decode_error_kind` will be updated to decode operating system errors to `Unsupported`: - Unix and VxWorks: `libc::ENOSYS` - Windows: `c::ERROR_CALL_NOT_IMPLEMENTED` - WASI: `wasi::ERRNO_NOSYS` **Stability**: This changes the kind of error returned by some functions on some platforms, which I think is not covered by the stability guarantees of the std? User code could depend on this behavior, expecting `ErrorKind::Other`, however the docs already mention: > Errors that are `Other` now may move to a different or a new `ErrorKind` variant in the future. It is not recommended to match an error against `Other` and to expect any additional characteristics, e.g., a specific `Error::raw_os_error` return value. The most recent variant added to `ErrorKind` was `UnexpectedEof` in `1.6.0` (almost 5 years ago), but `ErrorKind` is marked as `#[non_exhaustive]` and the docs warn about exhaustively matching on it, so adding a new variant per se should not be a breaking change. The variant `Unsupported` itself could be marked as `#[unstable]`, however, because this PR also immediately uses this new variant and changes the errors returned by functions I'm inclined to agree with the others in this thread that the variant should be insta-stabilized.
2021-04-18Fix clippy test using `ErrorKind`Christiaan Dirkx-2/+4
2021-04-18Auto merge of #84065 - c410-f3r:tests-tests-tests, r=petrochenkovbors-1/+1
Move some tests to more reasonable directories - 6 cc #73494 r? `@petrochenkov` git mv bad/bad-const-type.* static/ git mv bad/bad-crate-name.* extern git mv bad/bad-env-capture* fn/ git mv bad/bad-expr-lhs.* expr/ git mv bad/bad-expr-path* expr/ git mv bad/bad-extern-link-attrs.* extern/ git mv bad/bad-intrinsic-monomorphization.* intrinsics/ git mv bad/bad-lint-cap* lint/ git mv bad/bad-main.* fn git mv bad/bad-method-typaram-kind.* type/ git mv bad/bad-mid-path-type-params.* fn git mv bad/bad-module.* modules/ git mv bad/bad-sized.* type/ git mv bad/bad-type-env-capture.* fn
2021-04-18Auto merge of #84064 - hyd-dev:unknown-lints, r=petrochenkovbors-1/+1
Do not ignore path segments in the middle in `#[allow]`/`#[warn]`/`#[deny]`/`#[forbid]` attributes Fixes #83477.
2021-04-17Move some tests to more reasonable directories - 6Caio-1/+1
2021-04-17Rollup merge of #84150 - jsha:defer-search-js, r=GuillaumeGomezDylan DPC-6/+6
rustdoc: move some search code into search.js This reduces main.s from 3094 lines to 1587. Also it saves some bytes of download in the case where search isn't used. There were a fair number of variables that needed to be accessible in both main.js and search.js, but I didn't want to put too many symbols in the global namespace, so I consolidated much of the search-related state and functions into a new object `window.searchState`. Demo at https://hoffman-andrews.com/rust/move-search/std/?search=foo
2021-04-17Auto merge of #84261 - Aaron1011:error-dup-revisions, r=Mark-Simulacrumbors-9/+19
Error when compiletest is passed duplicate revisions Currently, we allow the user to write things like '// revisions: rpass1 rpass1', which will not test what they were intending to test.
2021-04-17Do not ignore path segments in the middle in ↵hyd-dev-1/+1
`#[allow]`/`#[warn]`/`#[deny]`/`#[forbid]` attributes
2021-04-16Error when compiletest is passed duplicate revisionsAaron Hill-9/+19
Currently, we allow the user to write things like '// revisions: rpass1 rpass1', which will not test what they were intending to test.
2021-04-17Update miri.Charles Lew-8/+8
2021-04-16Auto merge of #84217 - crlf0710:remove_main_attr_pure, r=petrochenkovbors-2/+2
Remove #[main] attribute. This removes the #[main] attribute support from the compiler according to the decisions within #29634. For existing use cases within test harness generation, replaced it with a newly-introduced internal attribute `#[rustc_main]`. This is first part extracted from #84062 . Closes #29634. r? `@petrochenkov`
2021-04-16Remove #[main] attribute.Charles Lew-2/+2