about summary refs log tree commit diff
path: root/compiler
AgeCommit message (Collapse)AuthorLines
2024-04-20coverage. Lowering MC/DC statements to llvm-irzhuyunxing-3/+240
2024-04-19coverage. Generate Mappings of decisions and conditions for MC/DCzhuyunxing-41/+779
2024-04-19coverage. Add coverage-options=mcdc as gate for MC/DC instrumentzhuyunxing-11/+30
2024-04-18Ensure `[rust] debuginfo-level-std` doesn't change core's MIRScott McMurray-1/+14
2024-04-18At debuginfo=0, don't inline debuginfo when inliningScott McMurray-2/+4
2024-04-18Auto merge of #123144 - dpaoliello:arm64eclib, ↵bors-2/+4
r=GuillaumeGomez,ChrisDenton,wesleywiser Add support for Arm64EC to the Standard Library Adds the final pieces so that the standard library can be built for arm64ec-pc-windows-msvc (initially added in #119199) * Bumps `windows-sys` to 0.56.0, which adds support for Arm64EC. * Correctly set the `isEC` parameter for LLVM's `writeArchive` function. * Add `#![feature(asm_experimental_arch)]` to library crates where Arm64EC inline assembly is used, as it is currently unstable.
2024-04-18Auto merge of #124008 - nnethercote:simpler-static_assert_size, r=Nilstriebbors-38/+38
Simplify `static_assert_size`s. We want to run them on all 64-bit platforms. r? `@ghost`
2024-04-18Rollup merge of #124090 - durin42:llvm-19-riscv-feature, r=cuviperMatthias Krüger-4/+5
llvm: update riscv target feature to match LLVM 19 In llvm/llvm-project@9067070d91e9d8cdd8509ffa56a076f08a3d7281 they ended up largely reverting llvm/llvm-project@e81796671890b59c110f8e41adc7ca26f8484d20. This means the change we did in rust-lang/rust@b378059e6b2573c5356423fa31d184a89a3b6029 is now only corrct for LLVM 18...so we have to adjust again. ``@rustbot`` label: +llvm-main
2024-04-18Rollup merge of #124064 - Zalathar:otherwise-block, r=NadrierilMatthias Krüger-3/+3
Move confusing comment about otherwise blocks in `lower_match_tree` This comment was historically inside a block guarded by `if let Some(otherwise_block) = otherwise`. When #120978 made the “otherwise block” non-optional, it also flattened that region of code. Doing so left this comment awkwardly stranded above an unrelated line of code, without its original context. We can restore that context by moving it above the declaration of `otherwise`. r? ``@Nadrieril``
2024-04-18Rollup merge of #124047 - Jules-Bertholet:match-ergonomics-cleanups, r=NadrierilMatthias Krüger-177/+147
Match ergonomics 2024: miscellaneous code cleanups - Store `ByRef` instead of `BindingAnnotation` in `PatInfo` - Rename `BindingAnnotation` to `BindingMode` r? ``@Nadrieril`` cc #123076 ``@rustbot`` label A-patterns
2024-04-18Simplify `static_assert_size`s.Nicholas Nethercote-38/+38
We want to run them on all 64-bit platforms.
2024-04-18Auto merge of #122684 - oli-obk:delay_interning_errors_to_after_validaiton, ↵bors-87/+129
r=RalfJung Delay interning errors to after validation fixes https://github.com/rust-lang/rust/issues/122398 fixes #122548 This improves diagnostics since validation errors are usually more helpful compared with interning errors that just make broad statements about the entire constant r? `@RalfJung`
2024-04-17llvm: update riscv target feature to match LLVM 19Augie Fackler-4/+5
In llvm/llvm-project@9067070d91e9d8cdd8509ffa56a076f08a3d7281 they ended up largely reverting llvm/llvm-project@e81796671890b59c110f8e41adc7ca26f8484d20. This means the change we did in rust-lang/rust@b378059e6b2573c5356423fa31d184a89a3b6029 is now only corrct for LLVM 18...so we have to adjust again. @rustbot label: +llvm-main
2024-04-17Auto merge of #123936 - Mark-Simulacrum:zst-no-alloc, r=oli-obkbors-18/+49
Codegen ZSTs without an allocation This makes sure that &[] is equivalent to unsafe code (from_raw_parts(dangling, 0)). No new stable guarantee is intended about whether or not we do this, this is just an optimization. This regressed in #67000 (no comments I can see about that regression in the PR, though it did change the test modified here). We had previously performed this optimization since #63635.
2024-04-17Auto merge of #124084 - matthiaskrgr:rollup-h42psbx, r=matthiaskrgrbors-37/+65
Rollup of 9 pull requests Successful merges: - #116957 (meta: notify #t-rustdoc Zulip stream on backport nominations) - #122201 (Document overrides of `clone_from()` in core/std) - #122723 (Use same file permissions for ar_archive_writer as the LLVM archive writer) - #124030 (interpret: pass MemoryKind to adjust_alloc_base_pointer) - #124037 (Don't ascend into parent bodies when collecting stmts for possible return suggestion) - #124049 (Stabilize `const_io_structs`) - #124062 (Add another expression to weird-exprs.rs) - #124066 (Don't error on subtyping of equal types) - #124073 (Remove libc from rust_get_test_int uses) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-17Rollup merge of #124066 - oli-obk:define_opaque_types7, r=compiler-errorsMatthias Krüger-1/+1
Don't error on subtyping of equal types fixes https://github.com/rust-lang/rust/issues/124054 🤦 fixes #124075 fixes https://github.com/rust-lang/rust/issues/124079 r? `@compiler-errors`
2024-04-17Rollup merge of #124037 - compiler-errors:dont-parent-body, r=michaelwoeristerMatthias Krüger-2/+6
Don't ascend into parent bodies when collecting stmts for possible return suggestion Fixes #124022
2024-04-17Rollup merge of #124030 - RalfJung:adjust_alloc_base_pointer, r=oli-obkMatthias Krüger-26/+39
interpret: pass MemoryKind to adjust_alloc_base_pointer Another puzzle piece for https://github.com/rust-lang/miri/pull/3475. The 2nd commit renames base_pointer -> root_pointer; that's how Tree Borrows already calls them and I think the term is more clear than "base pointer". In particular, this distinguishes it from "base address", since a root pointer can point anywhere into an allocation, not just its base address. https://github.com/rust-lang/rust/pull/124018 has been rolled up already so I couldn't add it there any more. r? ```@oli-obk```
2024-04-17Rollup merge of #122723 - bjorn3:archive_writer_fixes, r=nnethercoteMatthias Krüger-8/+19
Use same file permissions for ar_archive_writer as the LLVM archive writer This is required to switch to ar_archive_writer in the future without regressions. In addition to this PR support for reading thin archives needs to be added (https://github.com/rust-lang/rust/issues/107407) to fix all known regressions. Fixes https://github.com/rust-lang/rust/issues/107495
2024-04-17Auto merge of #123674 - oli-obk:bogus_note, r=estebankbors-2/+8
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls fixes #123292 Also removes a bunch of extra diagnostics that were introduced in https://github.com/rust-lang/rust/pull/121154 and https://github.com/rust-lang/rust/pull/120558
2024-04-17Improve `BindingMode` doc commentJules Bertholet-2/+4
2024-04-17Rename `BindingAnnotation` to `BindingMode`Jules Bertholet-147/+115
2024-04-17Store `ByRef` instead of `BindingAnnotation` in `PatInfo`Jules Bertholet-30/+30
2024-04-17Use the default file permissions when writingbjorn3-8/+19
static libraries with ar_archive_writer Fixes #107495
2024-04-17Don't error on subtyping of equal typesOli Scherer-1/+1
2024-04-17Move confusing comment about otherwise blocks in `lower_match_tree`Zalathar-3/+3
This comment was historically inside a block guarded by `if let Some(otherwise_block) = otherwise`. When #120978 made the otherwise block non-optional, it also flattened that region of code. Doing so left this comment awkwardly stranded above an unrelated line of code, without its original context. We can restore that context by moving it above the declaration of `otherwise`.
2024-04-17Use less fragile error handlingOli Scherer-18/+16
2024-04-17Validate before reporting interning errors.Oli Scherer-23/+52
validation produces much higher quality errors and already handles most of the cases
2024-04-17Simplify alloc id mutability checkOli Scherer-10/+15
2024-04-17Deduplicate logic for checking the mutability of allocationsOli Scherer-79/+75
2024-04-17Run the "is this static mutable" logic the same way as in `in_mutable_memory`Oli Scherer-14/+16
2024-04-17Validate nested static itemsOli Scherer-7/+19
2024-04-17interpret: rename base_pointer -> root_pointerRalf Jung-18/+18
also in Miri, "base tag" -> "root tag"
2024-04-17interpret: pass MemoryKind to adjust_alloc_base_pointerRalf Jung-11/+24
2024-04-17Rollup merge of #124052 - beetrees:return-dest-doc-comment, r=fmeaseMatthias Krüger-4/+4
Make the comments for `ReturnDest` variants doc comments This PR converts the documentation for `ReturnDest` from comments to doc comments.
2024-04-17Rollup merge of #124051 - dtolnay:emptyset, r=compiler-errorsMatthias Krüger-2/+2
Fix empty-set symbol in comments The symbol in the original code is U+00D8 "LATIN CAPITAL LETTER O WITH STROKE" (https://en.wikipedia.org/wiki/%C3%98) which is an uppercase letter in Danish, Norwegian, Faroese, and Southern Sámi alphabets. The symbol that was intended is U+2205 "EMPTY SET" (https://en.wikipedia.org/wiki/Empty_set#Notation). | Before | After | |---|---| | ![Screenshot from 2024-04-16 18-25-01](https://github.com/rust-lang/rust/assets/1940490/9b8b0624-cfa5-4b89-84e5-4c2b39c2cb8f) | ![Screenshot from 2024-04-16 18-25-05](https://github.com/rust-lang/rust/assets/1940490/6f6b34c3-0e47-4ba0-856d-be1dc164c94c) |
2024-04-17Rollup merge of #123997 - compiler-errors:self-res, r=fmeaseMatthias Krüger-0/+11
Delay span bug when `Self` kw resolves to `DefKind::{Mod,Trait}` Catch the case where `kw::Self` is recovered in the parser and causes us to subsequently resolve `&self`'s implicit type to something that's not a type. This check could be made more accurate, though I'm not sure how hard we have to try here. Fixes #123988
2024-04-17Rollup merge of #122813 - nnethercote:nicer-quals, r=compiler-errorsMatthias Krüger-333/+280
Qualifier tweaking Adding and removing qualifiers in some cases that make things nicer. Details in individual commits. r? `@compiler-errors`
2024-04-17Make the comments for `ReturnDest` variants doc commentsbeetrees-4/+4
2024-04-16Fix empty-set symbol in commentsDavid Tolnay-2/+2
2024-04-16Codegen ZSTs without an allocationMark Rousskov-18/+49
This makes sure that &[] is just as efficient as indirecting through unsafe code (from_raw_parts). No new stable guarantee is intended about whether or not we do this, this is just an optimization. Co-authored-by: Ralf Jung <post@ralfj.de>
2024-04-17Auto merge of #124040 - GuillaumeGomez:rollup-hrrvsgh, r=GuillaumeGomezbors-29/+32
Rollup of 7 pull requests Successful merges: - #123673 (Don't ICE for kind mismatches during error rendering) - #123675 (Taint const qualifs if a static is referenced that didn't pass wfcheck) - #123975 (Port the 2 `rust-lld` run-make tests to `rmake`) - #124000 (Use `/* value */` as a placeholder) - #124013 (Box::into_raw: make Miri understand that this is a box-to-raw cast) - #124027 (Prefer identity equality over equating types during coercion.) - #124036 (Remove `default_hidden_visibility: false` from wasm targets) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-17Rollup merge of #124036 - alexcrichton:wasm-use-default-visbility, r=jieyouxuGuillaume Gomez-3/+0
Remove `default_hidden_visibility: false` from wasm targets To the best of my ability I believe that this is no longer necessary. I don't fully recall why this was first added but I believe it had to do with symbols all being exported by default and this was required to undo that. Regardless nowadays the default output of rustc seems suitable so it seems best to keep wasm in line with other targets.
2024-04-17Rollup merge of #124027 - oli-obk:define_opaque_types9, r=compiler-errorsGuillaume Gomez-22/+13
Prefer identity equality over equating types during coercion. These types are always generic only over their own generic parameters with no inference variables involved. r? `@compiler-errors` I love touching code that [hasn't changed meaningfully since 2016](https://github.com/rust-lang/rust/pull/41937)
2024-04-17Rollup merge of #124000 - compiler-errors:sugg-tweaks, r=wesleywiserGuillaume Gomez-4/+11
Use `/* value */` as a placeholder The expression `value` isn't a valid suggestion; let's use `/* value */` as a placeholder (which is also invalid) since it more clearly signals to the user that they need to fill it in with something meaningful. This parallels the suggestions we have in a couple other places, like arguments. We could also print the type name instead of `/* value */`, especially if it's suggestable, but I don't care strongly about that.
2024-04-17Rollup merge of #123675 - oli-obk:static_wf_ice, r=compiler-errorsGuillaume Gomez-0/+5
Taint const qualifs if a static is referenced that didn't pass wfcheck It is correct to only check the signature here, as the ICE is caused by `USE_WITH_ERROR` trying to allocate memory to store the result of `WITH_ERROR` before evaluating it. fixes #123153
2024-04-17Rollup merge of #123673 - oli-obk:sig_wfcheck_ice, r=jieyouxu,estebankGuillaume Gomez-0/+3
Don't ICE for kind mismatches during error rendering fixes #123457 also some test suite cleanups to make backtraces easier to read
2024-04-16Auto merge of #123537 - compiler-errors:shallow, r=lcnrbors-125/+96
Simplify shallow resolver to just fold ty/consts Probably faster than using a whole folder?
2024-04-16Don't proceed into parent bodies when collecting stmts for possible return ↵Michael Goulet-2/+6
suggestion
2024-04-16Remove `default_hidden_visibility: false` from wasm targetsAlex Crichton-3/+0
To the best of my ability I believe that this is no longer necessary. I don't fully recall why this was first added but I believe it had to do with symbols all being exported by default and this was required to undo that. Regardless nowadays the default output of rustc seems suitable so it seems best to keep wasm in line with other targets.