summary refs log tree commit diff
path: root/compiler/rustc_metadata/src/rmeta
AgeCommit message (Collapse)AuthorLines
2022-09-14make `mk_attr_id` part of `ParseSess`SparrowLii-0/+7
2022-09-11Only encode RPITIT when trait method has default bodyMichael Goulet-1/+13
2022-09-09Handle generic parameters.Camille GILLOT-3/+0
2022-09-09Address rebase issues, make async fn in trait workMichael Goulet-1/+5
2022-09-09RPITIT placeholder itemsMichael Goulet-0/+6
2022-09-07rustc: Parameterize `ty::Visibility` over used IDVadim Petrochenkov-9/+21
It allows using `LocalDefId` instead of `DefId` when possible, and also encode cheaper `Visibility<DefIndex>` into metadata.
2022-09-05Rollup merge of #101391 - matthiaskrgr:perf0309, r=oli-obkDylan DPC-13/+5
more clippy::perf fixes
2022-09-03more clippy::perf fixesMatthias Krüger-13/+5
2022-09-03Do not call object_lifetime_default on lifetime params.Camille GILLOT-4/+3
2022-09-03Rollup merge of #100928 - CleanCut:rustc_metadata_diagnostics, r=davidtwcoDylan DPC-3/+4
Migrate rustc_metadata to SessionDiagnostics Migrate rustc_metadata to SessionDiagnostics. Part of https://github.com/rust-lang/rust/issues/100717
2022-09-01Auto merge of #98960 - cjgillot:entry-kind, r=estebankbors-354/+250
Remove EntryKind from metadata. This PR continues the refactor of metadata emission to be more systematic, iterating on definitions and filtering based on each definition's `DefKind`. This allows to remove the large `EntryKind` enum, replaced by linear tables in metadata.
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-3/+0
by module
2022-08-31respond to review feedback: mainly eliminate as many conversions as possible...Nathan Stocks-3/+3
- ... when creating diagnostics in rustc_metadata - use the error_code! macro - pass macro output to diag.code() - use fluent from within manual implementation of SessionDiagnostic - emit the untested errors in case they occur in the wild - stop panicking in the probably-not-dead code, add fixme to write test
2022-08-31port encoder.rs to SessionDiagnosticsNathan Stocks-3/+4
2022-08-30Handle MIR in a single place.Camille GILLOT-17/+19
2022-08-30Remove fn_has_self_parameter table.Camille GILLOT-16/+15
2022-08-30Separate macro_rules and macro_definition.Camille GILLOT-10/+12
2022-08-30Remove EntryKind.Camille GILLOT-148/+32
2022-08-30Create a module-reexports table.Camille GILLOT-18/+11
2022-08-30Fix the panic message.Camille GILLOT-1/+1
2022-08-30Create a table for fn_has_self_parameter.Camille GILLOT-15/+17
2022-08-30Use tables for macros.Camille GILLOT-11/+27
2022-08-30Move AssocContainer to a metadata table.Camille GILLOT-17/+24
2022-08-30Move VariantData to a metadata table.Camille GILLOT-24/+25
2022-08-30Simplify recursion scheme.Camille GILLOT-79/+51
2022-08-30Encode consts in metadata main loop.Camille GILLOT-32/+51
2022-08-30Encode type in the main loop.Camille GILLOT-56/+55
2022-08-29Rollup merge of #99821 - cjgillot:ast-lifetimes-2, r=compiler-errorsDylan DPC-0/+8
Remove separate indexing of early-bound regions ~Based on https://github.com/rust-lang/rust/pull/99728.~ This PR copies some modifications from https://github.com/rust-lang/rust/pull/97839 around object lifetime defaults. These modifications allow to stop counting generic parameters during lifetime resolution, and rely on the indexing given by `rustc_typeck::collect`.
2022-08-26Implementation of import_name_typeDaniel Paoliello-2/+2
2022-08-25Auto merge of #100436 - jyn514:macro-query-system, r=cjgillotbors-12/+12
try and simplify some things in the query system
2022-08-23get rid of another unnecessary lifetime macro argumentJoshua Nelson-12/+12
2022-08-20rmeta/query cache: don't write string values of preinterned symbolsklensy-11/+23
2022-08-19Auto merge of #100209 - cjgillot:source-file-index, r=estebankbors-211/+194
Lazily decode SourceFile from metadata Currently, source files from foreign crates are decoded up-front from metadata. Spans from those crates were matched with the corresponding source using binary search among those files. This PR changes the strategy by matching spans to files during encoding. This allows to decode source files on-demand, instead of up-front. The on-disk format for spans becomes: `<tag> <position from start of file> <length> <file index> <crate (if foreign file)>`.
2022-08-15cache strings while encoding/decoding to compiler artifactsklensy-0/+54
2022-08-09Rollup merge of #96478 - WaffleLapkin:rustc_default_body_unstable, r=Aaron1011Dylan DPC-0/+15
Implement `#[rustc_default_body_unstable]` This PR implements a new stability attribute — `#[rustc_default_body_unstable]`. `#[rustc_default_body_unstable]` controls the stability of default bodies in traits. For example: ```rust pub trait Trait { #[rustc_default_body_unstable(feature = "feat", isssue = "none")] fn item() {} } ``` In order to implement `Trait` user needs to either - implement `item` (even though it has a default implementation) - enable `#![feature(feat)]` This is useful in conjunction with [`#[rustc_must_implement_one_of]`](https://github.com/rust-lang/rust/pull/92164), we may want to relax requirements for a trait, for example allowing implementing either of `PartialEq::{eq, ne}`, but do so in a safe way — making implementation of only `PartialEq::ne` unstable. r? `@Aaron1011` cc `@nrc` (iirc you were interested in this wrt `read_buf`), `@danielhenrymantilla` (you were interested in the related `#[rustc_must_implement_one_of]`) P.S. This is my first time working with stability attributes, so I'm not sure if I did everything right 😅
2022-08-08Remove unused parameter.Camille GILLOT-1/+0
2022-08-07Only encode position from start of file.Camille GILLOT-23/+21
2022-08-06Support parallel compiler.Camille GILLOT-4/+3
2022-08-06Simplify encoding a bit.Camille GILLOT-34/+35
2022-08-06Remove unused cache.Camille GILLOT-10/+0
2022-08-06Decode SourceFile out of order.Camille GILLOT-149/+154
2022-08-06Encode index of SourceFile along with span.Camille GILLOT-69/+60
2022-08-03Compute `object_lifetime_default` per parameter.Camille GILLOT-0/+8
2022-08-01Remove trait_of_item query.Camille GILLOT-14/+0
2022-08-01Remove DefId from AssocItemContainer.Camille GILLOT-47/+17
2022-08-01Remove visibility from AssocItem.Camille GILLOT-1/+0
2022-08-01Store associated item defaultness in impl_defaultness.Camille GILLOT-43/+13
2022-07-29Rename local_did to def_idMiguel Guarniz-8/+8
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29Change maybe_body_owned_by to take local def idMiguel Guarniz-8/+8
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-27Update mentions to `rustc_metadata::rmeta::Lazy`Yuki Okushi-12/+12
Signed-off-by: Yuki Okushi <jtitor@2k36.org>