about summary refs log tree commit diff
path: root/compiler/rustc_metadata/src/rmeta
AgeCommit message (Collapse)AuthorLines
2024-05-29Start implementing needs_async_drop and relatedDaria Sukhonina-0/+4
2024-05-26Give EarlyBinder a tcx parameterMichael Goulet-7/+7
We are gonna need it to uplift EarlyBinder
2024-05-23Auto merge of #125434 - nnethercote:rm-more-extern-tracing, r=jackh726bors-0/+3
Remove more `#[macro_use] extern crate tracing` Because explicit importing of macros via use items is nicer (more standard and readable) than implicit importing via `#[macro_use]`. Continuing the work from #124511 and #124914. r? `@jackh726`
2024-05-23Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obkMatthias Krüger-3/+3
rustc: Use `tcx.used_crates(())` more And explain when it should be used. Addresses comments from https://github.com/rust-lang/rust/pull/121167.
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_metadata`.Nicholas Nethercote-0/+3
2024-05-22rustc: Use `tcx.used_crates(())` moreVadim Petrochenkov-3/+3
And explain when it should be used.
2024-05-21PR feedbackBen Kimock-2/+5
2024-05-21Add a footer in FileEncoder and check for it in MemDecoderBen Kimock-7/+23
2024-05-21Reorder some `use` items.Nicholas Nethercote-15/+10
2024-05-13Remove `extern crate rustc_middle` from `rustc_metadata`.Nicholas Nethercote-0/+4
2024-05-09Rename Generics::params to Generics::own_paramsMichael Goulet-1/+1
2024-05-01Step bootstrap cfgsMark Rousskov-1/+1
2024-04-29Remove `extern crate rustc_macros` from numerous crates.Nicholas Nethercote-0/+2
2024-04-24Error on using `yield` without also using `#[coroutine]` on the closureOli Scherer-19/+23
And suggest adding the `#[coroutine]` to the closure
2024-04-23Auto merge of #123126 - oli-obk:feed_crate_num, r=davidtwcobors-8/+7
Enable `CrateNum` query feeding via `TyCtxt` Instead of having a magic function that violates some `TyCtxtFeed` invariants, add a `create_def` equivalent for `CrateNum`s. Note that this still isn't tracked by the query system (unlike `create_def`), and that feeding most `CrateNum` queries for crates other than the local one will likely cause performance regressions. These things should be attempted on their own separately, but this PR should stand on its own
2024-04-19Move `stable_crate_ids` from `CrateStore` to `Untracked`Oli Scherer-8/+7
This way it's like `Definitions`, which creates `DefId`s by interning `DefPathData`s, but for interning stable crate hashes
2024-04-17consistency rename: language item -> lang itemRalf Jung-1/+1
2024-04-11remove some things that do not need to beMatthias Krüger-1/+1
2024-04-09Auto merge of #123099 - oli-obk:span_tcx, r=petrochenkovbors-18/+20
Replace some `CrateStore` trait methods with hooks. Just like with the `CrateStore` trait, this avoids the cyclic definition issues with `CStore` being defined after TyCtxt, but needing to be used in TyCtxt.
2024-03-28Replace `RemapFileNameExt::for_codegen` with explicit callsUrgau-11/+5
2024-03-27Make `def_path_hash_to_def_id` a hookOli Scherer-5/+9
2024-03-27Move `CrateStore::expn_hash_to_expn_id` to a hookOli Scherer-11/+5
2024-03-27Start replacing `CStore` trait methods with hooks.Oli Scherer-4/+8
This also avoids the cyclic definition issues with CrateStore being defined after TyCtxt, but needing to be used in TyCtxt.
2024-03-22Always encode implied_predicates query for traitsMichael Goulet-12/+2
With associated type bounds enabled, the implied_predicates and super_predicates queries may differ for traits, since associated type bounds are also implied but are not counted as super predicates.
2024-03-20Split item bounds and item super predicatesMichael Goulet-0/+24
2024-03-20Rollup merge of #121543 - onur-ozkan:clippy-args, r=oli-obkMatthias Krüger-1/+1
various clippy fixes We need to keep the order of the given clippy lint rules before passing them. Since clap doesn't offer any useful interface for this purpose out of the box, we have to handle it manually. Additionally, this PR makes `-D` rules work as expected. Previously, lint rules were limited to `-W`. By enabling `-D`, clippy began to complain numerous lines in the tree, all of which have been resolved in this PR as well. Fixes #121481 cc `@matthiaskrgr`
2024-03-20resolve clippy errorsonur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-19Rollup merge of #122695 - surechen:make_only_local_explict_argument, r=lcnrMatthias Krüger-2/+2
Change only_local to a enum type. Change only_local to enum type and change the macros to always require a variant of that enum. r? `@lcnr`
2024-03-19Change only_local to enum type and change the macros to always require a ↵surechen-2/+2
variant of that enum.
2024-03-19Remove all checks of `IntrinsicDef::must_be_overridden` except for the ↵Oli Scherer-8/+3
actual overrides in codegen
2024-03-19Make `const_eval_select` a rustc_intrinsicOli Scherer-2/+4
2024-03-18Rollup merge of #122588 - klensy:imported_source_file, r=michaelwoeristerMatthias Krüger-10/+10
less useless filter calls in imported_source_file This reduces calls to `filter` greatly, giving 0.3% instructions win on some tests.
2024-03-16less useless array builds in imported_source_fileklensy-10/+10
2024-03-14hir: Remove `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id`Vadim Petrochenkov-2/+2
Also replace a few `hir_node()` calls with `hir_node_by_def_id()`
2024-03-12s/mt/mutability/Oli Scherer-4/+4
2024-03-12Ensure nested allocations in statics do not get deduplicatedOli Scherer-3/+6
2024-03-12Add `nested` bool to `DefKind::Static`.Oli Scherer-2/+4
Will be used in the next commit
2024-03-12Change `DefKind::Static` to a struct variantOli Scherer-14/+14
2024-03-09Rollup merge of #122187 - bjorn3:merge_header_version_checks, r=petrochenkovMatthias Krüger-6/+18
Move metadata header and version checks together This will make it easier to report rustc versions for older metadata formats. Split out of https://github.com/rust-lang/rust/pull/120855
2024-03-09Auto merge of #122010 - oli-obk:intrinsics3.0, r=pnkfelixbors-1/+1
Avoid invoking the `intrinsic` query for DefKinds other than `Fn` or `AssocFn` fixes the perf regression from https://github.com/rust-lang/rust/pull/120675 by only invoking (and thus inserting into the dep graph) the `intrinsic` query if the `DefKind` matches items that can actually be intrinsics
2024-03-08Move metadata header and version checks togetherbjorn3-6/+18
This will make it easier to report rustc versions for older metadata formats.
2024-03-07Apply `EarlyBinder` only to `TraitRef` in `ImplTraitHeader`Yoshitomo Nakanishi-3/+2
2024-03-06Auto merge of #119455 - Mark-Simulacrum:relative-spans, r=cjgillotbors-6/+24
Embed length of offset/position into Span tag byte This cuts the average bytes/relative span from 3.5 to 3.2 on libcore, ultimately saving ~400kb of data.
2024-03-05Avoid invoking the `intrinsic` query for DefKinds other than `Fn` or `AssocFn`Oli Scherer-1/+1
2024-03-05Auto merge of #120675 - oli-obk:intrinsics3.0, r=pnkfelixbors-6/+9
Add a scheme for moving away from `extern "rust-intrinsic"` entirely All `rust-intrinsic`s can become free functions now, either with a fallback body, or with a dummy body and an attribute, requiring backends to actually implement the intrinsic. This PR demonstrates the dummy-body scheme with the `vtable_size` intrinsic. cc https://github.com/rust-lang/rust/issues/63585 follow-up to #120500 MCP at https://github.com/rust-lang/compiler-team/issues/720
2024-03-05Rename all `ParseSess` variables/fields/lifetimes as `psess`.Nicholas Nethercote-2/+2
Existing names for values of this type are `sess`, `parse_sess`, `parse_session`, and `ps`. `sess` is particularly annoying because that's also used for `Session` values, which are often co-located, and it can be difficult to know which type a value named `sess` refers to. (That annoyance is the main motivation for this change.) `psess` is nice and short, which is good for a name used this much. The commit also renames some `parse_sess_created` values as `psess_created`.
2024-03-04make `intrinsic` query legal for any `DefId`Oli Scherer-8/+6
2024-03-04Add a scheme for moving away from `extern "rust-intrinsic"` entirelyOli Scherer-2/+7
2024-03-04Return a struct from `query intrinsic` to be able to add another field in ↵Oli Scherer-2/+2
the next commit
2024-02-18resolve: Scale back unloading of speculatively loaded cratesVadim Petrochenkov-0/+10