summary refs log tree commit diff
path: root/compiler/rustc_metadata/src/rmeta/decoder.rs
AgeCommit message (Collapse)AuthorLines
2020-11-10Changed unwrap_or to unwrap_or_else in some places.Nicholas-Baron-8/+8
The discussion seems to have resolved that this lint is a bit "noisy" in that applying it in all places would result in a reduction in readability. A few of the trivial functions (like `Path::new`) are fine to leave outside of closures. The general rule seems to be that anything that is obviously an allocation (`Box`, `Vec`, `vec![]`) should be in a closure, even if it is a 0-sized allocation.
2020-10-27Cache foreign_modules queryRyan Levick-3/+5
2020-10-14Remove unused code from remaining compiler cratesest31-21/+0
2020-10-06Split bounds from predicatesMatthew Jasper-1/+14
2020-10-05Record `expansion_that_defined` into crate metadataAaron Hill-0/+4
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-18/+38
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-19wip emit errors during AbstractConst buildingBastian Kauschke-2/+3
2020-09-18support const_evaluatable_checked across crate boundariesBastian Kauschke-0/+19
2020-08-30mv compiler to compiler/mark-0/+1907