summary refs log tree commit diff
path: root/compiler/rustc_metadata/src/rmeta/decoder
AgeCommit message (Collapse)AuthorLines
2021-04-03Remove attribute `#[link_args]`Vadim Petrochenkov-5/+0
2021-03-23Update with commentskadmin-1/+1
A bunch of nits fixed, and a new test for pretty printing the AST.
2021-03-23Add query for const_param_defaultkadmin-0/+1
2021-02-23Add #[rustc_legacy_const_generics]Amanieu d'Antras-0/+4
2021-01-23Iterate to encode def_kind.Camille GILLOT-1/+1
2021-01-15Auto merge of #80602 - tgnottingham:cratemetadata_you_aint_special, ↵bors-5/+8
r=michaelwoerister Remove DepKind::CrateMetadata and pre-allocation of DepNodes Remove much of the special-case handling around crate metadata dependency tracking by replacing `DepKind::CrateMetadata` and the pre-allocation of corresponding `DepNodes` with on-demand invocation of the `crate_hash` query.
2021-01-13Auto merge of #77524 - Patryk27:fixes/66228, r=estebankbors-0/+3
Rework diagnostics for wrong number of generic args (fixes #66228 and #71924) This PR reworks the `wrong number of {} arguments` message, so that it provides more details and contextual hints.
2021-01-12Prevent potential bug resulting from changing crate_hash query nameTyson Nottingham-1/+2
2021-01-12Return to defining crate_hash similarly to other query providersTyson Nottingham-17/+5
2021-01-12Remove DepKind::CrateMetadata and pre-allocation of DepNodesTyson Nottingham-5/+19
Remove much of the special-case handling around crate metadata dependency tracking by replacing `DepKind::CrateMetadata` and the pre-allocation of corresponding `DepNodes` with on-demand invocation of the `crate_hash` query.
2021-01-10Rework diagnostics for wrong number of generic argsPatryk Wychowaniec-0/+3
2021-01-04Differentiate between the availability of ctfe MIR and runtime MIRoli-0/+1
2021-01-04Keep an unoptimized duplicate of `const fn` aroundoli-0/+1
This allows CTFE to reliably detect UB, as otherwise optimizations may hide UB.
2020-12-03rustc_metadata: Remove some dead codeVadim Petrochenkov-8/+4
2020-11-25Lazy DefPath decoding for incremental compilationAaron Hill-0/+10
2020-11-13Push to result vector instead of allocatingDániel Buga-1/+1
Co-authored-by: lcnr <bastian_kauschke@hotmail.de>
2020-11-13Eliminate some temporary vectors & Remove unnecessary mark_attr_usedDániel Buga-7/+3
2020-11-03Auto merge of #78448 - rylev:cache-foreign_modules, r=wesleywiserbors-4/+7
foreign_modules query hash table lookups When compiling a large monolithic crate we're seeing huge times in the `foreign_modules` query due to repeated iteration over foreign modules (in order to find a module by its id). This implements hash table lookups so that which massively reduces time spent in that query in this particular case. We'll need to see if the overhead of creating the hash table has a negative impact on performance in more normal compilation scenarios. I'm working with `@wesleywiser` on this.
2020-10-30Fix some more clippy warningsJoshua Nelson-7/+6
2020-10-27Remove some cruft from foreign_modules refactorRyan Levick-3/+4
2020-10-27Cache foreign_modules queryRyan Levick-7/+9
2020-10-24Compute proper module parent during resolutionAaron Hill-0/+5
Fixes #75982 The direct parent of a module may not be a module (e.g. `const _: () = { #[path = "foo.rs"] mod foo; };`). To find the parent of a module for purposes of resolution, we need to walk up the tree until we hit a module or a crate root.
2020-10-10Take functions by valueDániel Buga-1/+1
2020-10-06Split bounds from predicatesMatthew Jasper-0/+1
2020-10-05Record `expansion_that_defined` into crate metadataAaron Hill-0/+1
Fixes #77523 Now that hygiene serialization is implemented, we also need to record `expansion_that_defined` so that we properly handle a foreign `SyntaxContext`.
2020-09-26Encode less metadata for proc-macro cratesAaron Hill-2/+5
Currently, we serialize the same crate metadata for proc-macro crates as we do for normal crates. This is quite wasteful - almost none of this metadata is ever used, and much of it can't even be deserialized (if it contains a foreign `CrateNum`). This PR changes metadata encoding to skip encoding the majority of crate metadata for proc-macro crates. Most of the `Lazy<[T]>` fields are left completetly empty, while the non-lazy fields are left as-is. Additionally, proc-macros now have a def span that does not include their body. This was done for normal functions in #75465, but was missed for proc-macros. As a result of this PR, we should only ever encode local `CrateNum`s when encoding proc-macro crates. I've added a specialized serialization impl for `CrateNum` to assert this.
2020-09-18support const_evaluatable_checked across crate boundariesBastian Kauschke-0/+1
2020-09-10Attach `TokenStream` to `ast::Visibility`Aaron Hill-2/+6
A `Visibility` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
2020-08-30mv compiler to compiler/mark-0/+513