-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rustup #8728
Rustup #8728
Conversation
- Create hir_crate_items query which traverses tcx.hir_crate(()).owners to return a hir::ModuleItems - use tcx.hir_crate_items in tcx.hir().items() to return an iterator of hir::ItemId - add par_items(impl Fn(hir::ItemId)) to traverse all items in parallel Signed-off-by: Miguel Guarniz <[email protected]>
Signed-off-by: Miguel Guarniz <[email protected]>
…cote Cached stable hash cleanups r? `@nnethercote` Add a sanity assertion in debug mode to check that the cached hashes are actually the ones we get if we compute the hash each time. Add a new data structure that bundles all the hash-caching work to make it easier to re-use it for different interned data structures
Loading the fallback bundle in compilation sessions that won't go on to emit any errors unnecessarily degrades compile time performance, so lazily create the Fluent bundle when it is first required. Signed-off-by: David Wood <[email protected]>
Use mir constant in thir instead of ty::Const This is blocked on rust-lang/rust#94059 (does include its changes, the first two commits in this PR correspond to those changes) and rust-lang/rust#93800 being reinstated (which had to be reverted). Mainly opening since `@lcnr` offered to give some feedback and maybe also for a perf-run (if necessary). This currently contains a lot of duplication since some of the logic of `ty::Const` had to be copied to `mir::ConstantKind`, but with the introduction of valtrees a lot of that functionality will disappear from `ty::Const`. Only the last commit contains changes that need to be reviewed here. Did leave some `FIXME` comments regarding future implementation decisions and some things that might be incorrectly implemented. r? `@oli-obk`
errors: lazily load fallback fluent bundle Addresses (hopefully) rust-lang/rust#95667 (comment). Loading the fallback bundle in compilation sessions that won't go on to emit any errors unnecessarily degrades compile time performance, so lazily create the Fluent bundle when it is first required. r? `@ghost` (just for perf initially)
Check var scope if it exist Fixes #92893. Added helper function to check the scope of a variable, if it doesn't have a scope call delay_span_bug, which avoids us trying to get a block/scope that doesn't exist. Had to increase `ROOT_ENTRY_LIMIT` was getting tidy error
Implement sym operands for global_asm! Tracking issue: #93333 This PR is pretty much a complete rewrite of `sym` operand support for inline assembly so that the same implementation can be shared by `asm!` and `global_asm!`. The main changes are: - At the AST level, `sym` is represented as a special `InlineAsmSym` AST node containing a path instead of an `Expr`. - At the HIR level, `sym` is split into `SymStatic` and `SymFn` depending on whether the path resolves to a static during AST lowering (defaults to `SynFn` if `get_early_res` fails). - `SymFn` is just an `AnonConst`. It runs through typeck and we just collect the resulting type at the end. An error is emitted if the type is not a `FnDef`. - `SymStatic` directly holds a path and the `DefId` of the `static` that it is pointing to. - The representation at the MIR level is mostly unchanged. There is a minor change to THIR where `SymFn` is a constant instead of an expression. - At the codegen level we need to apply the target's symbol mangling to the result of `tcx.symbol_name()` depending on the target. This is done by calling the LLVM name mangler, which handles all of the details. - On Mach-O, all symbols have a leading underscore. - On x86 Windows, different mangling is used for cdecl, stdcall, fastcall and vectorcall. - No mangling is needed on other platforms. r? `@nagisa` cc `@eddyb`
Refactor HIR item-like traversal (part 1) Issue #95004 - Create hir_crate_items query which traverses tcx.hir_crate(()).owners to return a hir::ModuleItems - use tcx.hir_crate_items in tcx.hir().items() to return an iterator of hir::ItemId - use tcx.hir_crate_items to introduce a tcx.hir().par_items(impl Fn(hir::ItemId)) to traverse all items in parallel; Signed-off-by: Miguel Guarniz <[email protected]> cc `@cjgillot`
`CRATE_DEF_ID` and `CrateNum::as_def_id` are almost always what we want.
Report undeclared lifetimes during late resolution. First step in rust-lang/rust#91557 We reuse the rib design of the current resolution framework. Specific `LifetimeRib` and `LifetimeRibKind` types are introduced. The most important variant is `LifetimeRibKind::Generics`, which happens each time we encounter something which may introduce generic lifetime parameters. It can be an item or a `for<...>` binder. The `LifetimeBinderKind` specifies how this rib behaves with respect to in-band lifetimes. r? `@petrochenkov`
Stop using CRATE_DEF_INDEX outside of metadata encoding. `CRATE_DEF_ID` and `CrateNum::as_def_id` are almost always what we want. We should not manipulate raw `DefIndex` outside of metadata encoding.
@bors r+ |
📌 Commit 7b8a08c has been approved by |
Rustup r? `@ghost` changelog: none
💔 Test failed - checks-action_test |
Huh an ICE in our integration tests? 😮 We didn't have that for a long time. I can't find |
Might be this: rust-lang/rust#96175 I also get a similar ICE, when syncing this into the Rust repo and running Sadly I don't have time to investigate this further today... |
Hmm, this one? https://github.com/rust-lang/rust-clippy/runs/6116665649?check_suite_focus=true#step:7:22 |
@bors r+ p=1 |
📌 Commit a5cc047 has been approved by |
Rustup r? `@ghost` changelog: none
💔 Test failed - checks-action_test |
Damn, it isn't fixed in rustc by now... I sadly don't have the bandwidth to dump that much time into this... |
Hmm, I tried to run |
This one looks to be on rustc, I get the same ICE with |
I played ICE breaker: rust-lang/rust#96638 |
This ICE should be fixed by now. I'm closing this, since Thursday is already the next sync day. |
r? @ghost
changelog: none