about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
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-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`
2021-10-03Show how many tests are running in parallelStefan Schindler-1/+1
2021-10-02Make diangostic item names consistentCameron Steffen-193/+196
2021-10-02Add desugaring mark to while loopCameron Steffen-14/+11
2021-10-02Move items related to computing diffs to a separate fileNicholas-Baron-106/+109
2021-10-01Auto merge of #89449 - Manishearth:rollup-3alb61f, r=Manishearthbors-2/+1
Rollup of 7 pull requests Successful merges: - #85223 (rustdoc: Clarified the attribute which prompts the warning) - #88847 (platform-support.md: correct ARMv7+MUSL platform triple notes) - #88963 (Coerce const FnDefs to implement const Fn traits ) - #89376 (Fix use after drop in self-profile with llvm events) - #89422 (Replace whitespaces in doctests' name with dashes) - #89440 (Clarify a sentence in the documentation of Vec (#84488)) - #89441 (Normalize after substituting via `field.ty()`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-01Rollup merge of #88963 - fee1-dead:const-iterator, r=oli-obkManish Goregaokar-2/+1
Coerce const FnDefs to implement const Fn traits You can now pass a FnDef to a function expecting `F` where `F: ~const FnTrait`. r? ``@oli-obk`` ``@rustbot`` label T-compiler F-const_trait_impl
2021-10-01Auto merge of #88880 - cjgillot:no-krate, r=oli-obkbors-28/+27
Rework HIR API to make invocations of the hir_crate query harder. `hir_crate` forces the recomputation of queries that depend on it. This PR aims at avoiding useless invocations of `hir_crate` by making dependent code go through `tcx.hir()`.
2021-10-01Rollup merge of #87868 - Kixiron:packing-on-the-pounds, r=eddybManish Goregaokar-0/+1
Added -Z randomize-layout flag An implementation of #77316, it currently randomly shuffles the fields of `repr(rust)` types based on their `DefPathHash` r? ``@eddyb``
2021-09-30Rollup merge of #88782 - asquared31415:issue-79559, r=cjgillotManish Goregaokar-3/+4
Fix ICE when `start` lang item has wrong generics In my previous pr #87875 I missed the requirements on the `start` lang item due to its relative difficulty to test and opting for more conservative estimates. This fixes that by updating the requirement to be exactly one generic type. The `start` lang item should have exactly one generic type for the return type of the `main` fn ptr passed to it. I believe having zero would previously *sometimes* compile (often with the use of `fn() -> ()` as the fn ptr but it was likely UB to call if the return type of `main` was not `()` as far as I know) however it also sometimes would not for various errors including ICEs and LLVM errors depending on exact situations. Having more than 1 generic has always failed with an ICE because only the one generic type is expected and provided. Fixes #79559, fixes #73584, fixes #83117 (all duplicates) Relevant to #9307 r? ````@cjgillot````
2021-09-30Implemented -Z randomize-layoutChase Wilson-0/+1
2021-09-30Do not pass hir::Crate to lints.Camille GILLOT-25/+26
2021-09-29Rollup merge of #89377 - ehuss:update-cargo, r=ehussEric Huss-0/+0
Update cargo 5 commits in 0121d66aa2ef5ffa9735f86c2b56f5fdc5a837a6..d56b42c549dbb7e7d0f712c51b39400260d114d4 2021-09-22 16:08:27 +0000 to 2021-09-27 13:44:18 +0000 - Allow `cargo update --precise` with metadata. (rust-lang/cargo#9945) - Support path_in_vcs as part of cargo_vcs_metadata (rust-lang/cargo#9866) - Doc about InstallTracker files and `install.root` (rust-lang/cargo#9948) - Add some clarity on the license/license-file warning. (rust-lang/cargo#9941) - Fix the problem that help cannot be displayed properly (rust-lang/cargo#9933)
2021-09-29Rollup merge of #89294 - lnicola:rust-analyzer-2021-09-27, r=lnicolaEric Huss-16/+17
:arrow_up: rust-analyzer
2021-09-29Implement #85440Samuel E. Moelius III-0/+2
2021-09-29Avoid more invocations of hir_crate query.Camille GILLOT-5/+3