Added llvm lifetime annotations to function call argument temporaries.
The goal of this change is to ensure that llvm will do stack slot
optimization on these temporaries. This ensures that in code like:
```rust
const A: [u8; 1024] = [0; 1024];
fn copy_const() {
f(A);
f(A);
}
```
we only use 1024 bytes of stack space, instead of 2048 bytes.
I am new to developing for the rust compiler, and as such not entirely sure, but I believe this should be sufficient to close#98156.
Also, this does not contain a test case to ensure this keeps working, primarily because I am not sure how to go about testing this. I would love some suggestions as to how that could be approached.
Don't lint `while_let_loop` when significant drop order would change
fixes#7226fixes#7913fixes#5717
For #5717 it may not stay fully fixed. This is only completely fixed right now due to all the allowed drop impls have `#[may_dangle]` on their drop impls. This may get changed in the future based on how significant drops are determined, but the example listed with `RefCell` shouldn't break.
changelog: Don't lint `while_let_loop` when the order of significant drops would change
move MIR syntax into a dedicated file and ping some people whenever it changes
Adding or changing MIR operations/statements/whatever should be under significant scrutiny wrt their wider impact, specified semantics, and so on. So let's start by putting all that into a dedicated file and pinging some people whenever that file changes.
This PR only moves definitions around, and then fiddles with imports until it all works again.
Clarify that flow sensitive checks now understand that *visibly*
uninhabited call expressions never return.
The change influences checks of reachable and unreachable code alike,
not just dead code like previous wording would imply.
Replace `sort_modules_alphabetically` boolean with enum
This fixes the long-standing FIXME there and makes the code easier to
understand. The reference to modules in both the old and new names seems
potentially wrong since I believe it applies to all items.
r? ``@GuillaumeGomez``
Make TAIT behave exactly like RPIT
fixes https://github.com/rust-lang/rust/issues/96552
This makes type-alias-impl-trait behave like return-position-impl-trait. Unfortunately it also causes some cases to stop compiling due to "needing type annotations" and makes panicking cause fallback for the hidden type to `()`.
All of these are addressable, but we should probably address them for RPIT and TAIT together
r? ``@lcnr``
This fixes the long-standing FIXME there and makes the code easier to
understand. The reference to modules in both the old and new names seems
potentially wrong since I believe it applies to all items.
Rollup of 10 pull requests
Successful merges:
- #98434 (Ensure that `static_crt` is set in the bootstrapper whenever using `cc-rs` to get a compiler command line.)
- #98636 (Triagebot: Fix mentions word wrapping.)
- #98642 (Fix#98260)
- #98643 (Improve pretty printing of valtrees for references)
- #98646 (rustdoc: fix bugs in main.js popover help and settings)
- #98647 (Update cargo)
- #98652 (`alloc`: clean and ensure `no_global_oom_handling` builds are warning-free)
- #98660 (Unbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`.)
- #98665 (Use verbose help for deprecation suggestion)
- #98668 (Avoid some `&str` to `String` conversions with `MultiSpan::push_span_label`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup