about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-04-24Update booksrustbot-0/+0
2023-04-24Auto merge of #110672 - Ezrashaw:allow-array-simd-in-inline-asm, ↵bors-13/+50
r=workingjubilee allow array-style simd in inline asm Required for [MCP#621](https://github.com/rust-lang/compiler-team/issues/621) to be implemented. r? `@workingjubilee`
2023-04-24Auto merge of #110752 - matthiaskrgr:rollup-959s77u, r=matthiaskrgrbors-395/+509
Rollup of 6 pull requests Successful merges: - #110255 (Suggest using integration tests for test crate using own proc-macro) - #110514 (Remove `find_map_relevant_impl`) - #110566 (Don't create projection ty for const projection) - #110637 (Group some sections of our logs in github actions) - #110706 (Add `intrinsics::transmute_unchecked`) - #110714 (Normalize types and consts in MIR opts.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-24Rollup merge of #110714 - cjgillot:reveal-consts, r=oli-obkMatthias Krüger-9/+23
Normalize types and consts in MIR opts. Some passes were using a non-RevealAll param_env, which is needlessly restrictive in mir-opts. As a drive-by, we normalize all constants, since just normalizing their types is not enough.
2023-04-24Rollup merge of #110706 - scottmcm:transmute_unchecked, r=oli-obkMatthias Krüger-54/+43
Add `intrinsics::transmute_unchecked` This takes a whole 3 lines in `compiler/` since it lowers to `CastKind::Transmute` in MIR *exactly* the same as the existing `intrinsics::transmute` does, it just doesn't have the fancy checking in `hir_typeck`. Added to enable experimenting with the request in <https://github.com/rust-lang/rust/pull/106281#issuecomment-1496648190> and because the portable-simd folks might be interested for dependently-sized array-vector conversions. It also simplifies a couple places in `core`. See also https://github.com/rust-lang/rust/pull/108442#issuecomment-1474777273, where `CastKind::Transmute` was added having exactly these semantics before the lang meeting (which I wasn't in) independently expressed interest.
2023-04-24Rollup merge of #110637 - oli-obk:gha, r=jyn514Matthias Krüger-177/+190
Group some sections of our logs in github actions This makes logs a little bit more readable as you can now collapse all the parts that don't interest you (and they get collapsed automatically) Obviously there's a lot more sites where we can/need to do this, too, but this is already helpful imo r? ```@jyn514```
2023-04-24Rollup merge of #110566 - compiler-errors:bad-projection-term, ↵Matthias Krüger-8/+56
r=cjgillot,BoxyUwU Don't create projection ty for const projection Fixes #110549
2023-04-24Rollup merge of #110514 - compiler-errors:remove-find_map_relevant_impl, ↵Matthias Krüger-142/+154
r=b-naber Remove `find_map_relevant_impl` Fixes #108895
2023-04-24Rollup merge of #110255 - clubby789:proc-macro-test-help, r=jackh726Matthias Krüger-5/+43
Suggest using integration tests for test crate using own proc-macro cc #110247
2023-04-24Auto merge of #109590 - Nilstrieb:copy-hir, r=oli-obkbors-111/+72
Impl `Copy` for most HIR types This simplifies the invocation of the `arena_types` macro and probably makes working with HIR nicer in general. Based on #109588
2023-04-24Auto merge of #110736 - matthiaskrgr:rollup-gorv8zp, r=matthiaskrgrbors-38/+68
Rollup of 6 pull requests Successful merges: - #110661 (rustdoc: clean up settings.css and settings.js) - #110663 (Add note about change in bootstrap defaults) - #110664 (stop `x fmt` formatting untracked directories) - #110668 (Fix printing native CPU on cross-compiled compiler.) - #110689 (Fix grammar in core::hint::unreachable_unchecked() docs) - #110700 (Don't infer fn return type to return itself) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-23Don't create projection ty for const projectionMichael Goulet-8/+56
2023-04-23Rollup merge of #110700 - compiler-errors:fn-ret-fn, r=oli-obkMatthias Krüger-11/+46
Don't infer fn return type to return itself Fixes #110687
2023-04-23Rollup merge of #110689 - Spartan2909:fix-grammar, r=JohnTitorMatthias Krüger-2/+2
Fix grammar in core::hint::unreachable_unchecked() docs Fixes a minor grammar error in the docs for core::hint::unreachable_unchecked()
2023-04-23Rollup merge of #110668 - ehuss:fix-native-cpu-list, r=cuviperMatthias Krüger-1/+3
Fix printing native CPU on cross-compiled compiler. If `rustc` is cross-compiled from a different host, then the "native" entry in `rustc --print=target-cpus` would not appear. There is a check in the printing code that will avoid printing the "native" entry if the user has passed `--target`. However, that check was comparing the `--target` value with the `LLVM_TARGET_TRIPLE` which is the triple of the host that `rustc` was built on (the "build" target in Rust lingo), not the target it was being built for (the "host" in Rust lingo). This fixes it to use the target that LLVM was built for (which I'm pretty sure this is the correct function to determine that). This fixes the cpu listing for aarch64-apple-darwin which is built on CI using the x86_64-apple-darwin host.
2023-04-23Rollup merge of #110664 - Ezrashaw:fix-bootstrap-build-format, r=jyn514Matthias Krüger-4/+2
stop `x fmt` formatting untracked directories I don't think there's anything else to do? I've confirmed that you get a "skip untracked path foo/ during rustfmt invocations" for the alternative build directory. r? `@jyn514`
2023-04-23Rollup merge of #110663 - Mark-Simulacrum:add-compat-note, r=cuviperMatthias Krüger-1/+5
Add note about change in bootstrap defaults Not a huge fan of the proposed wording, open to changes in that. Per https://github.com/rust-lang/rust/pull/106886#issuecomment-1518325832. cc `@jonhoo` r? `@cuviper` perhaps?
2023-04-23Rollup merge of #110661 - notriddle:notriddle/settings-js-handlekey, ↵Matthias Krüger-19/+10
r=GuillaumeGomez rustdoc: clean up settings.css and settings.js `handleKey` was added in 9dc5dfb97504c538bc72f367a77bb9f714c30097 and 704050da2334c465784954d81c8990c4bc7a92c5 because the browser-native checkbox was `display: none`, breaking native keyboard accessibility. The native checkbox is now merely `appearance: none`, which does not turn off [behavior semantics], so JavaScript to reimplement it isn't needed any more. [behavior semantics]: https://w3c.github.io/csswg-drafts/css-ui/#appearance-semantics The other, one line change to settings.css is follow-up to #110205
2023-04-23Auto merge of #110281 - ozkanonur:multiarch-compatible-sysroot-finding, ↵bors-17/+18
r=jackh726 make sysroot finding compatible with multiarch systems Tested on Debian 11 multiarch, worked just fine. resolves #109994
2023-04-23Fix printing native CPU on cross-compiled compiler.Eric Huss-1/+3
2023-04-23Auto merge of #110705 - saethlin:ignore-locals-cost, r=cjgillotbors-82/+450
Remove the size of locals heuristic in MIR inlining This heuristic doesn't necessarily correlate to complexity of the MIR Body. In particular, a lot of straight-line code in MIR tends to never reuse a local, even though any optimizer would effectively reuse the storage or just put everything in registers. So it doesn't even necessarily make sense that this would be a stack size heuristic. So... what happens if we just delete the heuristic? The benchmark suite improves significantly. Less heuristics better? r? `@cjgillot`
2023-04-23Auto merge of #108118 - oli-obk:lazy_typeck, r=cjgillotbors-423/+400
Run various queries from other queries instead of explicitly in phases These are just legacy leftovers from when rustc didn't have a query system. While there are more cleanups of this sort that can be done here, I want to land them in smaller steps. This phased order of query invocations was already a lie, as any query that looks at types (e.g. the wf checks run before) can invoke e.g. const eval which invokes borrowck, which invokes typeck, ...
2023-04-23Auto merge of #107404 - cjgillot:const-debuginfo, r=oli-obkbors-82/+85
Turn on ConstDebugInfo pass. Split from https://github.com/rust-lang/rust/pull/103657 Moving those constant into debuginfo allows to shrink the number of locals and the actual size of the MIR body.
2023-04-23Use param_env_reveal_all_normalized in MIR opts.Camille GILLOT-8/+10
2023-04-23Also reveal constants before MIR opts.Camille GILLOT-1/+13
2023-04-23Auto merge of #110497 - cjgillot:span-ctxt, r=b-naberbors-10/+14
Refactor `SyntaxContext::ctxt` logic. I'm still trying to make a test from the issue. cc `@deepink-mas` does this solve the issue? Fixes https://github.com/rust-lang/rust/issues/110230
2023-04-23allow array-style simd in inline asmEzra Shaw-13/+50
2023-04-23Auto merge of #110655 - ChrisDenton:read-to-end, r=joshtriplettbors-24/+43
Limit read size in `File::read_to_end` loop Fixes #110650. Windows file reads have perf overhead that's proportional to the buffer size. When we have a reasonable expectation that we know the file size, we can set a reasonable upper bound for the size of the buffer in one read call.
2023-04-23Auto merge of #110186 - Nilstrieb:update-time, r=Mark-Simulacrumbors-43/+276
Update chrono/spdx-rs/time This gets rid of https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26235
2023-04-22Add `intrinsics::transmute_unchecked`Scott McMurray-54/+43
This takes a whole 3 lines in `compiler/` since it lowers to `CastKind::Transmute` in MIR *exactly* the same as the existing `intrinsics::transmute` does, it just doesn't have the fancy checking in `hir_typeck`. Added to enable experimenting with the request in <https://github.com/rust-lang/rust/pull/106281#issuecomment-1496648190> and because the portable-simd folks might be interested for dependently-sized array-vector conversions. It also simplifies a couple places in `core`.
2023-04-22Remove the size of locals heuristic in MIR inliningBen Kimock-82/+450
2023-04-23Fortify test.Camille GILLOT-7/+15
2023-04-22Group entire build steps in the gha logsOli Scherer-177/+190
2023-04-22Auto merge of #110703 - clubby789:synstructure-remove, r=Nilstriebbors-2/+0
Remove unused `synstructure` dep `synstructure` is no longer used now that this crate was split out from rustc_macros `@rustbot` label +C-cleanup
2023-04-22Turn on ConstDebugInfo pass.Wesley Wiser-75/+69
2023-04-22Set debug location to debug operand spill.Camille GILLOT-0/+1
2023-04-22Remove unused `synstructure` depclubby789-2/+0
2023-04-22Also arena-allocate `ast::MacroDef` to make `Item: Copy`Nilstrieb-5/+6
2023-04-22Impl `Copy` for almost all HIR typesNilstrieb-106/+66
This simplifies the invocation of the `arena_types` macro and probably makes working with HIR nicer in general.
2023-04-22Update chrono/spdx-rsnils-43/+276
This gets rid of https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26235
2023-04-22Auto merge of #110523 - ecnelises:llvm_isa_fix, r=cuviperbors-8/+8
Replace LLVM any_isa with any_cast Per https://github.com/rust-lang/llvm-project/blob/585a6eb3ebf7c40fd7c1b23e3ece557b3cc2aa36/llvm/include/llvm/ADT/Any.h#L130 , `any_isa` has been deprecated in LLVM. Use `any_cast` instead to avoid warnings.
2023-04-22Don't infer fn return type to return itselfMichael Goulet-11/+46
2023-04-22Auto merge of #110674 - compiler-errors:expect-projection-term-eq-succeeds, ↵bors-5/+10
r=BoxyUwU Expect that equating a projection term always succeeds in new solver These should never fail. If they do, we have a problem with the logic that replaces a projection goal's term with an unconstrained infer var. Let's make sure we ICE in that case.
2023-04-22Auto merge of #109753 - compiler-errors:replenish-region-constraints, r=aliemjaybors-33/+43
Clone region var origins instead of taking them in borrowck Fixes an issue with the new solver where reporting a borrow-checker error ICEs because it calls `InferCtxt::evaluate_obligation`. This also removes a handful of unnecessary `tcx.infer_ctxt().build()` calls that are only there to mitigate this same exact issue, but with the old solver. Fixes compiler-errors/next-solver-hir-issues#12. ---- This implements `@aliemjay's` solution where we just don't *take* the region constraints, but clone them. This potentially makes it easier to write a bug about taking region constraints twice or never at all, but again, not many folks are touching this code.
2023-04-22Fix grammarCaleb Robson-2/+2
2023-04-22Auto merge of #109507 - Amanieu:panic-oom-payload, r=davidtwcobors-878/+138
Report allocation errors as panics OOM is now reported as a panic but with a custom payload type (`AllocErrorPanicPayload`) which holds the layout that was passed to `handle_alloc_error`. This should be review one commit at a time: - The first commit adds `AllocErrorPanicPayload` and changes allocation errors to always be reported as panics. - The second commit removes `#[alloc_error_handler]` and the `alloc_error_hook` API. ACP: https://github.com/rust-lang/libs-team/issues/192 Closes #51540 Closes #51245
2023-04-22Auto merge of #104844 - cjgillot:mention-eval-place, r=jackh726,RalfJungbors-39/+201
Evaluate place expression in `PlaceMention` https://github.com/rust-lang/rust/pull/102256 introduces a `PlaceMention(place)` MIR statement which keep trace of `let _ = place` statements from surface rust, but without semantics. This PR proposes to change the behaviour of `let _ =` patterns with respect to the borrow-checker to verify that the bound place is live. Specifically, consider this code: ```rust let _ = { let a = 5; &a }; ``` This passes borrowck without error on stable. Meanwhile, replacing `_` by `_: _` or `_p` errors with "error[E0597]: `a` does not live long enough", [see playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c448d25a7c205dc95a0967fe96bccce8). This PR *does not* change how `_` patterns behave with respect to initializedness: it remains ok to bind a moved-from place to `_`. The relevant test is `tests/ui/borrowck/let_underscore_temporary.rs`. Crater check found no regression. For consistency, this PR changes miri to evaluate the place found in `PlaceMention`, and report eventual dangling pointers found within it. r? `@RalfJung`
2023-04-22Auto merge of #110567 - JohnBobbo96:monomorphize-dyn-dispatch, r=b-naberbors-20/+91
Remove some uses of dynamic dispatch during monomorphization/partitioning. This removes a few uses of dynamic dispatch and instead uses generics, as well as an enum to allow for other partitioning methods to be added later.
2023-04-22Expect that equating a projection term always succeeds in new solverMichael Goulet-5/+10
2023-04-22Auto merge of #110666 - JohnTitor:rollup-3pwilte, r=JohnTitorbors-180/+200
Rollup of 7 pull requests Successful merges: - #109949 (rustdoc: migrate `document_type_layout` to askama) - #110622 (Stable hash tag (discriminant) of `GenericArg`) - #110635 (More `IS_ZST` in `library`) - #110640 (compiler/rustc_target: Raise m68k-linux-gnu baseline to 68020) - #110657 (nit: consistent naming for SimplifyConstCondition) - #110659 (rustdoc: clean up JS) - #110660 (Print ty placeholders pretty) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup