| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
|
|
lint on duplicates during attribute parsing
To do this we stuff them in the diagnostic context to be emitted after
hir is constructed
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- rust-lang/rust#141967 (Configure bootstrap backport nominations through triagebot)
- rust-lang/rust#142042 (Make E0621 missing lifetime suggestion verbose)
- rust-lang/rust#142272 (tests: Change ABIs in tests to more future-resilient ones)
- rust-lang/rust#142282 (Only run `citool` tests on the `auto` branch)
- rust-lang/rust#142297 (Implement `//@ needs-target-std` compiletest directive)
- rust-lang/rust#142298 (Make loongarch-none target maintainers more easily pingable)
- rust-lang/rust#142306 (Dont unwrap and re-wrap typing envs)
- rust-lang/rust#142324 (Remove unneeded `FunctionCx` from some codegen methods)
- rust-lang/rust#142328 (feat: Add `bit_width` for unsigned integer types)
Failed merges:
- rust-lang/rust#141639 (Expose discriminant values in stable_mir)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Dont unwrap and re-wrap typing envs
Just a tiny tweak to make the query less awkward.
r? lcnr
|
|
`FIXME(-Znext-solver)` triage
r? `@BoxyUwU`
|
|
Remove check_mod_loops query and run the checks per-body instead
This analysis is older than my first rustc contribution I believe. It was never querified. Ideally we'd merge it into the analysis happening within typeck anyway (typeck just uses span_delayed_bug instead of erroring), but I didn't want to do that within this PR that also moves things around and subtly changes diagnostic ordering.
|
|
|
|
Allow transmute casts in pre-runtime-MIR
r? ``@scottmcm``
cc ``@BoxyUwU``
turns out in https://github.com/rust-lang/rust/pull/138393 I erroneously used transmute casts in https://github.com/rust-lang/rust/blob/fd3da4bebdff63b7529483ff7025986ef16bf463/compiler/rustc_mir_build/src/builder/matches/test.rs#L209
I don't think they have any issues using them before runtime, we just checked for them because we didn't have code exercising those code paths
|
|
cache `param_env` canonicalization
BLocked on rust-lang/rust#141581
|
|
|
|
|
|
|
|
Remove CollectItemTypesVisitor
I always felt like we were very unnecessarily walking the HIR, let's see if perf agrees
There is lots to ~~improve~~ consolidate further here, as we still have 3 item wfchecks:
* check_item (matching on the hir::ItemKind)
* actually doing trait solver based checks (by using HIR spans)
* lower_item (matching on the hir::ItemKind after loading it again??)
* just ensure_ok-ing a bunch of queries
* check_item_type (matching on DefKind)
* some type based checks, mostly ensure_ok-ing a bunch of queries
fixes rust-lang/rust#121429
|
|
Limit the size of cgu names when using the `-Zhuman-readable-cgu-name…
…s` option
Prior to this change, cgu names could be generated which would result in filenames longer than the limit imposed by the OS.
|
|
fix typo
|
|
Change per-module naked fn checks to happen during typeck instead
cc `@Lokathor` `@Amanieu` `@folkertdev`
just seems nicer this way
|
|
|
|
|
|
|
|
|
|
Rollup of 11 pull requests
Successful merges:
- rust-lang/rust#141890 (Add link to correct documentation in htmldocck.py)
- rust-lang/rust#141932 (Fix for async drop inside async gen fn)
- rust-lang/rust#141960 (Use non-2015 edition paths in tests that do not test for their resolution)
- rust-lang/rust#141968 (Run wfcheck in one big loop instead of per module)
- rust-lang/rust#141969 (Triagebot: Remove `assign.users_on_vacation`)
- rust-lang/rust#141985 (Ensure query keys are printed with reduced queries)
- rust-lang/rust#141999 (Visit the ident in `PreciseCapturingNonLifetimeArg`.)
- rust-lang/rust#142005 (Change `tag_field` to `FieldIdx` in `Variants::Multiple`)
- rust-lang/rust#142017 (Fix incorrect use of "recommend" over "recommended")
- rust-lang/rust#142024 (Don't refer to 'this tail expression' in expansion.)
- rust-lang/rust#142025 (Don't refer to 'local binding' in extern macro.)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=workingjubilee
Change `tag_field` to `FieldIdx` in `Variants::Multiple`
It was already available as a generic parameter anyway, and it's not like we'll ever put a tag in the 5-billionth field.
This is a first part of pulling smaller pieces out of rust-lang/rust#138759, so
r? workingjubilee
|
|
Ensure query keys are printed with reduced queries
Using `-Z query-dep-graph` and debug assertions leads to an ICE that was originally discovered in rust-lang/rust#141700:
> This isn't an incremental bug per se, but instead a bug that has to do with debug printing query keys when debug assertions and `-Z query-dep-graph` is enabled. We end up printing a const (b/c we're using generic const args here) whose debug printing for -Z query-dep-graph requires invoking the same query cyclically 😃
>
> I've pushed a commit which should fix this.
This isn't related to the standard library changes, but instead b/c it seems to be the first usage of `feature(adt_const_params)` in the standard library that ends up being triggered in incremental tests.
r? oli-obk
|
|
Run wfcheck in one big loop instead of per module
Maybe we can merge this big loop in the future with the `par_hir_body_owners` call below and run typeck only on items that didn't fail wfcheck. For now let's just see if perf likes it, as it by itself should be beneficial to parallel rustc
|
|
It was already available as a generic parameter anyway, and it's not like we'll ever put a tag in the 5-billionth field.
|
|
For AST/HIR/THIR visitors, explain the use of deconstruction.
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#141724 (fix(rust-lang/rust#141141): When expanding `PartialEq`, check equality of scalar types first.)
- rust-lang/rust#141833 (`tests/ui`: A New Order [2/N])
- rust-lang/rust#141861 (Switch `x86_64-msvc-{1,2}` back to Windows Server 2025 images)
- rust-lang/rust#141914 (redesign stage 0 std follow-ups)
- rust-lang/rust#141918 (Deconstruct values in the THIR visitor)
- rust-lang/rust#141923 (Update books)
- rust-lang/rust#141931 (Deconstruct values in the THIR visitor)
- rust-lang/rust#141956 (Remove two trait methods from cg_ssa)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
Deconstruct values in the THIR visitor
Hi! I am a beginner rust developer.
I'm trying to solve your problem rust-lang/rust#141849
I see that 2 files need to be corrected, so I’m starting with a simpler step, `compiler/rustc_middle/src/thir/visit.rs`
r? `@krikera`
|
|
Co-authored-by: Michael Goulet <michael@errs.io>
|
|
|
|
This deduplicates some code between codegen backends and may in the
future allow adding extra metadata that is only known at link time.
|
|
Decouple "reporting in deps" from `FutureIncompatibilityReason`
The reason should just be it -- the reason. It never felt right to me that it was also responsible for whatever we include the warning in cargo's reports.
It gets especially unruly if you want to add non-`FutureReleaseError*` warnings which are included in the reports.
I just added a field to `FutureIncompatibleInfo` to control whatever the diagnostic is included in the cargo's reports.
|
|
|
|
|
|
Tweak fast path trait handling
(1.) Make it more sound by considering polarity (lol)
(2.) Make it more general, by considering higher-ranked size/copy/clone
(2.) Make it less observable, by only doing copy/clone fast path if there are no regions involved
r? lcnr
|
|
Hir item kind field order
A follow-up to rust-lang/rust#141675.
r? `@fee1-dead`
|
|
|
|
|
|
Structurally normalize types as needed in `projection_ty_core`
Introduce a `structurally_normalize` callback to `projection_ty_core`, and then use it before we match on the ty kind in `projection_ty_core`.
Previously we were only structurally normalizing the return type of the `handle_field` struct, but if we were to (e.g.) apply a deref projection to that type, then the resulting type is not guaranteed to be structurally normalized and any subsequent projections applied would ICE.
Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/221
I'll leave a few comments inline to explain the changes.
r? lcnr
---
Also fixes rust-lang/rust#141708
|
|
atomic_load intrinsic: use const generic parameter for ordering
We have a gazillion intrinsics for the atomics because we encode the ordering into the intrinsic name rather than making it a parameter. This is particularly bad for those operations that take two orderings. Let's fix that!
This PR only converts `load`, to see if there's any feedback that would fundamentally change the strategy we pursue for the const generic intrinsics.
The first two commits are preparation and could be a separate PR if you prefer.
`@BoxyUwU` -- I hope this is a use of const generics that is unlikely to explode? All we need is a const generic of enum type. We could funnel it through an integer if we had to but an enum is obviously nicer...
`@bjorn3` it seems like the cranelift backend entirely ignores the ordering?
|
|
Refactor the two-phase check for impls and impl items
Refactor the two-phase dead code check to make the logic clearer and simpler:
1. adding assoc fn and impl into `unsolved_items` directly during the initial construction of the worklist
2. converge the logic of checking whether assoc fn and impl are used to `item_should_be_checked`, and the item is considered used only when its corresponding trait and Self adt are used
This PR only refactors as much as possible to avoid affecting the original functions. However, due to the adjustment of the order of checks, the test results are slightly different, but overall, there is no regression problem
Fixes rust-lang/rust#127911
Fixes rust-lang/rust#128839
Extracted from https://github.com/rust-lang/rust/pull/128637.
r? petrochenkov
try-job: dist-aarch64-linux
|
|
Specifically `TyAlias`, `Enum`, `Struct`, `Union`. So the fields match
the textual order in the source code.
The interesting part of the change is in
`compiler/rustc_hir/src/hir.rs`. The rest is extremely mechanical
refactoring.
|
|
|
|
|
|
Rollup of 16 pull requests
Successful merges:
- rust-lang/rust#136429 (GCI: At their def site, actually wfcheck the where-clause & always eval free lifetime-generic constants)
- rust-lang/rust#138139 (Emit warning while outputs is not exe and prints linkage info)
- rust-lang/rust#141104 (Test(fs): Fix `test_eq_windows_file_type` for Windows 7)
- rust-lang/rust#141477 (Path::with_extension: show that it adds an extension where one did no…)
- rust-lang/rust#141533 (clean up old rintf leftovers)
- rust-lang/rust#141612 (Call out possibility of invariant result in variance markers)
- rust-lang/rust#141638 (Use `builtin_index` instead of hand-rolling it)
- rust-lang/rust#141643 (ci: verify that codebuild jobs use ghcr.io)
- rust-lang/rust#141675 (Reorder `ast::ItemKind::{Struct,Enum,Union}` fields.)
- rust-lang/rust#141680 (replace TraitRef link memory.md)
- rust-lang/rust#141682 (interpret/allocation: Fixup type for `alloc_bytes`)
- rust-lang/rust#141683 (Handle ed2021 precise capturing of unsafe binder)
- rust-lang/rust#141684 (rustbook: Bump versions of `onig` and `onig_sys`)
- rust-lang/rust#141687 (core: unstably expose atomic_compare_exchange so stdarch can use it)
- rust-lang/rust#141690 (Add `rustc_diagnostic_item` to `sys::Mutex` methods)
- rust-lang/rust#141702 (Add eholk to compiler reviewer rotation)
r? `@ghost`
`@rustbot` modify labels: rollup
|