about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2021-11-16Also check for feature gates in "src/test/rustdoc"Guillaume Gomez-0/+1
(cherry picked from commit d7afbf61d87bf345597624cccdfb1036439697b9)
2021-10-21Bump cargoMark Rousskov-0/+0
Includes rust-lang/cargo#9979: Fix fetching git repos after a force push.
2021-10-15Fix clippy with changed macro statement spansCameron Steffen-130/+126
2021-10-13Auto merge of #89555 - oli-obk:nll_member_constraint_diag, r=estebankbors-1/+1
Remove textual span from diagnostic string This is an unnecessary repetition, as the diagnostic prints the span anyway in the source path right below the message. I further removed the identification of the node, as that does not give any new information in any of the cases that are changed in tests. EDIT: also inserted a suggestion that other diagnostics were already emitting
2021-10-13Update clippy ui outputOli Scherer-1/+1
2021-10-13Auto merge of #89587 - camelid:all-candidates, r=petrochenkovbors-3/+3
Include rmeta candidates in "multiple matching crates" error Only dylib and rlib candidates were included in the error. I think the reason is that at the time this error was originally implemented, rmeta crate sources were represented different from dylib and rlib sources. I wrote up more detailed analysis in [this comment][1]. The new version of the code is also a bit easier to read and should be more robust to future changes since it uses `CrateSources::paths()`. I also changed the code to sort the candidates to make the output deterministic; added full stderr tests for the error; and added a long error code explanation. [1]: https://github.com/rust-lang/rust/pull/88675#issuecomment-935282436 cc `@Mark-Simulacrum` `@jyn514`
2021-10-13Auto merge of #89802 - ehuss:update-cargo, r=ehussbors-0/+2
Update cargo 7 commits in d56b42c549dbb7e7d0f712c51b39400260d114d4..c7957a74bdcf3b11e7154c1a9401735f23ebd484 2021-09-27 13:44:18 +0000 to 2021-10-11 20:17:07 +0000 - Add some more information to verbose version. (rust-lang/cargo#9968) - Skip all `cargo fix` that tends to write to registry cache. (rust-lang/cargo#9938) - Stabilize named profiles (rust-lang/cargo#9943) - Update git2 (rust-lang/cargo#9963) - Distinguish lockfile version req from normal dep in resolver error message (rust-lang/cargo#9847) - nit: Allocated slightly bigger vec than needed (rust-lang/cargo#9954) - Add shell completion for shorthand commands (rust-lang/cargo#9951)
2021-10-12Add long explanation for E0464Noah Lev-1/+1
The test is copied from `src/test/ui/crate-loading/crateresolve1.rs` and its auxiliary tests. I added it to the `compile_fail` code example check exemption list since it's hard if not impossible to reproduce this error in a standalone code example.
2021-10-12Test crate loading error stderrNoah Lev-2/+2
And remove E0464 from test-exemption list, since it now has a full test.
2021-10-12Update winapi shared features.Eric Huss-0/+2
Needed due to os_info.
2021-10-12Auto merge of #89770 - jkugelman:must-use-from-and-into, r=joshtriplettbors-150/+150
Add #[must_use] to From::from and Into::into Risk of churn: **High** Magic 8-Ball says: **Outlook not so good** I figured I'd put this out there. If we don't do it now maybe we save it for a rainy day. Parent issue: #89692 r? `@joshtriplett`
2021-10-11Update cargoEric Huss-0/+0
2021-10-11Add #[must_use] to From::from and Into::intoJohn Kugelman-150/+150
2021-10-11Rollup merge of #89710 - sireliah:e0482, r=GuillaumeGomezMatthias Krüger-1/+1
Add long explanation for error E0482 This is longer explanation for error E0482 in the #61137. Please take a look and leave some feedback!
2021-10-11Auto merge of #83908 - Flying-Toast:master, r=davidtwcobors-314/+15
Add enum_intrinsics_non_enums lint There is a clippy lint to prevent calling [`mem::discriminant`](https://doc.rust-lang.org/std/mem/fn.discriminant.html) with a non-enum type. I think the lint is worthy of being included in rustc, given that `discriminant::<T>()` where `T` is a non-enum has an unspecified return value, and there are no valid use cases where you'd actually want this. I've also made the lint check [variant_count](https://doc.rust-lang.org/core/mem/fn.variant_count.html) (#73662). closes #83899
2021-10-11Deprecate mem_discriminant_non_enumflip1995-314/+15
This lint has been uplifted and is now included in enum_intrinsics_non_enums.
2021-10-11:arrow_up: rust-analyzerLaurențiu Nicola-18/+17
2021-10-09Allow the E0482 to be testedsireliah-1/+1
2021-10-09Simplified 3 ifs found by clippy.Nicholas-Baron-12/+10
2021-10-09Simplified two printlns picked out by clippyNicholas-Baron-2/+2
2021-10-09Move check_debugger_output to the debugger moduleNicholas-Baron-64/+69
2021-10-09Move DebuggerCommands to its own fileNicholas-Baron-48/+71
2021-10-09Rollup merge of #89614 - cuviper:unicode-14, r=joshtriplettGuillaume Gomez-11/+21
Update to Unicode 14.0 The Unicode Standard [announced Version 14.0](https://home.unicode.org/announcing-the-unicode-standard-version-14-0/) on September 14, 2021, and this pull request updates the generated tables in `core` accordingly. This did require a little prep-work in `unicode-table-generator`. First, #81358 had modified the generated file instead of the tool, so that change is now reflected in the tool as well. Next, I found that the "Alphabetic" property in version 14 was panicking when generating a bitset, "cannot pack 264 into 8 bits". We've been using the skiplist for that anyway, so I changed this to fail gracefully. Finally, I confirmed that the tool still created the exact same tables for 13 before moving to 14.
2021-10-08Move read2_abbreviated function into read2.rsNicholas-Baron-70/+73
2021-10-08Auto merge of #89659 - workingjubilee:rollup-0vggc69, r=workingjubileebors-0/+138
Rollup of 8 pull requests Successful merges: - #87918 (Enable AutoFDO.) - #88137 (On macOS, make strip="symbols" not pass any options to strip) - #88772 (Fixed confusing wording on Result::map_or_else.) - #89025 (Implement `#[link_ordinal(n)]`) - #89082 (Implement #85440 (Random test ordering)) - #89288 (Wrapper for `-Z gcc-ld=lld` to invoke rust-lld with the correct flavor) - #89476 (Correct decoding of foreign expansions during incr. comp.) - #89622 (Use correct edition for panic in [debug_]assert!().) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-07Rollup merge of #89288 - rusticstuff:lld_wrapper, r=Mark-SimulacrumJubilee-0/+136
Wrapper for `-Z gcc-ld=lld` to invoke rust-lld with the correct flavor This PR adds an `lld-wrapper` tool which is installed as `ld` and `ld64` in `lib\rustlib\<host_target>\bin\gcc-ld` directory and whose sole purpose is to invoke `rust-lld` in the parent directory with the correct flavor. Lld decides which flavor to use from either the first two commandline arguments or from the name of the executable (`ld` for GNU/ld flavor, `ld64` for Darwin/Macos/ld64 flavor and so on). Symbolic links could not be used as they are not supported by rustup and on Windows. The wrapper replaces full copies of rust-lld which added some significant bloat. On UNIXish operating systems it exec rust-lld, on Windows it spawns it as a child process. Fixes #88869. r? ```@Mark-Simulacrum``` cc ```@nagisa``` ```@petrochenkov``` ```@1000teslas```
2021-10-07Rollup merge of #89082 - smoelius:master, r=kennytmJubilee-0/+2
Implement #85440 (Random test ordering) This PR adds `--shuffle` and `--shuffle-seed` options to `libtest`. The options are similar to the [`-shuffle` option](https://github.com/golang/go/blob/c894b442d1e5e150ad33fa3ce13dbfab1c037b3a/src/testing/testing.go#L1482-L1499) that was recently added to Go. Here are the relevant parts of the help message: ``` --shuffle Run tests in random order --shuffle-seed SEED Run tests in random order; seed the random number generator with SEED ... By default, the tests are run in alphabetical order. Use --shuffle or set RUST_TEST_SHUFFLE to run the tests in random order. Pass the generated "shuffle seed" to --shuffle-seed (or set RUST_TEST_SHUFFLE_SEED) to run the tests in the same order again. Note that --shuffle and --shuffle-seed do not affect whether the tests are run in parallel. ``` Is an RFC needed for this?
2021-10-08Auto merge of #89646 - camelid:miri-up, r=RalfJungbors-7/+11
Update Miri Fixes #89612. r? `@RalfJung`
2021-10-07Update MiriNoah Lev-7/+11
2021-10-07Auto merge of #89617 - flip1995:clippyup, r=Manishearthbors-2940/+4259
Update Clippy r? `@Manishearth`
2021-10-07Add wrapper for -Z gcc-ld=lld to invoke rust-lld with the correct flavorHans Kratz-0/+136
The wrapper is installed as `ld` and `ld64` in the `lib\rustlib\<host_target>\bin\gcc-ld` directory and its sole purpose is to invoke `rust-lld` in the parent directory with the correct flavor.
2021-10-07Rollup merge of #89477 - Nicholas-Baron:compute_diff_rs, r=Mark-SimulacrumGuillaume Gomez-142/+170
Move items related to computing diffs to a separate file Work towards #89475.
2021-10-07Merge commit 'b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b' into clippyupflip1995-2940/+4259
2021-10-06Let unicode-table-generator fail gracefully for bitsetsJosh Stone-4/+6
The "Alphabetic" property in Unicode 14 grew too big for the bitset representation, panicking "cannot pack 264 into 8 bits". However, we were already choosing the skiplist for that anyway, so this doesn't need to be a hard failure. That panic is now a returned `Err`, and then in `emit_codepoints` we automatically defer to skiplist.
2021-10-06Redo #81358 in unicode-table-generatorJosh Stone-7/+15
2021-10-06Rollup merge of #89506 - yaymukund:docblock-headings, r=GuillaumeGomezManish Goregaokar-9/+10
librustdoc: Use correct heading levels. Closes #89309 This fixes the `<h#>` header tags throughout the docs to reflect a semantic hierarchy. - I ran a script to manually check that we don't have any files with multiple `<h1>` tags. - Also checked that we never incorrectly nest e.g. a `<h2>` under an `<h3>`. - I also spot-checked a bunch of pages (`trait.Read`, `enum.Ordering`, `primitive.isize`, `trait.Iterator`).
2021-10-06Revert the rustc_error_codes changes.Mukund Lakshman-3/+3
2021-10-04Rollup merge of #89535 - notriddle:notriddle/error-index-generator-js, ↵Manish Goregaokar-34/+19
r=Mark-Simulacrum fix busted JavaScript in error index generator The old JavaScript didn't work. It filled the browser console with "e.previousElementSibling not defined" errors, because it didn't account for the example-wrap div that a newer version of rustdoc added. Additionally, it had copied versions of utility functions that had been optimized in rustdoc main.js. This version updates those.
2021-10-04Rollup merge of #88816 - dns2utf8:rustdoc_test_gui_2k_constants, ↵Manish Goregaokar-1/+1
r=GuillaumeGomez Rustdoc migrate to table so the gui can handle >2k constants Closes #88545. This PR adds a test for overlapping entries in the `item-table` https://github.com/rust-lang/rust/issues/88545 It currently includes the commit with the workaround from https://github.com/rust-lang/rust/pull/88776
2021-10-04Rollup merge of #89536 - RalfJung:miri, r=RalfJungJubilee-9/+7
update Miri Let's get the recent fixes and improvements shipped. r? ````@ghost````
2021-10-04heading_level: u32 -> heading_offset: HeadingOffsetMukund Lakshman-2/+2
2021-10-04No need to default offset since we always override it.Mukund Lakshman-1/+1
2021-10-04Change `Markdown(...)` to `Markdown { ... }`Mukund Lakshman-9/+9
2021-10-04update MiriRalf Jung-9/+7
2021-10-04fix busted JavaScript in error index generatorMichael Howell-34/+19
The old JavaScript didn't work. It filled the browser console with "e.previousElementSibling not defined" errors, because it didn't account for the example-wrap div that a newer version of rustdoc added. Additionally, it had copied versions of utility functions that had been optimized in rustdoc main.js. This version updates those.
2021-10-04librustdoc: Use correct heading levels.Mukund Lakshman-3/+4
- Avoid multiple <h1>s on a page. - The <h#> tags should follow a semantic hierarchy. - Cap at h6 (no h7)
2021-10-04:arrow_up: rust-analyzerLaurențiu Nicola-17/+18
2021-10-03Make write_rustdoc_diff a more generic functionNicholas-Baron-8/+21
2021-10-03Extract a portion of diff writing code to separate functionNicholas-Baron-38/+50
2021-10-03Auto merge of #88175 - camsteffen:let-desugar-span, r=Manishearthbors-14/+11
Add expansion to while desugar spans In the same vein as #88163, this reverts a change in Clippy behavior as a result of #80357 (and reverts some `#[allow]`s): This changes `clippy::blocks_in_if_conditions` to not fire on `while` loops. Though we might actually want Clippy to lint those cases, we should introduce the change purposefully, with tests, and possibly under a different lint name. The actual change here is to add a desugaring expansion to the spans when lowering a `while` loop. r? `@Manishearth`