| Age | Commit message (Collapse) | Author | Lines |
|
Add missing entries in 1.74 release notes
|
|
Fix def-use check for call terminators
Fixes #117331.
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #116244 (Apply structured suggestion that allows test to work since 1.64)
- #117686 (Build pre-coroutine-transform coroutine body on error)
- #117834 (target_feature: make it more clear what that 'Option' means)
- #117893 (Suggest dereferencing the LHS for binops such as `&T == T`)
- #117911 (Fix some typos)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
Fix some typos
|
|
Suggest dereferencing the LHS for binops such as `&T == T`
Fixes #52544
|
|
target_feature: make it more clear what that 'Option' means
Reading those tables in compiler/rustc_codegen_ssa/src/target_features.rs, it's not immediately clear that `None` means "stable". Let's use an enum with appropriately named variants to make that more obvious.
|
|
Build pre-coroutine-transform coroutine body on error
I was accidentally building the post-transform coroutine body, rather than the pre-transform coroutine body. There's no pinning expected here yet, and the return type isn't yet transformed into `CoroutineState`.
Fixes #117670
|
|
Apply structured suggestion that allows test to work since 1.64
Close #73497.
|
|
Update to LLVM 17.0.5
Fixes https://github.com/rust-lang/rust/issues/116177.
Fixes the compile-time issue reported at https://internals.rust-lang.org/t/significant-increase-in-fat-lto-time-post-update-to-rustc-1-75-0-nightly/19765.
r? `@cuviper`
|
|
Subtree update of `rust-analyzer`
r? `@HKalbasi`
|
|
|
|
|
|
make `LayoutError::Cycle` carry `ErrorGuaranteed`
Addresses a FIXME, and also I think it's wise for error variants to carry their `ErrorGuaranteed` -- makes it easier to use that `ErrorGuaranteed` for creating, e.g. `TyKind::Error` and other error kinds. Splitting out from #117703.
|
|
Signed-off-by: cui fliter <imcusg@gmail.com>
|
|
Add CoroutineWitness to covered types in smir
Previously we accepted `CouroutineWitness` as `unreachable!` but https://github.com/rust-lang/project-stable-mir/issues/50 shows it is indeed reachable, this pr fixes that and covers `CouroutineWitness`
|
|
|
|
`rustc_macros` cleanups
Just some improvements I found while reading over this code.
r? `@Nilstrieb`
|
|
Custom MIR: Support cleanup blocks
Cleanup blocks are declared with `bb (cleanup) = { ... }`.
`Call` and `Drop` terminators take an additional argument describing the unwind action, which is one of the following:
* `UnwindContinue()`
* `UnwindUnreachable()`
* `UnwindTerminate(reason)`, where reason is `ReasonAbi` or `ReasonInCleanup`
* `UnwindCleanup(block)`
Also support unwind resume and unwind terminate terminators:
* `UnwindResume()`
* `UnwindTerminate(reason)`
|
|
Cleanup blocks are declared with `bb (cleanup) = { ... }`.
`Call` and `Drop` terminators take an additional argument describing the
unwind action, which is one of the following:
* `UnwindContinue()`
* `UnwindUnreachable()`
* `UnwindTerminate(reason)`, where reason is `ReasonAbi` or `ReasonInCleanup`
* `UnwindCleanup(block)`
Also support unwind resume and unwind terminate terminators:
* `UnwindResume()`
* `UnwindTerminate(reason)`
|
|
Always point at index span on index obligation failure
Use more targetted span for index obligation failures by rewriting the obligation cause span.
CC #66023
|
|
Remove incorrect transformation from RemoveZsts
Partial removal of storage statements for a local is incorrect, so a decision to optimize cannot be make independently for each statement.
Avoid the issue by performing the transformation completely or not at all.
|
|
Remove `-Zperf-stats`.
The included measurements have varied over the years. At one point there were quite a few more, but #49558 deleted a lot that were no longer used. Today there's just four, and it's a motley collection that doesn't seem particularly valuable.
I think it has been well and truly subsumed by self-profiling, which collects way more data.
r? `@wesleywiser`
|
|
|
|
fix rounding issue with exponents in fmt
fixes issue #115737 , where the decimal places are rounded incorrectly when formatting scientific notation
|
|
Rollup of 4 pull requests
Successful merges:
- #114224 (rustc_llvm: Link to libkstat on Solaris/SPARC)
- #117695 (Reorder checks to make sure potential missing expect on Option/Result…)
- #117870 (`fn args_ref_X` to `fn args_X`)
- #117879 (tests: update check for inferred nneg on zext)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
tests: update check for inferred nneg on zext
This was broken by upstream
llvm/llvm-project@dc6d0773960c664eee12a1ed871fad5c81a20a12. It's easy enough to use a regex match to support both, so we do that.
r? `@nikic`
`@rustbot` label: +llvm-main
|
|
`fn args_ref_X` to `fn args_X`
|
|
3tilley:prioritise-unwrap-expect-over-last-method-call, r=compiler-errors
Reorder checks to make sure potential missing expect on Option/Result…
… runs before removing last method call
Fixes #117669
|
|
rustc_llvm: Link to libkstat on Solaris/SPARC
getHostCPUName calls into libkstat but as of
LLVM 16.0.6 libLLVMTargetParser is not explicitly
linked against libkstat causing builds to fail
due to undefined symbols.
See also: llvm/llvm-project#64186
|
|
|
|
Stabilize `result_option_inspect`
This PR stabilizes `result_option_inspect`:
```rust
// core::option
impl Option<T> {
pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self;
}
// core::result
impl Result<T, E> {
pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self;
pub fn inspect_err<F: FnOnce(&E)>(self, f: F) -> Self;
}
```
<br>
Tracking issue: https://github.com/rust-lang/rust/issues/91345.
Implementation PR: https://github.com/rust-lang/rust/pull/91346.
Closes https://github.com/rust-lang/rust/issues/91345.
|
|
|
|
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #117737 (Remove `-Zkeep-hygiene-data`.)
- #117830 (Small improvements in object lifetime default code)
- #117858 (Compute layout with spans for better cycle errors in coroutines)
- #117863 (Remove some unused stuff from `rustc_index`)
- #117872 (Cranelift isn't available on non-nightly channels)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Cranelift isn't available on non-nightly channels
This commit already landed as part of beta branching, this PR just puts it on master.
|
|
Remove some unused stuff from `rustc_index`
r? `@Mark-Simulacrum`
|
|
Compute layout with spans for better cycle errors in coroutines
Split out from #117703, this PR at least gives us a nicer span to point at when we hit a cycle error in coroutine layout cycles.
|
|
Small improvements in object lifetime default code
I found those while trying to understand how the code works.
|
|
Remove `-Zkeep-hygiene-data`.
It was added way back in #28585 under the name `-Zkeep-mtwt-tables`. The justification was:
> This is so that the resolution results can be used after analysis,
> potentially for tool support.
There are no uses of significance in the code base, and various Google searches for both option names (and variants) found nothing of interest. I think this can safely be removed.
r? `@davidtwco`
|
|
This was broken by upstream
llvm/llvm-project@dc6d0773960c664eee12a1ed871fad5c81a20a12. It's easy
enough to use a regex match to support both, so we do that.
r? @nikic
@rustbot label: +llvm-main
|
|
`ReLateBound` -> `ReBound`
first step of https://github.com/rust-lang/types-team/issues/95
already fairly large xx
there's some future work here I intentionally did not contribute as part of this PR, from my notes:
- `DescriptionCtx` to `DescriptionCtxt`
- what is `CheckRegions::Bound`?
- `collect_late_bound_regions` et al
- `erase_late_bound_regions` -> `instantiate_bound_regions_with_erased`?
- `EraseEarlyRegions` should be removed, feels duplicate
r? `@BoxyUwU`
|
|
- `HAS_RE_LATE_BOUND` -> `HAS_RE_BOUND`
- `HAS_TY_LATE_BOUND` -> `HAS_TY_BOUND`
- `HAS_CT_LATE_BOUND` -> `HAS_CT_BOUND`
- `HAS_LATE_BOUND` -> `HAS_BOUND_VARS`
- `fn has_late_bound_regions` -> `fn has_bound_regions`
- `fnhas_non_region_late_bound` -> `fn has_non_region_bound_vars`
- `fn has_late_bound_vars` -> `fn has_bound_vars`
|
|
- `RegionVariableOrigin::~~Late~~BoundRegion`
- `~~Late~~BoundRegionConversionTime`
|
|
other changes:
- `Region::new_late_bound` -> `Region::new_bound`
- `Region::is_late_bound` -> `Region::is_bound`
|
|
|
|
|
|
Turn assert_eq into a delay_span_bug
Fixes #117789
|