about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-07-01add regression testEric Mark Martin-0/+38
2023-06-30resolve typerelative ctors to adtEric Mark Martin-13/+28
2023-06-28Auto merge of #98867 - cjgillot:metaloop, r=oli-obkbors-284/+197
Refactor metadata emission to avoid visiting HIR This PR refactors metadata emission to be based on tables and iteration over definitions. In a first part, this PR moves information from the `EntryKind` enum to tables, until removing the `EntryKind` enum. In a second part, the iteration scheme is refactored to avoid fetching HIR unless strictly necessary. r? `@ghost`
2023-06-28Auto merge of #113120 - Dylan-DPC:rollup-cz4qr3o, r=Dylan-DPCbors-309/+230
Rollup of 6 pull requests Successful merges: - #111571 (Implement proposed API for `proc_macro_span`) - #112236 (Simplify computation of killed borrows) - #112867 (More `ImplSource` nits) - #113019 (add note for non-exhaustive matches with guards) - #113094 (Fix invalid HTML DIV tag used in HEAD) - #113111 (add myself to review for t-types stuff) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-28Rollup merge of #113111 - BoxyUwU:boxy_t_types_review, r=compiler-errorsDylan DPC-0/+1
add myself to review for t-types stuff I think this is how the triagebot stuff works :sweat_smile: should mean that `r? types` can now assign me
2023-06-28Rollup merge of #113094 - GuillaumeGomez:fix-invalid-div-tag-in-head, ↵Dylan DPC-7/+5
r=notriddle,fmease Fix invalid HTML DIV tag used in HEAD Fixes https://github.com/rust-lang/rust/issues/113067. The issue also nicely explains the whole problem. r? ``@notriddle``
2023-06-28Rollup merge of #113019 - ericmarkmartin:warning-for-guard-non-exhaustion, ↵Dylan DPC-22/+66
r=fee1-dead add note for non-exhaustive matches with guards Associated issue: #92197 When a match statement includes guards on every match arm (and is therefore necessarily non-exhaustive), add a note to the error E0004 diagnostic noting this.
2023-06-28Rollup merge of #112867 - compiler-errors:more-impl-source-nits, r=lcnrDylan DPC-106/+47
More `ImplSource` nits Even more clean-ups, I'll put this up in parallel with the `select_in_new_trait_solver` PR. r? ``@lcnr``
2023-06-28Rollup merge of #112236 - cjgillot:interval-kill, r=davidtwcoDylan DPC-51/+43
Simplify computation of killed borrows Follow-up to https://github.com/rust-lang/rust/pull/111759 Processing the first block manually once makes the pre-order walk simpler.
2023-06-28Rollup merge of #111571 - jhpratt:proc-macro-span, r=m-ou-seDylan DPC-123/+68
Implement proposed API for `proc_macro_span` As proposed in [#54725 (comment)](https://github.com/rust-lang/rust/issues/54725#issuecomment-1546918161). I have omitted the byte-level API as it's already available as [`Span::byte_range`](https://doc.rust-lang.org/nightly/proc_macro/struct.Span.html#method.byte_range). `@rustbot` label +A-proc-macros r? `@m-ou-se`
2023-06-28Auto merge of #112708 - flip1995:clippy-freezing-pc-with-ice, r=oli-obkbors-9/+61
Avoid calling queries during query stack printing This has the side effect, that when Clippy should ICE (during an EarlyPass?) it will fill up the RAM with 2 GB/s and then freezes my Laptop. This is blocking the Clippy sync and might give some people really bad experiences, so this should be merged ASAP. r? `@cjgillot` cc `@Zoxc` I only commented this on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.60try_print_query_stack.60.20has.20.60ImplicitCtx.60.20during.20.60EarlyPass.60/near/363926180). I should've left a comment on the PR as well. My bad.
2023-06-28Rustdoc nit: refer to macro from docsOli Scherer-1/+1
2023-06-28remove cruftEric Mark Martin-1/+0
2023-06-28use translatable subdiagnosticEric Mark Martin-1/+9
2023-06-28add comment backEric Mark Martin-1/+2
2023-06-28add note for non-exhaustive matches with guardsEric Mark Martin-24/+60
2023-06-28Auto merge of #111269 - clubby789:validate-fluent-variables, r=davidtwcobors-18/+139
Validate fluent variable references in tests Closes #101109 Under `cfg(test)`, the `fluent_messages` macro will emit a list of variables referenced by each message and its attributes. The derive attribute will now emit a `#[test]` that checks that each referenced variable exists in the structure it's applied to.
2023-06-28Auto merge of #112307 - lcnr:operand-ref, r=compiler-errorsbors-39/+207
mir opt + codegen: handle subtyping fixes #107205 the same issue was caused in multiple places: - mir opts: both copy and destination propagation - codegen: assigning operands to locals (which also propagates values) I changed codegen to always update the type in the operands used for locals which should guard against any new occurrences of this bug going forward. I don't know how to make mir optimizations more resilient here. Hopefully the added tests will be enough to detect any trivially wrong optimizations going forward.
2023-06-27add boxy to t-types reviewBoxy-0/+1
2023-06-27Auto merge of #113105 - matthiaskrgr:rollup-rci0uym, r=matthiaskrgrbors-940/+1045
Rollup of 8 pull requests Successful merges: - #112207 (Add trustzone and virtualization target features for aarch32.) - #112454 (Make compiletest aware of targets without dynamic linking) - #112628 (Allow comparing `Box`es with different allocators) - #112692 (Provide more context for `rustc +nightly -Zunstable-options` on stable) - #112972 (Make `UnwindAction::Continue` explicit in MIR dump) - #113020 (Add tests impl via obj unless denied) - #113084 (Simplify some conditions) - #113103 (Normalize types when applying uninhabited predicate.) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-27Replace `id` attribute with `name` for `<meta>` tagGuillaume Gomez-6/+5
2023-06-27Rollup merge of #113103 - cjgillot:normalize-inhabited, r=compiler-errorsMatthias Krüger-1/+44
Normalize types when applying uninhabited predicate. Fixes https://github.com/rust-lang/rust/issues/112997
2023-06-27Rollup merge of #113084 - WaffleLapkin:less_map_or, r=NilstriebMatthias Krüger-45/+35
Simplify some conditions r? `@Nilstrieb` Some things taken out of my `is_none_or` pr.
2023-06-27Rollup merge of #113020 - ↵Matthias Krüger-0/+45
AnthonyKalaitzis:add-tests-impl-via-obj-unless-denied, r=compiler-errors Add tests impl via obj unless denied Fixes #112737 Add simple tests to check feature change in #112320 is performing as expected. Note: - Unsure about filenames, locations & function signature names (tried to make them something sensible)
2023-06-27Rollup merge of #112972 - nbdd0121:mir, r=davidtwcoMatthias Krüger-345/+346
Make `UnwindAction::Continue` explicit in MIR dump Makes it easier to spot unwinding related issues in MIR by making `UnwindAction::Continue` explicit, just like all other `UnwindAction`s.
2023-06-27Rollup merge of #112692 - jieyouxu:better-err-msg-for-unstable-options, ↵Matthias Krüger-474/+512
r=davidtwco Provide more context for `rustc +nightly -Zunstable-options` on stable <img width="724" alt="Screenshot 2023-06-16 123456" src="https://github.com/rust-lang/rust/assets/39484203/1933e172-cb9f-4e51-9540-ade803a88360"> Closes #110090.
2023-06-27Rollup merge of #112628 - gootorov:box_alloc_partialeq, r=joshtriplettMatthias Krüger-9/+26
Allow comparing `Box`es with different allocators Currently, comparing `Box`es over different allocators is not allowed: ```Rust error[E0308]: mismatched types --> library/alloc/tests/boxed.rs:22:20 | 22 | assert_eq!(b1, b2); | ^^ expected `Box<{integer}, ConstAllocator>`, found `Box<{integer}, AnotherAllocator>` | = note: expected struct `Box<{integer}, ConstAllocator>` found struct `Box<{integer}, AnotherAllocator>` For more information about this error, try `rustc --explain E0308`. error: could not compile `alloc` (test "collectionstests") due to previous error ``` This PR lifts this limitation
2023-06-27Rollup merge of #112454 - ferrocene:pa-compiletest-dynamic-linking, r=davidtwcoMatthias Krüger-66/+35
Make compiletest aware of targets without dynamic linking Some parts of the compiletest internals and some tests require dynamic linking to work, which is not supported by all targets. Before this PR, this was handled by if branches matching on the target name. This PR loads whether a target supports dynamic linking or not from the target spec, and adds a `// needs-dynamic-linking` attribute for tests that require it. Note that I was not able to replace all the old conditions based on the target name, as some targets have `dynamic_linking: true` in their spec but pretend they don't have it in compiletest. Also, to get this to work I had to *partially* revert #111472 (cc `@djkoloski` `@tmandry` `@bjorn3).` On one hand, only the target spec contains whether a target supports dynamic linking, but on the other hand a subset of the fields can be overridden through `-C` flags (as far as I'm aware only `-C panic=$strategy`). The solution I came up with is to take the target spec as the base, and then override the panic strategy based on `--print=cfg`. Hopefully that should not break y'all again.
2023-06-27Rollup merge of #112207 - qwandor:virt_feature, r=davidtwcoMatthias Krüger-0/+2
Add trustzone and virtualization target features for aarch32. These are LLVM target features which allow the `smc` and `hvc` instructions respectively to be used in inline assembly.
2023-06-27Auto merge of #113102 - matthiaskrgr:rollup-wpkbsw1, r=matthiaskrgrbors-50/+143
Rollup of 7 pull requests Successful merges: - #112518 (Detect actual span for getting unexpected token from parsing macros) - #112978 (Add suggestion for bad block fragment error) - #113068 (bootstrap: rename 'user' profile to 'dist') - #113079 (Use `CoverageKind::as_operand_id` instead of manually reimplementing it) - #113089 (Export AnalysisResults trait in rustc_mir_dataflow) - #113093 (`thir`: Add `Become` expression kind) - #113096 (Remove unused struct and tweak format macro uses) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-27Normalize types when applying uninhabited predicate.Camille GILLOT-1/+44
2023-06-27Encode impls in encode_impls.Camille GILLOT-46/+31
2023-06-27Use instrument macro.Camille GILLOT-13/+10
2023-06-27Retire encode_info_for_items.Camille GILLOT-83/+33
2023-06-27Encode Impl separately.Camille GILLOT-24/+31
2023-06-27Encode Trait info in def-id loop.Camille GILLOT-10/+8
2023-06-27Merge assoc_item functions.Camille GILLOT-50/+30
2023-06-27Encode fn_sig separately.Camille GILLOT-38/+91
Closures do not have a `fn_sig`, so no reason to encode one.
2023-06-27Rollup merge of #113096 - TaKO8Ki:remove-unused-struct, r=oli-obkMatthias Krüger-9/+2
Remove unused struct and tweak format macro uses This pul request removes an unused struct and tweaks `format!` uses.
2023-06-27Rollup merge of #113093 - WaffleLapkin:become_unuwuable_in_thir, r=NilstriebMatthias Krüger-9/+32
`thir`: Add `Become` expression kind This PR is pretty small and just adds `thir::ExprKind::Become`. I didn't include the checks that will be done on thir, since they are much more complicated and can be done in parallel with with MIR (or, well, at least I believe they can). r? `@Nilstrieb`
2023-06-27Rollup merge of #113089 - floriangru:mut_analyses_followup, r=oli-obkMatthias Krüger-5/+5
Export AnalysisResults trait in rustc_mir_dataflow Followup to https://github.com/rust-lang/rust/pull/108293 Re-exports the new trait defined in mentioned PR to make ResultsCursor::seek_before_primary_effect, ResultsCursor::seek_after_primary_effect... usable again outside the compiler itself.
2023-06-27Rollup merge of #113079 - Zalathar:as-operand-id, r=oli-obkMatthias Krüger-15/+2
Use `CoverageKind::as_operand_id` instead of manually reimplementing it These two pieces of code are functionally equivalent to the `CoverageKind::as_operand_id` method that already exists, and is already used elsewhere in this file. This slightly reduces the amount of code that manually pattern-matches on `CoverageKind`.
2023-06-27Rollup merge of #113068 - clubby789:bootstrap-user-to-dist, r=jyn514Matthias Krüger-10/+43
bootstrap: rename 'user' profile to 'dist' Fixes #112074 Unfortunately a big chunk of the diff is adding `PartialEq/Eq/Debug` impls so we can `assert_eq` but I think better to have them in the long run. For back compat, ensure `"maintainer"`, `"user"` and `"dist"` are all parsed as `Profile::Dist`. r? `@jyn514` cc `@AnakinSkywalkeer` who worked on the previous attempt at this
2023-06-27Rollup merge of #112978 - compiler-errors:bad-block-sugg, r=davidtwcoMatthias Krüger-0/+32
Add suggestion for bad block fragment error Makes it a bit clearer how to fix this parser restriction
2023-06-27Rollup merge of #112518 - chenyukang:yukang-fix-112458, r=davidtwcoMatthias Krüger-2/+27
Detect actual span for getting unexpected token from parsing macros Fixes #112458
2023-06-27Provide more context for `rustc +nightly -Zunstable-options` on stable许杰友 Jieyou Xu (Joe)-474/+512
2023-06-27Auto merge of #112516 - erikdesjardins:loop, r=davidtwcobors-15/+19
cg_llvm: use index-based loop in write_operand_repeatedly This should be easier for LLVM to analyze. Fixes #111603 This needs a perf run. [cc](https://github.com/rust-lang/rust/issues/111603#issuecomment-1567531178) `@caojoshua`
2023-06-27Avoid calling queries during query stack printingOli Scherer-13/+38
2023-06-27Add regression test for OOM issue on EarlyLintPass ICEPhilipp Krones-0/+27
2023-06-27avoid using `format!("{}", ..)`Takayuki Maeda-2/+2