about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2023-05-05Add deployment-target --print flag for Apple targetsBlackHoleFox-1/+1
2023-05-04add passes to miroptfiles struct and passed to -zdump-mir argsJames Dietz-22/+84
blessed new test
2023-05-04IAT: Rustdoc integrationLeón Orell Valerian Liehr-1/+3
2023-05-04IAT: Introduce AliasKind::InherentLeón Orell Valerian Liehr-0/+1
2023-05-04Auto merge of #110806 - WaffleLapkin:unmkI, r=lcnrbors-7/+4
Replace `tcx.mk_trait_ref` with `TraitRef::new` First step in implementing https://github.com/rust-lang/compiler-team/issues/616 r? `@lcnr`
2023-05-03Rollup merge of #110970 - est31:test_dirs_relax, r=petrochenkovManish Goregaokar-5/+2
tidy: remove ENTRY_LIMIT maximum checking and set it to 900 Removes checking of `ENTRY_LIMIT` towards an actually reached maximum, and sets it to 900. The number 900 is safely below github's limit of 1000 entries for a directory. PRs to move tests can still decrease the sizes of various directories, but adjusting the limit won't be neccessary any more. In fact, such reduction PRs are a great idea so that no unrelated PR is hitting the limit: ideally there would always be a (manually maintained) safety margin between the actually reached maximum and `ENTRY_LIMIT`, for all directories. In general, the limit is a bad tool to direct people to put tests into fitting directories because when those are available, usually the limit is not hit, while the limit is hit in directories that have a weak substructure themselves. I got into this situation myself when writing #110694: tests/ui/parser is hitting the limit, but has few directories of its own. Suggested by ```@petrochenkov``` in https://github.com/rust-lang/rust/pull/110694#discussion_r1177694339. r? ```@petrochenkov```
2023-05-03Rollup merge of #110371 - notriddle:notriddle/search-corrections, ↵Manish Goregaokar-8/+46
r=GuillaumeGomez rustdoc: restructure type search engine to pick-and-use IDs Fixes #110029 Preview: https://notriddle.com/rustdoc-demo-html-3/search-corrections/std/index.html?search=-%3E%20streaming ![image](https://user-images.githubusercontent.com/1593513/233494900-ae77d5b4-e395-41f8-bbac-53ee55bb4a76.png) This change makes it so, instead of mixing string distance with type unification, function signature search works by mapping names to IDs at the start, reporting to the user any cases where it had to make corrections, and then matches with IDs when going through the items. This only changes function searches. Name searches are left alone, and corrections are only done when there's a single item in the search query.
2023-05-04Rollup merge of #111097 - oli-obk:🚲_layout, r=compiler-errorsDylan DPC-0/+56
Avoid ICEing miri on layout query cycles Miri has special logic for catching panics during interpretation. Raising a fatal error in rustc uses unwinding to abort compilation. Thus miri ends up catching that fatal error and thinks it saw an ICE. While we should probably change that to ignore `Fatal` payloads, I think it's also neat to continue compilation after a layout query cycle 😆 Query cycles now (in addition to reporting an error just like before), return `Err(Cycle)` instead of raising a fatal error. This allows the interpreter to wind down via the regular error paths. r? `@RalfJung` for a first round, feel free to reroll for the compiler team once the miri side looks good
2023-05-04Rollup merge of #110791 - compiler-errors:negative-bounds, r=oli-obkDylan DPC-0/+17
Implement negative bounds for internal testing purposes Implements partial support the `!` negative polarity on trait bounds. This is incomplete, but should allow us to at least be able to play with the feature. Not even gonna consider them as a public-facing feature, but I'm implementing them because would've been nice to have in UI tests, for example in #110671.
2023-05-04Rollup merge of #110436 - Mark-Simulacrum:support-xz-version, r=pietroalbiniDylan DPC-3/+26
Support loading version information from xz tarballs This is intended to allow us to move recompression from xz (produced in CI) to gz after an initial manifest run, which produces a list of actually required artifacts. The rest are then deleted, which means that we can avoid recompressing them, saving a bunch of time. This is essentially untested and more might be needed, will run a patched promote-release against try artifacts from this PR. If we do go ahead with this we'll either need to backport this patch to beta/stable, wait for it to propagate, or temporarily recompress to gzip but not xz tarballs (or similar). r? `@pietroalbini`
2023-05-03Auto merge of #2871 - RalfJung:rustup, r=RalfJungbors-245/+104
Rustup
2023-05-03Merge from rustcRalf Jung-244/+103
2023-05-03Preparing for merge from rustcRalf Jung-1/+1
2023-05-03Auto merge of #111107 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 16 commits in 9e586fbd8b931494067144623b76c37d213b1ab6..ac84010322a31f4a581dafe26258aa4ac8dea9cd 2023-04-25 22:09:11 +0000 to 2023-05-02 13:41:16 +0000 - docs(registry): Further specify owner-remove response (rust-lang/cargo#12056) (rust-lang/cargo#12068) - Remove repeated definite articles (rust-lang/cargo#12067) - Document that adding `#[non_exhaustive]` on existing items is breaking. (rust-lang/cargo#10877) - docs(commands): add missed preposition (rust-lang/cargo#12073) - Fix warning with unused mut (rust-lang/cargo#12065) - chore: move build-man workflow away from shell (rust-lang/cargo#12048) - feat: Add `-Zmsrv-policy` feature flag (rust-lang/cargo#12043) - chore: new xtask to check stale paths in autolabel defintions (rust-lang/cargo#12051) - cargo-tree: Handle -e no-proc-macro when building the graph (rust-lang/cargo#12044) - chore: update trigger_files in autolabel (rust-lang/cargo#12052) - fix broken markdown in docs (rust-lang/cargo#12049) - home: fix & enhance documentation (rust-lang/cargo#12047) - chore: Mark unpublished crates as such (rust-lang/cargo#12045) - Include rust-version in publish request (rust-lang/cargo#12041) - chore(xtask): Add `cargo xtask unpublished` (rust-lang/cargo#12039) - docs(ref): Specify 'rust_version' in Index format (rust-lang/cargo#12040) r? `@ghost`
2023-05-03Restrict `From<S>` for `{D,Subd}iagnosticMessage`.Nicholas Nethercote-13/+15
Currently a `{D,Subd}iagnosticMessage` can be created from any type that impls `Into<String>`. That includes `&str`, `String`, and `Cow<'static, str>`, which are reasonable. It also includes `&String`, which is pretty weird, and results in many places making unnecessary allocations for patterns like this: ``` self.fatal(&format!(...)) ``` This creates a string with `format!`, takes a reference, passes the reference to `fatal`, which does an `into()`, which clones the reference, doing a second allocation. Two allocations for a single string, bleh. This commit changes the `From` impls so that you can only create a `{D,Subd}iagnosticMessage` from `&str`, `String`, or `Cow<'static, str>`. This requires changing all the places that currently create one from a `&String`. Most of these are of the `&format!(...)` form described above; each one removes an unnecessary static `&`, plus an allocation when executed. There are also a few places where the existing use of `&String` was more reasonable; these now just use `clone()` at the call site. As well as making the code nicer and more efficient, this is a step towards possibly using `Cow<'static, str>` in `{D,Subd}iagnosticMessage::{Str,Eager}`. That would require changing the `From<&'a str>` impls to `From<&'static str>`, which is doable, but I'm not yet sure if it's worthwhile.
2023-05-02Rustfmt support for negative bounds, testMichael Goulet-2/+17
2023-05-02Make tools happyMichael Goulet-0/+2
2023-05-02Update cargoWeihang Lo-0/+0
2023-05-02Avoid ICEing miri on layout query cyclesOli Scherer-0/+56
2023-05-02rm diag item, use lang itemDeadbeef-3/+3
2023-05-02initial step towards implementing C string literalsDeadbeef-0/+7
2023-05-02Auto merge of #109128 - chenyukang:yukang/remove-type-ascription, r=estebankbors-59/+22
Remove type ascription from parser and diagnostics Mostly based on https://github.com/rust-lang/rust/pull/106826 Part of #101728 r? `@estebank`
2023-05-02Avoid interpreting code that has lint errorsOli Scherer-1/+23
2023-05-02Merge from rustcRalf Jung-21/+21
2023-05-02Preparing for merge from rustcRalf Jung-1/+1
2023-05-02Rollup merge of #110955 - fee1-dead-contrib:sus-operation, r=compiler-errorsDylan DPC-170/+61
uplift `clippy::clone_double_ref` as `suspicious_double_ref_op` Split from #109842. r? ``@compiler-errors``
2023-05-02Rollup merge of #108161 - WaffleLapkin:const_param_ty, r=BoxyUwUDylan DPC-2/+5
Add `ConstParamTy` trait This is a bit sketch, but idk. r? `@BoxyUwU` Yet to be done: - [x] ~~Figure out if it's okay to implement `StructuralEq` for primitives / possibly remove their special casing~~ (it should be okay, but maybe not in this PR...) - [ ] Maybe refactor the code a little bit - [x] Use a macro to make impls a bit nicer Future work: - [ ] Actually™ use the trait when checking if a `const` generic type is allowed - [ ] _Really_ refactor the surrounding code - [ ] Refactor `marker.rs` into multiple modules for each "theme" of markers
2023-05-01Make the BUG_REPORT_URL configurable by toolsjyn-64/+23
This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. - Switch clippy to the new hook This also adds a `extra_info` callback so clippy can include its own version number, which differs from rustc's. - Call `install_ice_hook` in rustfmt
2023-05-01Auto merge of #111010 - scottmcm:mem-replace-simpler, r=WaffleLapkinbors-3/+3
Make `mem::replace` simpler in codegen Since they'd mentioned more intrinsics for simplifying stuff recently, r? `@WaffleLapkin` This is a continuation of me looking at foundational stuff that ends up with more instructions than it really needs. Specifically I noticed this one because `Range::next` isn't MIR-inlining, and one of the largest parts of it is a `replace::<usize>` that's a good dozen instructions instead of the two it could be. So this means that `ptr::write` with a `Copy` type no longer generates worse IR than manually dereferencing (well, at least in LLVM -- MIR still has bonus pointer casts), and in doing so means that we're finally down to just the two essential `memcpy`s when emitting `mem::replace` for a large type, rather than the bonus-`alloca` and three `memcpy`s we emitted before this ([or the 6 we currently emit in 1.69 stable](https://rust.godbolt.org/z/67W8on6nP)). That said, LLVM does _usually_ manage to optimize the extra code away. But it's still nice for it not to have to do as much, thanks to (for example) not going through an `alloca` when `replace`ing a primitive like a `usize`. (This is a new intrinsic, but one that's immediately lowered to existing MIR constructs, so not anything that MIRI or the codegen backends or MIR semantics needs to do work to handle.)
2023-05-01Auto merge of #111036 - RalfJung:miri, r=RalfJungbors-453/+1432
update Miri r? `@ghost`
2023-05-01remove rustfmt testcase for type ascriptionyukang-23/+0
2023-05-01fix testsyukang-42/+27
2023-05-01clean up Colon from clippyyukang-5/+6
2023-04-30Update MIRI compiletestsScott McMurray-3/+3
2023-05-01Rollup merge of #110823 - compiler-errors:tweak-await-span, r=b-naberMatthias Krüger-18/+18
Tweak await span to not contain dot Fixes a discrepancy between method calls and await expressions where the latter are desugared to have a span that *contains* the dot (i.e. `.await`) but method call identifiers don't contain the dot. This leads to weird suggestions suggestions in borrowck -- see linked issue. Fixes #110761 This mostly touches a bunch of tests to tighten their `await` span.
2023-04-30make it more obvious when the rustc-pull failedRalf Jung-3/+3
2023-04-30Merge from rustcRalf Jung-1930/+3305
2023-04-30Use dynamic dispatch for queriesJohn Kåre Alsaker-0/+1
2023-04-30Fix the test directories suggested by `./x.py suggest`Zalathar-2/+2
The tests that were in `src/test/` have been moved to `tests/`, so the paths given by the suggestion tool should reflect this.
2023-04-29blessRalf Jung-2/+2
2023-04-29Preparing for merge from rustcRalf Jung-1/+1
2023-04-29Auto merge of #110994 - matthiaskrgr:rollup-wv4u5yi, r=matthiaskrgrbors-5/+37
Rollup of 6 pull requests Successful merges: - #105848 (rustdoc: Add a new lint for broken inline code) - #110644 (Update tests for libtest `--format json`) - #110950 (Deny the `unsafe_op_in_unsafe_fn` lint in `rustc_arena`.) - #110951 (Add support for LibreSSL 3.7.x) - #110964 (rustdoc: fix weird margins between Deref impl items) - #110979 (windows: kill rust-analyzer-proc-macro-srv before deleting stage0 directory) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-29Rollup merge of #110644 - pietroalbini:pa-json-formatting-tests, ↵Matthias Krüger-5/+37
r=Mark-Simulacrum Update tests for libtest `--format json` This PR makes the test work on beta and stable, and adds a test ensuring the option is not available on beta and stable. Backported these commits from https://github.com/rust-lang/rust/pull/110414.
2023-04-29Update list of allowed cg_clif dependenciesbjorn3-10/+0
2023-04-29Auto merge of #110643 - pietroalbini:pa-bump-stage0, r=Mark-Simulacrumbors-37/+5
[master] Bump stage0 r? `@Mark-Simulacrum`
2023-04-29Remove ENTRY_LIMIT maximum checking and set it to 900est31-5/+2
The number 900 is safely below github's limit of 1000 entries for a directory. PRs to move tests can still decrease the sizes of various directories, but adjusting the limit won't be neccessary any more. In general, the limit is a bad tool to direct people to put tests into fitting directories because when those are available, usually the limit is not hit, while the limit is hit in directories that have a weak substructure themselves.
2023-04-28Rollup merge of #110944 - RalfJung:offset, r=compiler-errorsMatthias Krüger-11/+0
share BinOp::Offset between CTFE and Miri r? ``@oli-obk``
2023-04-28uplift `clippy::clone_double_ref` as `suspicious_double_ref_op`Deadbeef-170/+61
2023-04-28handle cfg(bootstrap)Pietro Albini-37/+5
2023-04-28share BinOp::Offset between CTFE and MiriRalf Jung-11/+0