| Age | Commit message (Collapse) | Author | Lines |
|
Remove Rvalue::Len again.
Now that we have `RawPtrKind::FakeForPtrMetadata`, we can reimplement `Rvalue::Len` using `PtrMetadata(&raw const (fake) place)`.
r? ``@scottmcm``
|
|
StateTransform: Do not renumber resume local.
MIR parameters are not explicitly assigned-to when entering the MIR body. If we want to save their values inside the coroutine state, we need to do so explicitly.
This was done by renaming the `_2` local, and introducing an explicit assignment pre-transform. This particular trick confuses me.
This version makes explicit that we are assigning parameters to saved locals.
r? ``@dingxiangfei2009``
|
|
Suggest removing Box::new instead of unboxing it
|
|
don't apply temporary lifetime extension rules to non-extended `super let`
Reference PR: rust-lang/reference#1980
This changes the semantics for `super let` (and macros implemented in terms of it, such as `pin!`, `format_args!`, `write!`, and `println!`) as suggested by ````@theemathas```` in https://github.com/rust-lang/rust/issues/145784#issuecomment-3218658335, making `super let` initializers only count as [extending expressions](https://doc.rust-lang.org/nightly/reference/destructors.html#extending-based-on-expressions) when the `super let` itself is within an extending block. Since `super let` initializers aren't temporary drop scopes, their temporaries outside of inner temporary scopes are effectively always extended, even when not in extending positions; this only affects two cases as far as I can tell:
- Block tail expressions in Rust 2024. This PR makes `f(pin!({ &temp() }))` drop `temp()` at the end of the block in Rust 2024, whereas previously it would live until after the call to `f` because syntactically the `temp()` was in an extending position as a result of `super let` in `pin!`'s expansion.
- `super let` nested within a non-extended `super let` is no longer extended. i.e. a normal `let` is required to treat `super let`s as extending (in which case nested `super let`s will also be extending).
Closes rust-lang/rust#145784
This is a breaking change. Both static and dynamic semantics are affected. The most likely breakage is for programs to stop compiling, but it's technically possible for drop order to silently change as well (as in rust-lang/rust#145784). Since this affects stable macros, it probably would need a crater run.
Nominating for discussion alongside rust-lang/rust#145784: ````@rustbot```` label +I-lang-nominated +I-libs-api-nominated
Tracking issue for `super let`: rust-lang/rust#139076
|
|
initial implementation of the darwin_objc unstable feature
Tracking issue: https://github.com/rust-lang/rust/issues/145496
This feature makes it possible to reference Objective-C classes and selectors using the same ABI used by native Objective-C on Apple/Darwin platforms. Without it, Rust code interacting with Objective-C must resort to loading classes and selectors using costly string-based lookups at runtime. With it, these references can be loaded efficiently at dynamic load time.
r? ```@tmandry```
try-job: `*apple*`
try-job: `x86_64-gnu-nopt`
|
|
remove FIXME block from `has_significant_drop`, it never encounters inference variables
The `FIXME` block in `Ty::has_significant_drop` is outdated as related queries can now handle type inference.
https://github.com/rust-lang/rust/blob/321a89bec57b8ca723d1af8f784490b950458c6a/compiler/rustc_middle/src/ty/util.rs#L1378-L1389
Closes rust-lang/rust#86868 (other places mentioned in the issue have been resolved, or moved to other issues)
r? types
|
|
Update the minimum external LLVM to 20
With this change, we'll have stable support for LLVM 20 and 21.
For reference, the previous increase to LLVM 19 was rust-lang/rust#139275.
cc ```@rust-lang/wg-llvm```
r? nikic
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- rust-lang/rust#146442 (Display ?Sized, const, and lifetime parameters in trait item suggestions across a crate boundary)
- rust-lang/rust#146474 (Improve `core::ascii` coverage)
- rust-lang/rust#146605 (Bump rustfix 0.8.1 -> 0.8.7)
- rust-lang/rust#146611 (bootstrap: emit hint if a config key is used in the wrong section)
- rust-lang/rust#146618 (Do not run ui test if options specific to LLVM are used when another codegen backend is used)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
Keep space if arg does not follow punctuation when lint unused parens
Fixes rust-lang/rust#138234
If the arg follows punctuation, still pass `left_pos` with `None` and no space will be added, else then pass `left_pos` with `Some(arg.span.lo())`, so that we can add the space as expected.
And `emit_unused_delims` can make sure no more space will be added if the expr follows space.
---
Edited:
Directly use the `value_span` to check whether the expr removed parens will follow identifier or be followed by identifier.
|
|
Display ?Sized, const, and lifetime parameters in trait item suggestions across a crate boundary
context: rust-lang/rust#145929
This fixes the MetaSized issue and adds const generics and early bound lifetimes. Late bound lifetimes are harder because they aren't returned by `generics_of`. I'm going to look into it, but there's no guarantee I'll be successful.
Fixes https://github.com/rust-lang/rust/issues/146404.
r? `@BoxyUwu`
|
|
When writing something like the expression `|_: ...| {}`, we now detect the `...` during parsing explicitly instead of relying on the detection in `parse_ty_common` so that we don't talk about "nested `...` are not supported".
```
error: unexpected `...`
--> $DIR/no-closure.rs:6:35
|
LL | const F: extern "C" fn(...) = |_: ...| {};
| ^^^
|
= note: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DestinationPropagation: avoid creating overlapping assignments.
r? `@Amanieu`
Fixes https://github.com/rust-lang/rust/issues/146383
|
|
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- rust-lang/rust#145095 (Migrate `UnsizedConstParamTy` to unstable impl of `ConstParamTy_`)
- rust-lang/rust#145960 (Split `FnCtxt::report_args_error` into subfunctions)
- rust-lang/rust#146402 (interpret: fix overlapping aggregate initialization)
- rust-lang/rust#146466 (llvm-wrapper: other cleanup)
- rust-lang/rust#146574 (compiletest: Enable new-output-capture by default)
- rust-lang/rust#146599 (replace some `#[const_trait]` with `const trait`)
- rust-lang/rust#146601 (compiletest: Make `./x test --test-args ...` work again)
- rust-lang/rust#146608 (improve internal bootstrap docs)
- rust-lang/rust#146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
llvm-wrapper: other cleanup
Cleanup few things around llvm-wrapper:
First commit removes unused macro, added back in https://github.com/rust-lang/rust/pull/31709 it was used in `LLVMRustHasFeature`; second removes unused function, third one removes `jsbackend` llvm component - this is looks like remnants of some removed backend?
|
|
interpret: fix overlapping aggregate initialization
This fixes the problem pointed out by ````@saethlin```` in https://github.com/rust-lang/rust/issues/146383#issuecomment-3273224645.
Also clarify when exactly current de-facto MIR semantics allow overlap of the LHS and RHS in an assignment.
|
|
Split `FnCtxt::report_args_error` into subfunctions
|
|
Migrate `UnsizedConstParamTy` to unstable impl of `ConstParamTy_`
Now that we have ``#[unstable_feature_bound]``, we can remove ``UnsizedConstParamTy`` that was meant to be an unstable impl of stable type and ``ConstParamTy_`` trait.
r? `@BoxyUwU`
|
|
Fix typo in error message
|
|
non_region_infer
|
|
|
|
This makes it clearer that it is set by the build system rather than by
the rustc that compiles the current rustc. It also avoids bootstrap
needing to pass --check-cfg llvm_enzyme to rustc.
|
|
|
|
|
|
```
error: unexpected `...`
--> $DIR/varargs-in-closure-isnt-supported.rs:5:20
|
LL | let mut lol = |...| ();
| ^^^ not a valid pattern
|
= note: C-variadic type `...` is not allowed here
```
|