about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-05-02Use metavar `${count(x)}` instead of reimplementing itMaybe Waffle-9/+3
2023-05-02implement tuple<->array convertions via `From`Maybe Waffle-0/+40
2023-05-01Auto merge of #111036 - RalfJung:miri, r=RalfJungbors-455/+1436
update Miri r? `@ghost`
2023-05-01Auto merge of #111026 - compiler-errors:only-typeck-root, r=cjgillotbors-1/+1
Only cache typeck results if it's the typeck root context: https://rust-lang.zulipchat.com/#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/incr_comp_query_cache_promotion.20taking.20forever Basically, typeck children just copy the typeck results of their typeck root item, so caching their results means copying the same typeck results for each child item. r? `@ghost`
2023-05-01Auto merge of #111040 - matthiaskrgr:rollup-g2sns0f, r=matthiaskrgrbors-882/+812
Rollup of 6 pull requests Successful merges: - #110823 (Tweak await span to not contain dot) - #111015 (Remove wrong assertion in match checking.) - #111023 (Test precise capture with a multi-variant enum and exhaustive patterns) - #111032 (Migrate `builtin_macros::asm` diagnostics to translatable diagnostics) - #111033 (Ping Nadrieril when changing exhaustiveness checking) - #111037 (Close parentheses for `offset_of` in AST pretty printing) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-05-01Rollup merge of #111037 - Nilstrieb:close-the-offsetof, r=compiler-errorsMatthias Krüger-1/+5
Close parentheses for `offset_of` in AST pretty printing HIR pretty printing already handles it correctly. This will conflict with #110694 but it seems like that PR is gonna take bit more time.
2023-05-01Rollup merge of #111033 - Nadrieril:Nadrieril-triagebot, r=compiler-errorsMatthias Krüger-0/+4
Ping Nadrieril when changing exhaustiveness checking Hi! I don't know what the procedure is but I'd quite like to be pinged when people try to change the exhaustiveness code. It's a tricky piece of code and I'm the de facto expert on it; I'd like to be available to provide feedback to contributors who wish to change it. I occasionally look through the git history and open PRs but a triagebot ping would be much more convenient. The message says "might have" because `check_match.rs` contains a little bit of exhaustiveness logic and a lot of other match-related checks, so this ping will have false positives.
2023-05-01Rollup merge of #111032 - clubby789:migrate-asm-diagnostics, r=compiler-errorsMatthias Krüger-72/+179
Migrate `builtin_macros::asm` diagnostics to translatable diagnostics cc #100717 Planning on working through the remaining diagnostics in this crate
2023-05-01Rollup merge of #111023 - tmiasko:multi-variant-capture, r=compiler-errorsMatthias Krüger-0/+21
Test precise capture with a multi-variant enum and exhaustive patterns Add test checking that it is possible to capture fields of a multi-variant enum, when remaining variants are visibly uninhabited (under the `exhaustive_patterns` feature gate).
2023-05-01Rollup merge of #111015 - cjgillot:chained-let-and, r=compiler-errorsMatthias Krüger-3/+10
Remove wrong assertion in match checking. This assertions is completely misguided, introduced by https://github.com/rust-lang/rust/pull/108504. The responsible PR is on beta, nominating for backport. Instead of checking that this is not a `&&`, it would make sense to check that neither arms of that `&&` is a `let`. This seems like a lot of code for unclear benefit. r? `@saethlin`
2023-05-01Rollup merge of #110823 - compiler-errors:tweak-await-span, r=b-naberMatthias Krüger-806/+593
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-30Close parentheses for `offset_of` in AST pretty printingNilstrieb-1/+5
HIR pretty printing already handles it correctly.
2023-04-30Ping Nadrieril when changing exhaustiveness checkingNadrieril-0/+4
2023-04-30update lockfileRalf Jung-2/+4
2023-04-30Migrate `builtin_macros::asm` diagnostics to translatable diagnosticsclubby789-72/+179
2023-04-30make it more obvious when the rustc-pull failedRalf Jung-3/+3
2023-04-30Merge from rustcRalf Jung-18849/+29994
2023-04-30Auto merge of #110427 - Nilstrieb:parallel-bootstrap-startup, r=albertlarsan68bors-15/+86
Parallelize initial Rust download in bootstrap Parallelize the initial download of Rust in `bootstrap.py` `time ./x.py --help` after `rm -r build` Before: 33s After: 27s
2023-04-30Parallelize initial rust extractionNilstrieb-2/+68
This is quite slow and embarassingly parallel, even in python. This speeds up the initial bootstrap build by about 5-10s.
2023-04-30Only cache typeck results if it's the typeck rootMichael Goulet-1/+1
2023-04-30Test precise capture with a multi-variant enum and exhaustive patternsTomasz Miąsko-0/+21
Add test checking that it is possible to capture fields of a multi-variant enum, when remaining variants are visibly uninhabited (under the `exhaustive_patterns` feature gate).
2023-04-30Auto merge of #111017 - matthiaskrgr:rollup-yy9updi, r=matthiaskrgrbors-139/+268
Rollup of 6 pull requests Successful merges: - #110118 (download-rustc: Give a better error message if artifacts can't be dowloaded) - #110631 (rustdoc: catch and don't blow up on impl Trait cycles) - #110732 (Make ConstProp some tests unit.) - #110996 (bootstrap: Fix compile error: unused-mut) - #110999 (Output some bootstrap messages on stderr) - #111000 (Remove unneeded function call in `core::option`.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-30Rollup merge of #111000 - JohnBobbo96:core_option_unneeded_function, r=jyn514Matthias Krüger-6/+2
Remove unneeded function call in `core::option`. r? `@jyn514`
2023-04-30Rollup merge of #110999 - clubby789:bootstrap-stderr, r=Mark-SimulacrumMatthias Krüger-37/+47
Output some bootstrap messages on stderr Fixes #110995
2023-04-30Rollup merge of #110996 - loongarch-rs:fix-bootstrap, r=ozkanonurMatthias Krüger-1/+1
bootstrap: Fix compile error: unused-mut Compile errors: ``` Compiling bootstrap v0.0.0 (/home/hev/rust/rust/src/bootstrap) error: variable does not need to be mutable --> config.rs:1312:17 | 1312 | let mut build_target = config | ----^^^^^^^^^^^^ | | | help: remove this `mut` | = note: `-D unused-mut` implied by `-D warnings` error: could not compile `bootstrap` (lib) due to previous error ```
2023-04-30Rollup merge of #110732 - cjgillot:unit-const-prop, r=tmiaskoMatthias Krüger-75/+79
Make ConstProp some tests unit. Part of the effort to tidy up mir-opt test suite.
2023-04-30Rollup merge of #110631 - notriddle:notriddle/impl-trait-cycle, r=GuillaumeGomezMatthias Krüger-19/+127
rustdoc: catch and don't blow up on impl Trait cycles Fixes #110629 An odd feature of Rust is that `Foo` is invalid, but `Bar` is okay: type Foo<'a, 'b> = Box<dyn PartialEq<Foo<'a, 'b>>>; type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>>; To get it right, track every time rustdoc descends into a type alias, so if it shows up twice, it can be write the path instead of infinitely expanding it.
2023-04-30Rollup merge of #110118 - jyn514:download-error, r=Mark-SimulacrumMatthias Krüger-1/+12
download-rustc: Give a better error message if artifacts can't be dowloaded It should be very rare in practice to happen; people would need to both have `download-ci-llvm` disabled and `download-rustc` enabled. I think it may be more common if we start turning this on by default, though. Helps with https://github.com/rust-lang/rust/issues/81930. Before: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds/bf5cad8e775fb326465e5c1b98693e5d259da156/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz curl: (22) The requested URL returned error: 404 ``` After: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds/bf5cad8e775fb326465e5c1b98693e5d259da156/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz curl: (22) The requested URL returned error: 404 error: failed to download pre-built rustc from CI note: old builds get deleted after a certain time help: if trying to compile an old commit of rustc, disable `download-rustc` in config.toml: [rust] download-rustc = false ```
2023-04-30Remove wrong assertion.Camille GILLOT-3/+10
2023-04-30Auto merge of #103406 - Jules-Bertholet:from_clone_slice_to_box, r=dtolnaybors-8/+31
Loosen `From<&[T]> for Box<[T]>` bound to `T: Clone` Also loosens `From<Cow<'_, [T]>> for Box<[T]>`'s bound. [Discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/From.3C.26.5BT.5D.3E.20impls.20consistency)
2023-04-30Auto merge of #110942 - Zalathar:coverage-tests, r=Mark-Simulacrumbors-1/+1
Don't accidentally ignore all output in `tests/run-make/coverage-reports` diffs Because the literal pipe `|` character was not escaped, these regexes ended up accidentally ignoring every line in the coverage report output, so the tests would not fail even if the output was wrong.
2023-04-30Auto merge of #110935 - scottmcm:always-ord, r=Mark-Simulacrumbors-8/+8
`inline(always)` for `lt`/`le`/`ge`/`gt` on integers and floats I happened to notice one of these not getting inlined as part of `Range::next` in <https://rust.godbolt.org/z/4WKWWxj1G> ```rust bb1: { StorageLive(_5); _6 = &mut _4; StorageLive(_21); StorageLive(_14); StorageLive(_15); _15 = &((*_6).0: usize); StorageLive(_16); _16 = &((*_6).1: usize); _14 = <usize as PartialOrd>::lt(move _15, move _16) -> bb7; } ``` So since a call for something that's just one instruction is never the right choice, `#[inline(always)]` seems appropriate, like we have it on things like the rotate methods on integers.
2023-04-30Auto merge of #111001 - matthiaskrgr:rollup-u590scu, r=matthiaskrgrbors-119/+375
Rollup of 7 pull requests Successful merges: - #110586 (Fix Unreadable non-UTF-8 output on localized MSVC) - #110652 (Add test for warning-free builds of `core` under `no_global_oom_handling`) - #110973 (improve error notes for packed struct reference diagnostic) - #110981 (Move most rustdoc-ui tests into subdirectories) - #110983 (rustdoc: Get `repr` information through `AdtDef` for foreign items) - #110984 (Do not resolve anonymous lifetimes in consts to be static.) - #110997 (Improve internal field comments on `slice::Iter(Mut)`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-29rustdoc: catch and don't blow up on impl Trait cyclesMichael Howell-19/+127
An odd feature of Rust is that `Foo` is invalid, but `Bar` is okay: type Foo<'a, 'b> = Box<dyn PartialEq<Foo<'a, 'b>>>; type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>>; To get it right, track every time rustdoc descends into a type alias, so if it shows up twice, it can be write the path instead of infinitely expanding it.
2023-04-30Rollup merge of #110997 - scottmcm:slice-iter-comments, r=the8472Matthias Krüger-6/+20
Improve internal field comments on `slice::Iter(Mut)` I wrote these in a previous PR that I ended up withdrawing, so might as well submit them separately. `@bors` rollup=always
2023-04-30Rollup merge of #110984 - cjgillot:const-infer-lifetime, r=compiler-errorsMatthias Krüger-2/+22
Do not resolve anonymous lifetimes in consts to be static. Fixes https://github.com/rust-lang/rust/issues/110931
2023-04-30Rollup merge of #110983 - GuillaumeGomez:foreign-repr, r=notriddleMatthias Krüger-54/+136
rustdoc: Get `repr` information through `AdtDef` for foreign items As suggested by `@notriddle,` this approach works too. The only downside is that the display of the original attribute isn't kept, but I think it's an acceptable downside. r? `@notriddle`
2023-04-30Rollup merge of #110981 - jyn514:rustdoc-tests, r=notriddleMatthias Krüger-29/+40
Move most rustdoc-ui tests into subdirectories This makes it easier to know where to add a new test, and makes the top-level directory less overwhelming.
2023-04-30Rollup merge of #110973 - bindsdev:packed-struct-ref-diagnostic-note, ↵Matthias Krüger-27/+55
r=compiler-errors improve error notes for packed struct reference diagnostic Addresses #110199
2023-04-30Rollup merge of #110652 - ojeda:core-no_global_oom_handling-test, ↵Matthias Krüger-0/+6
r=Mark-Simulacrum Add test for warning-free builds of `core` under `no_global_oom_handling` `tests/run-make/alloc-no-oom-handling` tests that `alloc` under `no_global_oom_handling` builds and is warning-free. Do the same for `core` to prevent issues such as [1]. Link: https://github.com/rust-lang/rust/pull/110649 [1]
2023-04-30Rollup merge of #110586 - ChrisDenton:msvc-oem-output, r=workingjubileeMatthias Krüger-1/+96
Fix Unreadable non-UTF-8 output on localized MSVC Fixes #35785 by converting non UTF-8 linker output to Unicode using the OEM code page. Before: ```text = note: Non-UTF-8 output: LINK : fatal error LNK1181: cannot open input file \'m\x84rchenhaft.obj\'\r\n ``` After: ```text = note: LINK : fatal error LNK1181: cannot open input file 'märchenhaft.obj' ``` The difference is more dramatic if using a non-ascii language pack for Windows.
2023-04-29Remove unneeded function call in `core::option`.John Bobbo-6/+2
2023-04-29`cfg`-gate `BoxFromSlice` traitJules Bertholet-0/+1
Co-authored-by: David Tolnay <dtolnay@gmail.com>
2023-04-29Auto merge of #109611 - Zoxc:query-engine-rem, r=cjgillotbors-356/+344
Remove `QueryEngine` trait This removes the `QueryEngine` trait and `Queries` from `rustc_query_impl` and replaced them with function pointers and fields in `QuerySystem`. As a side effect `OnDiskCache` is moved back into `rustc_middle` and the `OnDiskCache` trait is also removed. This has a couple of benefits. - `TyCtxt` is used in the query system instead of the removed `QueryCtxt` which is larger. - Function pointers are more flexible to work with. A variant of https://github.com/rust-lang/rust/pull/107802 is included which avoids the double indirection. For https://github.com/rust-lang/rust/pull/108938 we can name entry point `__rust_end_short_backtrace` to avoid some overhead. For https://github.com/rust-lang/rust/pull/108062 it avoids the duplicate `QueryEngine` structs. - `QueryContext` now implements `DepContext` which avoids many `dep_context()` calls in `rustc_query_system`. - The `rustc_driver` size is reduced by 0.33%, hopefully that means some bootstrap improvements. - This avoids the unsafe code around the `QueryEngine` trait. r? `@cjgillot`
2023-04-29Auto merge of #2862 - RalfJung:rustup, r=RalfJungbors-3/+3
Rustup
2023-04-29blessRalf Jung-2/+2
2023-04-29Preparing for merge from rustcRalf Jung-1/+1
2023-04-29Unify attributes retrieval for JSON and HTML renderingGuillaume Gomez-79/+76
2023-04-29Output some bootstrap messages on stderrclubby789-37/+47
2023-04-29Extend foreign inlined item with `#[repr()]` testGuillaume Gomez-5/+39