about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2023-04-16chore: allow `cargo` to have its own workspaceWeihang Lo-28/+40
This also * bumps cargo to the latest in rust-lang/cargo. * adds 0BSD to allowed list of licenses Co-authored-by: Scott Schafer <schaferjscott@gmail.com> Co-authored-by: Eric Huss <eric@huss.org>
2023-04-16Alloc `hir::Lit` in an arena to remove the destructor from `Expr`Nilstrieb-5/+5
This allows allocating `Expr`s into a dropless arena, which is useful for using length prefixed thing slices in HIR, since these can only be allocated in the dropless arena and not in a typed arena. This is something I'm working on.
2023-04-16Remove #[alloc_error_handler] from the compiler and libraryAmanieu d'Antras-4/+0
2023-04-16Improve doc comment of AllocExtra's backtraceBen Kimock-1/+2
Co-authored-by: Ralf Jung <post@ralfj.de>
2023-04-16Add a flag to disable leak backtracesBen Kimock-9/+52
2023-04-16Report a backtrace for memory leaks under MiriBen Kimock-42/+127
2023-04-16Add needs-git-hash header to compiletestErik Hofmayer-0/+20
This header can be used for tests which check the output of `--version --verbose` commands.
2023-04-15Auto merge of #110319 - ferrocene:pa-more-ignore-reasons, r=ehussbors-187/+458
[compiletest] Add more test ignore reasons, `needs-` validation, and improved error messages This PR makes more improvements to the way compiletest ignoring headers are handled, following up on #108905: * Human-readable ignore reasons have been added for the remaining ignore causes (`needs-*` directives, `*llvm*` directives, and debugger version directives). All ignored tests should now have a human-readable reason. * The code handling `needs-*` directives has been refactored, and now invalid `needs-*` directive emit errors like `ignore-*` and `only-*`. * All errors are now displayed at startup (with line numbers) rather than just the first error of the first file. This PR is best reviewed commit-by-commit. r? `@ehuss`
2023-04-14Auto merge of #110197 - cjgillot:codegen-discr, r=pnkfelixbors-1/+1
Do not attempt to commute comparison and cast to codegen discriminants The general algorithm to compute a discriminant is: ``` relative_tag = tag - niche_start is_niche = relative_tag <= (ule) relative_max discr = if is_niche { cast(relative_tag) + niche_variants.start() } else { untagged_variant } ``` We have an optimization branch which attempts to merge the addition and the subtraction by commuting them with the cast. We currently get this optimization wrong. This PR takes the easiest and safest way: remove the optimization, and let LLVM handle it. (Perf may not agree with that course of action :sweat_smile:) There may be a less invasive solution, but I don't have the necessary knowledge of LLVM semantics to find it. Cranelift has the same optimization, which should be handled similarly. cc `@nikic` and `@bjorn3` if you have a better solution. Fixes https://github.com/rust-lang/rust/issues/110128
2023-04-14Rollup merge of #110244 - kadiwa4:unnecessary_imports, r=JohnTitorMatthias Krüger-6/+2
Remove some unneeded imports / qualified paths Continuation of #105537.
2023-04-14Auto merge of #2843 - jsoref:spelling, r=RalfJungbors-77/+77
Spelling This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling). The misspellings have been reported at https://github.com/jsoref/miri/actions/runs/4699927237#summary-12751183650 The action reports that the changes in this PR would make it happy: https://github.com/jsoref/miri/actions/runs/4699927572#summary-12751184493
2023-04-14Fix spellingJosh Soref-77/+77
* additional * addresses * aggregates * always * around * beginning * behaviours * borrows * called * canary * deallocated * determine * division * documentation * empty * endianness * ensures * existing * github * hygiene * individual * initialize * instantiate * library * location * miscellaneous * mitigates * needs * nonexistent * occurred * occurring * overridden * parameter * performable * previous * referential * requires * resolved * scenarios * semantics * spurious * structure * subtracting * suppress * synchronization * this * timestamp * to * transferring * unknown * variable * windows Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-14Pacify tidy.Camille GILLOT-1/+1
2023-04-14Rollup merge of #106249 - Ezrashaw:suggest-test-tool, r=jyn514,albertlarsan68Yuki Okushi-0/+200
Create "suggested tests" tool in `rustbuild` Not the claimed person in #97339 but: I've done a very rough implementation of this feature in-tree. I'm very new to `rustc` development (outside of docs) so some help would be greatly appreciated. The UI of this new subcommand obviously will change and I need some mentoring with the `--run` flag. r? ```@jyn514```
2023-04-14add test for recent unwind UB issueRalf Jung-0/+9
2023-04-14Merge from rustcRalf Jung-2649/+4847
2023-04-14Preparing for merge from rustcRalf Jung-1/+1
2023-04-14mark needs-llvm-components as being handled elsewherePietro Albini-0/+5
2023-04-14use a shared headers cachePietro Albini-9/+28
2023-04-14add line numbers to error messagesPietro Albini-6/+8
2023-04-14show all invalid directives errors rather than just the first onePietro Albini-5/+36
2023-04-14refactor ignore- and only- to use decisionsPietro Albini-53/+50
2023-04-14rename rust-lldb to needs-rust-lldb for consistencyPietro Albini-9/+6
2023-04-14refactor needs, validate them, and add ignore reasonsPietro Albini-104/+250
2023-04-14add pretty ignore reasons for llvm, cdb, gdb and lldbPietro Albini-33/+107
2023-04-14Auto merge of #109875 - jyn514:no-fulldeps, r=compiler-errorsbors-1/+1
Move most ui-fulldeps tests to ui/ Same rationale as https://github.com/rust-lang/rust/pull/109770, they don't actually need a stage 2 build. This increases the limit for the UI directory because otherwise it was annoying to be constantly moving files into subdirectories when I fixed a test; https://github.com/rust-lang/rust/pull/109873 makes up for it. cc https://github.com/rust-lang/rust/pull/109770, https://github.com/rust-lang/rust/pull/109874
2023-04-13Move most ui-fulldeps tests to uijyn-1/+1
They pass fine. Only tests that required `extern crate rustc_*` or were marked `ignore-stage1` have been keep in fulldeps.
2023-04-14Auto merge of #110160 - petrochenkov:notagain2, r=cjgillotbors-2/+2
resolve: Pre-compute non-reexport module children Instead of repeating the same logic by walking HIR during metadata encoding. The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises. `module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
2023-04-13Update cargoWeihang Lo-0/+0
2023-04-13Auto merge of #2833 - oli-obk:ui_test_bump, r=RalfJungbors-16/+32
Update to new ui_test crate
2023-04-13Auto merge of #2841 - RalfJung:compiletest, r=oli-obkbors-0/+12
compiletest: complain about unknown flags This would have avoided https://github.com/rust-lang/rust/issues/110102
2023-04-13Update to new ui_test crateOli Scherer-16/+32
2023-04-13compiletest: complain about unknown flagsRalf Jung-0/+12
2023-04-13Rollup merge of #110072 - joshtriplett:stabilize-is-terminal, r=Mark-SimulacrumMatthias Krüger-4/+0
Stabilize IsTerminal FCP completed in https://github.com/rust-lang/rust/issues/98070 . closes: https://github.com/rust-lang/rust/issues/98070
2023-04-12Special-case item attributes in the suggestion outputEsteban Küber-9/+0
2023-04-12Tweak output for 'add line' suggestionEsteban Küber-11/+28
2023-04-12Auto merge of #110249 - matthiaskrgr:rollup-7iig04q, r=matthiaskrgrbors-6/+22
Rollup of 8 pull requests Successful merges: - #110153 (Fix typos in compiler) - #110165 (rustdoc: use CSS `overscroll-behavior` instead of JavaScript) - #110175 (Symbol cleanups) - #110203 (Remove `..` from return type notation) - #110205 (rustdoc: make settings radio and checks thicker, less contrast) - #110222 (Improve the error message when forwarding a matched fragment to another macro) - #110237 (Split out a separate feature gate for impl trait in associated types) - #110241 (tidy: Issue an error when UI test limits are too high) Failed merges: - #110218 (Remove `ToRegionVid`) r? `@ghost` `@rustbot` modify labels: rollup
2023-04-12remove some unneeded importsKaDiWa-6/+2
2023-04-12tidy: Issue an error when ui test limits are too highclubby789-6/+22
2023-04-12Rollup merge of #110188 - Nilstrieb:remove-remove-dir-all, r=jyn514Matthias Krüger-864/+0
Remove orphaned remove_dir_all implementation from rust-installer I have no idea why it's here, but it's not used at all. r? Mark-Simulacrum
2023-04-12typoRalf Jung-1/+1
2023-04-12add memcpy/strcpy shimsmojave2-0/+118
add memcpy/strcpy/strncpy shims fix bug add memcpy/strcpy/strncpy shims add a test for strncpy remove strncpy shim
2023-04-12resolve: Pre-compute non-reexport module childrenVadim Petrochenkov-2/+2
Instead of repeating the same logic by walking HIR during metadata encoding. The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises. `module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
2023-04-11Rollup merge of #110155 - DaniPopes:rest-typos, r=jyn514Michael Goulet-60/+60
Fix typos in librustdoc, tools and config files I used [`typos`](https://github.com/crate-ci/typos) to fix all typos, minus the ones present in #110153 and in #110154. Refs #110150
2023-04-11Rollup merge of #110018 - jfgoog:host-and-target-linker, r=wesleywiserMichael Goulet-7/+16
Pass host linker to compiletest. Tests marked `// force-host` were using the default linker, even if a custom linker was configured in config.toml. This change adds a new flag, --host-linker, to compiletest, and renames --linker to --target-linker.
2023-04-11filter out notesDebugSteven-53/+1
2023-04-11Auto merge of #110198 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 17 commits in 0e474cfd7b16b018cf46e95da3f6a5b2f1f6a9e7..7bf43f028ba5eb1f4d70d271c2546c38512c9875 2023-03-31 23:15:58 +0000 to 2023-04-10 16:01:41 +0000 - docs(pkgid): Consistently use @ (rust-lang/cargo#11956) - Fix credential token format validation. (rust-lang/cargo#11951) - Validate token on publish. (rust-lang/cargo#11952) - Clarify docs on `-C` that it appears before the command. (rust-lang/cargo#11947) - Add `try_canonicalize` and use it over `std::fs::canonicalize` (rust-lang/cargo#11866) - Fix typo (rust-lang/cargo#11944) - docs(changelog): Change wording about auto-fix message (rust-lang/cargo#11943) - Update home repo URL (rust-lang/cargo#11941) - doc(changelog): `[env]` is a table, not a stable (rust-lang/cargo#11942) - Stop using UncanonicalizedIter for QueryKind::Exact (rust-lang/cargo#11937) - Don't query permutations of the path prefix. (rust-lang/cargo#11936) - Fix typo in variable name (rust-lang/cargo#11931) - Fix Cargo warning about unused sparse configuration key (rust-lang/cargo#11930) - Switch benchsuite to the index archive. (rust-lang/cargo#11933) - Update git2 (rust-lang/cargo#11928) - Publish docs: Clarify requirements about the state of the index after publish. (rust-lang/cargo#11926) - Call out the differences between the index JSON and the API or metadata. (rust-lang/cargo#11927)
2023-04-11throw unsupported for epoll_waitDebugSteven-2/+70
2023-04-11Update cargoWeihang Lo-0/+0
2023-04-11Update tests/pass-dep/shims/libc-misc.rsChristian Legnitto-1/+1
Co-authored-by: Ben Kimock <kimockb@gmail.com>