about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-11-22Keep rows with guards in the matrixNadrieril-60/+52
2023-11-22Respect `split` invariants for `Opaque`sNadrieril-25/+59
2023-11-22Abstract over the list of `WitnessStack`sNadrieril-69/+106
2023-11-22Merge `Queries::{ongoing_codegen,linker}`.Nicholas Nethercote-21/+15
There is no real need for them to be separate.
2023-11-22Make `Compiler::{sess,codegen_backend}` public.Nicholas Nethercote-41/+28
And remove the relevant getters on `Compiler` and `Queries`.
2023-11-22Add two useful comments.Nicholas Nethercote-0/+4
2023-11-22Add comments about a timer.Nicholas Nethercote-0/+3
2023-11-22Tweak `lower_pattern`Nadrieril-2/+4
2023-11-22Add some testsNadrieril-202/+238
2023-11-22Split critical call edges just before code generationTomasz Miąsko-1/+1
2023-11-22Split critical call edges in coroutine drop shimTomasz Miąsko-1/+2
2023-11-22Validate there are no critical call edges in optimized MIRTomasz Miąsko-0/+53
2023-11-22Auto merge of #118152 - matthiaskrgr:rollup-bqcck4w, r=matthiaskrgrbors-115/+286
Rollup of 5 pull requests Successful merges: - #117972 (Add VarDebugInfo to Stable MIR) - #118109 (rustdoc-search: simplify `checkPath` and `sortResults`) - #118110 (Document `DefiningAnchor` a bit more) - #118112 (Don't ICE when ambiguity is found when selecting `Index` implementation in typeck) - #118135 (Remove quotation from filename in stable_mir) Failed merges: - #118012 (Add support for global allocation in smir) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-22allow clippy style in windows/c.rsChris Denton-0/+1
We intentional use the Windows API style here.
2023-11-22Remove outdated reference to compiler plugins.Nicholas Nethercote-1/+1
2023-11-22Add some comments.Nicholas Nethercote-0/+8
2023-11-21Rollup merge of #118135 - ouz-a:fix_stable_span, r=celinvalMatthias Krüger-10/+8
Remove quotation from filename in stable_mir Previously we had quotation marks in filenames which is obviously wrong this fixes that. r? ```@celinval```
2023-11-21Rollup merge of #118112 - compiler-errors:index-ambiguity-ice, r=aliemjayMatthias Krüger-4/+56
Don't ICE when ambiguity is found when selecting `Index` implementation in typeck Fixes #118111 The problem here is when we're manually "selecting" an impl for `base_ty: Index<?0>`, we don't consider placeholder region errors (leak check) or ambiguous predicates. Those can lead to us not actually emitting any fulfillment errors on line 3131.
2023-11-21Rollup merge of #118110 - compiler-errors:defining-anchor, r=aliemjayMatthias Krüger-4/+17
Document `DefiningAnchor` a bit more r? types
2023-11-21Rollup merge of #118109 - notriddle:notriddle/search-cleanup-2, r=GuillaumeGomezMatthias Krüger-92/+77
rustdoc-search: simplify `checkPath` and `sortResults` These two commits reduce the amount of code in search.js with no noticeable change in performance. https://notriddle.com/rustdoc-html-demo-5/profile-5/index.html
2023-11-21Rollup merge of #117972 - ouz-a:stable_debuginfo, r=celinvalMatthias Krüger-5/+128
Add VarDebugInfo to Stable MIR Previously we omitted `VarDebugInfo` because we didn't have `Projection` now that https://github.com/rust-lang/rust/pull/117517 is merged it's possible to add `VarDebugInfo` information in `Body`. This PR adds stable version of the `VarDebugInfo` to `Body` r? ```@celinval```
2023-11-21update -Cehcont-guard and commentArlie Davis-3/+7
2023-11-21Auto merge of #118143 - Nilstrieb:only-borrow-what-you-need, r=compiler-errorsbors-1174/+1101
Fix `clippy::needless_borrow` in the compiler `x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now. r? `@compiler-errors` you told me you want to review this I will do a self review first (which, for this, is easiest on GitHub once the PR is open) - did it
2023-11-21convert ehcont-guard to an unstable optionArlie Davis-5/+6
2023-11-21x.py fmtArlie Davis-5/+1
2023-11-21Add support for generating the EHCont sectionArlie Davis-2/+76
In the future Windows will enable Control-flow Enforcement Technology (CET aka Shadow Stacks). To protect the path where the context is updated during exception handling, the binary is required to enumerate valid unwind entrypoints in a dedicated section which is validated when the context is being set during exception handling. The required support for EHCONT has already been merged into LLVM, long ago. This change adds the Rust codegen option to enable it. Reference: * https://reviews.llvm.org/D40223 This also adds a new `ehcont-guard` option to the bootstrap config which enables EHCont Guard when building std.
2023-11-21Update the minimum external LLVM to 16.Dario Nieuwenhuis-251/+42
2023-11-22Update itertools to 0.11.Nicholas Nethercote-5/+5
Because the API for `with_position` improved in 0.11 and I want to use it.
2023-11-22Factor out common code in `PrintState`.Nicholas Nethercote-8/+11
The AST and HIR versions of `State::print_ident` are textually identical, but the types differ slightly. This commit factors out the common code they both have by replacing `print_ident` with `ann_post`, which is a smaller function that still captures the type difference.
2023-11-22Streamline `PrintState`.Nicholas Nethercote-99/+83
`PrintState` is a trait containing code that can be used by both AST and HIR pretty-printing. But several of its methods are only used by AST printing. This commit moves those methods out of the trait and into the AST `State` impl, so they are not exposed unnecessarily. This commit also removes four unused methods: `param_to_string`, `foreign_item_to_string`, `assoc_item_to_string`, and `print_inner_attributes_inline`.
2023-11-22Remove unused `PrintState::generic_params_to_string` method.Nicholas Nethercote-4/+0
2023-11-22Remove or downgrade unnecessary `pub` visibility markers.Nicholas Nethercote-50/+44
2023-11-22Remove `NO_ANN`.Nicholas Nethercote-4/+4
This makes `rustc_hir_pretty` more like `rustc_ast_pretty`.
2023-11-22Remove `IterDelimited`.Nicholas Nethercote-52/+13
itertools has `with_position` which does the same thing.
2023-11-22Update itertools to 0.11.Nicholas Nethercote-18/+18
Because the API for `with_position` improved in 0.11 and I want to use it.
2023-11-22Remove unnecessary derives.Nicholas Nethercote-2/+1
2023-11-22Remove unneeded features.Nicholas Nethercote-2/+0
2023-11-21Fix some unnecessary castsNilstrieb-30/+18
`x clippy compiler -Aclippy::all -Wclippy::unnecessary_cast --fix` with some manual review to ensure every fix is correct.
2023-11-21Allow `#[deprecated(since = "TBD")]`Nilstrieb-4/+8
"TBD" is allowed by rustdoc, saying that it will be deprecated in a future version. rustc will also not actually warn on it.
2023-11-21rustdoc-search: make primitives and keywords less specialMichael Howell-79/+74
The search sorting code already sorts by item type discriminant, putting things with smaller discriminants first. There was also a special case for sorting keywords and primitives earlier, and this commit removes it by giving them lower discriminants. The sorting code has another criteria where items with descriptions appear earlier than items without, and that criteria has higher priority than the item type. This shouldn't matter, though, because primitives and keywords normally only appear in the standard library, and it always gives them descriptions.
2023-11-21Cancelable InitializationMarc Schreiber-14/+188
This commit provides additional initialization methods to Connection in order to support CTRL + C sigterm handling.
2023-11-21rustdoc-search: clean up `checkPath`Michael Howell-13/+3
This computes the same result with less code by computing many of the old checks at once: * It won't enter the loop if clength > length, because then the result of length - clength will be negative and the loop conditional will fail. * i + clength will never be greater than length, because it starts out as i = length - clength, implying that i + clength equals length, and it only goes down from there. * The aborted variable is replaced with control flow.
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-1174/+1101
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-21Tighten up linkage settings for LLVM bindingsBen Kimock-180/+206
2023-11-21Restore closure-kind error messagesMichael Goulet-73/+139
2023-11-21Remove ClosureKind predicate kindMichael Goulet-191/+76
2023-11-21[Miri] Do not respect RUSTC_HOST_FLAGS since RUSTFLAGS isn'tUrgau-1/+1
When building the standard library with Miri, it appears that cargo-miri does not respect the RUSTFLAGS and even if they did it would be wrong since they are created for ToolRustc not Std. To avoid errors ignore RUSTC_HOST_FLAGS for Miri.
2023-11-21Improve diagnostic for unexpected feature config name from CargoUrgau-0/+27
2023-11-21Remove `feature` from the list of well known check-cfg nameUrgau-18/+52
2023-11-21Uplift CanonicalVarInfo and friendsMichael Goulet-158/+313