about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-06-18Test `x.ps1` in `msvc` CI jobJakub Beránek-2/+5
2023-06-15Auto merge of #112633 - Kobzol:ci-msvc-merge, r=pietroalbinibors-39/+11
CI: merge `msvc` test CI jobs Merges `msvc` jobs together to save CI time. Currently, both runners take about 1h 15 minutes, but nowadays it should be possible to just run everything in a single job. CI run: https://github.com/rust-lang/rust/actions/runs/5272144087/jobs/9534015536?pr=112633 (both finish under ~1h 35 minutes) After this change, we no longer test both `x.py` and `x.ps1`, but I don't suppose that it's worth it to spend 1.5 hours of additional CI time just for that. I suggest to run all tests using e.g. `x.py` and then run just `x.ps1 test --stage 2 --force-rerun tests/<single-quick-test>`. Also I'm not sure if it's worth it to keep using the Makefile for this.
2023-06-15Auto merge of #106343 - the8472:slice-iter-fold, r=scottmcmbors-8/+56
optimize slice::Iter::fold Fixes 2 of 4 cases from #106288 ``` OLD: test slice::fold_to_last ... bench: 248 ns/iter (+/- 3) NEW: test slice::fold_to_last ... bench: 0 ns/iter (+/- 0) ```
2023-06-15Auto merge of #112601 - weihanglo:update-cargo, r=weihanglobors-1/+4
Update cargo 11 commits in 49b6d9e179a91cf7645142541c9563443f64bf2b..0c14026aa84ee2ec4c67460c0a18abc8519ca6b2 2023-06-09 17:21:19 +0000 to 2023-06-14 18:43:05 +0000 - fix(embedded): Don't append hash to bin names (rust-lang/cargo#12269) - Fix version requirement example in Dependency Resolution, SemVer compatibility section (rust-lang/cargo#12267) - Update triagebot links. (rust-lang/cargo#12265) - Show a better error when container tests fail. (rust-lang/cargo#12264) - chore: update dependencies (rust-lang/cargo#12261) - refactor(embedded) (rust-lang/cargo#12262) - docs: clarify the use of `default` branch instead of `main` by default (rust-lang/cargo#12251) - docs: update changelog for 1.71 backport and 1.72 (rust-lang/cargo#12256) - feat: Initial support for single-file packages (rust-lang/cargo#12245) - test(z-flags): Verify `-Z` flags list is sorted (rust-lang/cargo#12224) - refactor: registry data kinds cleanup (rust-lang/cargo#12248) --- This commit also update LICENSE exceptions, as Cargo introduced a newer version of `dunce` and `blake3` as dependencies. r? `@ghost`
2023-06-15Auto merge of #112233 - notriddle:notriddle/search-unify, r=GuillaumeGomezbors-166/+357
rustdoc-search: clean up type unification and "unboxing" This PR redesigns parameter matching, return matching, and generics matching to use a single function that compares two lists of types. It also makes the algorithms more consistent, so the "unboxing" behavior where `Vec<i32>` is considered a match for `i32` works inside generics, and not just at the top level.
2023-06-15Auto merge of #104455 - the8472:dont-drain-on-drop, r=Amanieubors-577/+449
Don't drain-on-drop in DrainFilter impls of various collections. This removes drain-on-drop behavior from various unstable DrainFilter impls (not yet for HashSet/Map) because that behavior [is problematic](https://github.com/rust-lang/rust/issues/43244#issuecomment-641638196) (because it can lead to panic-in-drop when user closures panic) and may become forbidden if [this draft RFC passes](https://github.com/rust-lang/rfcs/pull/3288). closes #101122 [ACP](https://github.com/rust-lang/libs-team/issues/136) affected tracking issues * #43244 * #70530 * #59618 Related hashbrown update: https://github.com/rust-lang/hashbrown/pull/374
2023-06-14Merge `msvc-1/2` CI jobsJakub Beránek-39/+11
2023-06-14use indexed loop instead of ptr bumpingThe 8472-18/+20
this seems to produce less IR
2023-06-14Auto merge of #112625 - matthiaskrgr:rollup-jcobj3g, r=matthiaskrgrbors-407/+532
Rollup of 7 pull requests Successful merges: - #112584 (loongarch64-none*: Remove environment component from llvm target) - #112600 (Introduce a `Stable` trait to translate MIR to SMIR) - #112605 (Improve docs/clean up negative overlap functions) - #112611 (Error on unconstrained lifetime in RPITIT) - #112612 (Fix explicit-outlives-requirements lint span) - #112613 (Fix rustdoc-gui tests on Windows) - #112620 (Fix small typo) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-14Update cargoWeihang Lo-1/+4
2023-06-14Auto merge of #112624 - matthiaskrgr:rollup-db6ta1b, r=matthiaskrgrbors-65/+140
Rollup of 6 pull requests Successful merges: - #98202 (Implement `TryFrom<&OsStr>` for `&str`) - #107619 (Specify behavior of HashSet::insert) - #109814 (Stabilize String::leak) - #111974 (Update runtime guarantee for `select_nth_unstable`) - #112109 (Don't print unsupported split-debuginfo modes with `-Zunstable-options`) - #112506 (Properly check associated consts for infer placeholders) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-14Rollup merge of #112620 - AntoniosBarotsis:master, r=NilstriebMatthias Krüger-1/+1
Fix small typo Fixes a small typo in the [`Successors`](https://doc.rust-lang.org/std/iter/struct.Successors.html) documentation.
2023-06-14Rollup merge of #112613 - GuillaumeGomez:fix-gui-test-windows, r=notriddleMatthias Krüger-18/+18
Fix rustdoc-gui tests on Windows The browser-ui-test update contains fixes needed for backslash handling (they were not correctly escaped). Since we have a mix of slash and backslash in some tests, I replaced `DOC_FOLDER` variable backslashes with slashes. And finally it seemed like the unicode escaped wasn't much appreciated on Windows for some reason so I used the character directly. cc `@klensy` r? `@notriddle`
2023-06-14Rollup merge of #112612 - sginnett:issue-105150, r=compiler-errorsMatthias Krüger-8/+36
Fix explicit-outlives-requirements lint span Fixes #105150 which caused the span reported by the explicit-outlives-requirements lint to be incorrect when 1) the lint should suggest the entire where clause to be removed and 2) there are inline bounds present that are not inferable outlives requirements In particular, this would cause rustfix to leave a dangling empty where clause.
2023-06-14Rollup merge of #112611 - compiler-errors:unconstrained-lt-in-rpitit, r=oli-obkMatthias Krüger-102/+188
Error on unconstrained lifetime in RPITIT Fixes #109468 The only thing is that I had to split `tests/ui/impl-trait/in-trait/method-signature-matches.rs` into a bunch of different revisions because some error aren't being emitted if all the different examples are all together in one file :thinking: r? `@oli-obk` just because i know you'll review it, feel free to re-roll
2023-06-14Rollup merge of #112506 - compiler-errors:const-infer-ice, r=b-naberMatthias Krüger-34/+77
Properly check associated consts for infer placeholders We only reported an error if it was in a "suggestable" position (according to `is_suggestable_infer_ty`) -- this isn't correct for infer tys that can show up in other places in the constant's type, like behind a dyn trait. fixes #112491
2023-06-14Rollup merge of #112605 - compiler-errors:negative-docs, r=spastorinoMatthias Krüger-83/+85
Improve docs/clean up negative overlap functions Clean up some functions in ways that should not affect behavior, change some names to be clearer (`negative_impl` and `implicit_negative` are not really clear imo), and add some documentation examples. r? `@spastorino`
2023-06-14Rollup merge of #112600 - celinval:stable-mir-rvalue, r=oli-obkMatthias Krüger-194/+203
Introduce a `Stable` trait to translate MIR to SMIR This PR introduces a trait `Stable` which defines a type `T` and a `stable()` method to convert the current type to its stable MIR version. This change is just an implementation detail, and I wanted to get some feedback to whether it would be cleaner than having the `rustc_<type>_to_<type>()` methods for every type we translate to SMIR. r? `@oli-obk` r? `@spastorino`
2023-06-14Rollup merge of #112109 - Alexendoo:unsupported-split-debuginfo, r=b-naberMatthias Krüger-3/+1
Don't print unsupported split-debuginfo modes with `-Zunstable-options` Currently unsupported `split-debuginfo` options are enabled by `-Zunstable-options`, for projects that have `-Zunstable-options` for other reasons this can be [an unexpected interaction](https://github.com/rust-lang/rust-clippy/pull/10516#issuecomment-1562604764) This PR makes it so that `--print split-debuginfo -Zunstable-options` doesn't print unsupported modes, so that a cargo config of e.g. ```toml [profile.dev] split-debuginfo = "unpacked" ``` Would not cause an unsupported mode to be enabled on `x86_64-pc-windows-msvc`
2023-06-14Rollup merge of #112584 - loongarch-rs:remove-env, r=petrochenkovMatthias Krüger-1/+1
loongarch64-none*: Remove environment component from llvm target A warning is reported when the LLVM triple-implied ABI conflicts with the provided target-abi. ``` warning: triple-implied ABI conflicts with provided target-abi ‘lp64s', using target-abi ``` Specifically, the ABI hint comes from the environment component of the triple. When only the target-abi is provided and no environment, there is no conflict. This PR removes the environment component from the LLVM target name of the `loongarch64-unknown-none-softfloat` target.
2023-06-14Rollup merge of #111974 - Sp00ph:update_guarantees, r=AmanieuMatthias Krüger-6/+4
Update runtime guarantee for `select_nth_unstable` #106933 changed the runtime guarantee for `select_nth_unstable` from O(n) to O(n log n), since the old guarantee wasn't actually met by the implementation at the time. Now with #107522, `select_nth_unstable` should be truly linear in runtime, so we can revert its runtime guarantee to O(n). Since #106933 was considered a bug fix, this will probably need an FCP because it counts as a new API guarantee. r? `@Amanieu`
2023-06-14Rollup merge of #109814 - est31:stabilize_string_leak, r=AmanieuMatthias Krüger-7/+8
Stabilize String::leak Stabilizes the following API: ```Rust impl String { pub fn leak(self) -> &'static mut str; } ``` closes #102929 blocked by having an FCP for stabilization.
2023-06-14Rollup merge of #107619 - stepancheg:hash-set-insert, r=AmanieuMatthias Krüger-1/+23
Specify behavior of HashSet::insert `HashSet::insert` does not replace the value with equal value. Fixes #107581.
2023-06-14Rollup merge of #98202 - aticu:impl_tryfrom_osstr_for_str, r=AmanieuMatthias Krüger-14/+27
Implement `TryFrom<&OsStr>` for `&str` Recently when trying to work with `&OsStr` I was surprised to find this `impl` missing. Since the `to_str` method already existed the actual implementation is fairly non-controversial, except for maybe the choice of the error type. I chose an opaque error here instead of something like `std::str::Utf8Error`, since that would already make a number of assumption about the underlying implementation of `OsStr`. As this is a trait implementation, it is insta-stable, if I'm not mistaken? Either way this will need an FCP. I chose "1.64.0" as the version, since this is unlikely to land before the beta cut-off. `@rustbot` modify labels: +T-libs-api API Change Proposal: rust-lang/rust#99031 (accepted)
2023-06-14Fix typoAntonios Barotsis-1/+1
2023-06-14Fix `href` attribute value check on Windows (`DOC_PATH` lacks an extra `/`)Guillaume Gomez-12/+12
2023-06-14Auto merge of #112418 - ferrocene:pa-mir-opt-panic, r=ozkanonur,saethlinbors-251/+11693
Add support for targets without unwinding in `mir-opt`, and improve `--bless` for it The main goal of this PR is to add support for targets without unwinding support in the `mir-opt` test suite, by adding the `EMIT_MIR_FOR_EACH_PANIC_STRATEGY` comment. Similarly to 32bit vs 64bit, when that comment is present, blessed output files will have the `.panic-unwind` or `.panic-abort` suffix, and the right one will be chosen depending on the target's panic strategy. The `EMIT_MIR_FOR_EACH_PANIC_STRATEGY` comment replaced all the `ignore-wasm32` comments in the `mir-opt` test suite, as those comments were added due to `wasm32` being a target without unwinding support. The comment was also added on other tests that were only executed on x86 but were still panic strategy dependent. The `mir-opt` suite was then blessed, which caused a ton of churn as most of the existing output files had to be renamed and (mostly) duplicated with the abort strategy. --- After [asking on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/mir-opt.20tests.20and.20panic.3Dabort), the main concern about this change is it'd make blessing the `mir-opt` suite even harder, as you'd need to both bless it with an unwinding target and an aborting target. This exacerbated the current situation, where you'd need to bless it with a 32bit and a 64bit target already. Because of that, this PR also makes significant enhancements to `--bless` for the `mir-opt` suite, where it will automatically bless the suite four times with different targets, while requiring minimal cross-compilation. To handle the 32bit vs 64bit blessing, there is now an hardcoded list of target mapping between 32bit and 64bit. The goal of the list is to find a related target that will *probably* work without requiring additional cross-compilation toolchains on the system. If a mapping is found, bootstrap will bless the suite with both targets, otherwise just with the current target. To handle the panic strategy blessing (abort vs unwind), I had to resort to what I call "synthetic targets". For each of the target we're blessing (so either the current one, or a 32bit and a 64bit depending on the previous paragraph), bootstrap will extract the JSON spec of the target and change it to include `"panic-strategy": "abort"`. It will then build the standard library with this synthetic target, and bless the `mir-opt` suite with it. As a result of these changes, blessing the `mir-opt` suite will actually bless it two or four times with different targets, ensuring all possible variants are actually blessed. --- This PR is best reviewed commit-by-commit. r? `@jyn514` cc `@saethlin` `@oli-obk`
2023-06-14yet another dry run fixPietro Albini-0/+4
2023-06-14Auto merge of #112400 - WaffleLapkin:vtable_stats, r=compiler-errorsbors-5/+232
Collect VTable stats & add `-Zprint-vtable-sizes` This is a bit hacky/buggy, but I'm not entirely sure how to fix it, so I want to ask reviewers for help... To try this, use either of those: - `cargo clean && RUSTFLAGS="-Zprint-vtable-sizes" cargo +toolchain b` - `cargo clean && cargo rustc +toolchain -Zprint-vtable-sizes` - `rustc +toolchain -Zprint-vtable-sizes ./file.rs`
2023-06-14Replace unicode value with character in shortcuts.goml testGuillaume Gomez-3/+3
2023-06-14Transform backslash into slashes in DOC_FOLDER variable for browser-ui-testGuillaume Gomez-2/+2
2023-06-14Update browser-ui-test version to 0.16.7Guillaume Gomez-1/+1
2023-06-14Auto merge of #110662 - bryangarza:safe-transmute-reference-types, ↵bors-206/+789
r=compiler-errors Safe Transmute: Enable handling references This patch enables support for references in Safe Transmute, by generating nested obligations during trait selection. Specifically, when we call `confirm_transmutability_candidate(...)`, we now recursively traverse the `rustc_transmute::Answer` tree and create obligations for all the `Answer` variants, some of which include multiple nested `Answer`s.
2023-06-14update miri testThe 8472-3/+3
2023-06-14update hashbrown and replace Hash{Set,Map}::DrainFilter with ExtractIfThe 8472-75/+94
2023-06-14remove hash_drain_filter feature usesThe 8472-2/+0
2023-06-14s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedListThe 8472-216/+204
2023-06-14remove drain-on-drop behavior from linked_list::DrainFilter and add #[must_use]The 8472-30/+14
2023-06-14remove drain-on-drop behavior from BTree{Set,Map}::DrainFilter and add ↵The 8472-58/+40
#[must_use]
2023-06-14remove drain-on-drop behavior from vec::DrainFilter and add #[must_use]The 8472-131/+32
2023-06-13Fix explicit-outlives-requirements lint spanSam Ginnett-8/+36
2023-06-14Auto merge of #112609 - matthiaskrgr:rollup-er6weld, r=matthiaskrgrbors-39/+331
Rollup of 5 pull requests Successful merges: - #112197 (Erase regions even if normalization fails in writeback (in new solver)) - #112495 (fix(resolve): update shadowed_glob more precision) - #112520 (Fix the overflow issue for transmute_generic_consts) - #112571 (rustdoc-search: search never type with `!`) - #112581 ([rustdoc] Fix URL encoding of % sign) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-14Error on unconstrained lifetime in RPITITMichael Goulet-102/+188
2023-06-14Rollup merge of #112581 - TumoiYorozu:fix_url_encoding_of_percent_sign, ↵Matthias Krüger-2/+0
r=notriddle [rustdoc] Fix URL encoding of % sign Fix #112580 The % is encoded as %%, but the correct encoding is %25.
2023-06-14Rollup merge of #112571 - notriddle:notriddle/never-search, r=GuillaumeGomezMatthias Krüger-24/+200
rustdoc-search: search never type with `!` This feature extends rustdoc to support the syntax that most users will naturally attempt to use to search for diverging functions. Part of #60485 It's already possible to do this search with `primitive:never`, but that's not what the Rust language itself uses, so nobody will try it if they aren't told or helped along.
2023-06-14Rollup merge of #112520 - chenyukang:yukang-fix-112505, r=fee1-deadMatthias Krüger-1/+29
Fix the overflow issue for transmute_generic_consts Fixes #112505
2023-06-14Rollup merge of #112495 - bvanjoi:fix-109153, r=petrochenkovMatthias Krüger-2/+55
fix(resolve): update shadowed_glob more precision - Fixes #109153 - Fixes #109962 ## Why does it panic? We use #109153 as an illustration. The process of `resolve_imports` is: | Iter | resolve | resolution of **`(Mod(root), Ident(bar) in type ns)`** | | - | - | - | | 0 | `use foo::*` | `binding` -> foo::bar, `shallowed_glob` -> `None` | | 1 | `use bar::bar` | `binding` -> foo::bar::bar, `shallowed_glob` -> foo::bar | | 2 | `use bar::*` | `binding` -> foo::bar::bar, `shallowed_glob` -> foo::bar::bar::bar | So during `finalize_import`, the `root::bar` in `use bar::bar` had been pointed to `foo::bar::bar::bar`, which is different from the `initial_module` valued of `foo::bar`, therefore, the panic had been triggered. ## Try to solve it ~I think #109153 should check-pass rather than throw an ambiguous error. Following this idea, there are two ways to solve this problem:~ ~1. Give up the `initial_module` and update `import.imported_module` after each resolution update. However, I think this method may have too much impact.~ ~2. Do not update the `shadowed_glob` when it is defined.~ ~To be honest, I am not sure if this is the right way to solve this ICE. Perhaps there is a better resolution.~ Edit: we had made the `resolution.shadowed_glob` update more detailed. r? `@petrochenkov`
2023-06-14Rollup merge of #112197 - compiler-errors:next-solver-erase, r=lcnrMatthias Krüger-10/+47
Erase regions even if normalization fails in writeback (in new solver) Or else we ICE during writeback on some programs that error
2023-06-14Auto merge of #112448 - nnethercote:no-tiny-cgus, r=wesleywiserbors-46/+201
Introduce a minimum CGU size in non-incremental builds. Because tiny CGUs slow down compilation *and* result in worse generated code. r? `@wesleywiser`
2023-06-14Improve docs/clean up negative overlap functionsMichael Goulet-83/+85