about summary refs log tree commit diff
path: root/compiler/rustc_metadata/src/rmeta
AgeCommit message (Collapse)AuthorLines
2022-05-16Add a query for checking whether a function is an intrinsic.Oli Scherer-0/+15
2022-05-13rename visit item-like methodsMiguel Guarniz-1/+1
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove ItemLikeVisitor and DeepVisitorMiguel Guarniz-1/+1
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove TraitVisitorMiguel Guarniz-17/+6
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13Cache more queries on disk.Camille GILLOT-13/+0
2022-05-10only_local: always check for misuselcnr-7/+9
2022-05-10don't encode only locally used attrslcnr-3/+7
2022-05-09reviewlcnr-1/+1
2022-05-09only compute `codegen_fn_attrs` where neededlcnr-1/+3
2022-05-09store `codegen_fn_attrs` in crate metadatalcnr-0/+4
2022-05-06use def_span and def_kind queries instead of calling tcx.hir() methodsMiguel Guarniz-1/+1
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-03Add support for a new attribute `#[debugger_visualizer]` to support ↵ridwanabdillahi-20/+39
embedding debugger visualizers into a generated PDB. Cleanup `DebuggerVisualizerFile` type and other minor cleanup of queries. Merge the queries for debugger visualizers into a single query. Revert move of `resolve_path` to `rustc_builtin_macros`. Update dependencies in Cargo.toml for `rustc_passes`. Respond to PR comments. Load visualizer files into opaque bytes `Vec<u8>`. Debugger visualizers for dynamically linked crates should not be embedded in the current crate. Update the unstable book with the new feature. Add the tracking issue for the debugger_visualizer feature. Respond to PR comments and minor cleanups.
2022-04-30Box HIR Generics and Impl.Camille GILLOT-2/+2
2022-04-25Auto merge of #95604 - nbdd0121:used2, r=petrochenkovbors-9/+9
Generate synthetic object file to ensure all exported and used symbols participate in the linking Fix #50007 and #47384 This is the synthetic object file approach that I described in https://github.com/rust-lang/rust/pull/95363#issuecomment-1079932354, allowing all exported and used symbols to be linked while still allowing them to be GCed. Related #93791, #95363 r? `@petrochenkov` cc `@carbotaniuman`
2022-04-21[WIP] rustdoc: Resolve some more doc links earlyVadim Petrochenkov-0/+8
2022-04-19rustc_metadata: Store a flag telling whether an item may have doc links in ↵Vadim Petrochenkov-3/+34
its attributes This should be cheap on rustc side, but it's significant optimization for rustdoc that won't need to decode and process attributes unnecessarily
2022-04-19Rollup merge of #96142 - cjgillot:no-crate-def-index, r=petrochenkovDylan DPC-3/+3
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.
2022-04-19Rollup merge of #94493 - ↵Dylan DPC-3/+26
oribenshir:feature/ISSUE-78543_async_fn_in_foreign_crate_diag_2, r=davidtwco Improved diagnostic on failure to meet send bound on future in a foreign crate Provide a better diagnostic on failure to meet send bound on futures in a foreign crate. fixes #78543
2022-04-18Add `SymbolExportInfo`Gary Guo-9/+9
This is currently a wrapper to `SymbolExportLevel` but it allows later addition of extra information.
2022-04-17Stop using CRATE_DEF_INDEX.Camille GILLOT-3/+3
`CRATE_DEF_ID` and `CrateNum::as_def_id` are almost always what we want.
2022-04-17Auto merge of #95655 - kckeiks:create-hir-crate-items-query, r=cjgillotbors-38/+20
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 <mi9uel9@gmail.com> cc `@cjgillot`
2022-04-16Auto merge of #95899 - petrochenkov:modchild2, r=cjgillotbors-71/+70
rustc_metadata: Do not encode unnecessary module children This should remove the syntax context shift and the special case for `ExternCrate` in decoder in https://github.com/rust-lang/rust/pull/95880. This PR also shifts some work from decoding to encoding, which is typically useful for performance (but probably not much in this case). r? `@cjgillot`
2022-04-16Provide a better diagnostic on failure to meet send bound on futures in a ↵oribenshir-3/+26
foreign crate Adding diagnostic data on generators to the crate metadata and using it to provide a better diagnostic on failure to meet send bound on futures originated from a foreign crate
2022-04-14library: Move `CStr` to libcore, and `CString` to liballocVadim Petrochenkov-9/+15
2022-04-13rustc_metadata: Do not encode unnecessary module childrenVadim Petrochenkov-71/+70
2022-04-10Simplify FixedSizeEncoding using const generics.Camille GILLOT-107/+85
2022-04-10Directly encode DefId in metadata.Camille GILLOT-10/+77
2022-04-10Directly encode DefPathHash in metadata.Camille GILLOT-7/+25
2022-04-10Directly encode DefKind in metadata.Camille GILLOT-14/+64
2022-04-10Directly encode IsAsync in metadata.Camille GILLOT-5/+12
2022-04-10Directly encode Defaultness in metadata.Camille GILLOT-2/+10
2022-04-10Directly encode Constness in metadata.Camille GILLOT-10/+17
2022-04-10Directly encode ImplPolarity in metadata.Camille GILLOT-2/+45
2022-04-09use ItemId.def_id and avoid fetching ItemMiguel Guarniz-16/+12
2022-04-08remove ItemLikeVisitor impls and add fast paths using DefKindMiguel Guarniz-39/+21
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-04-08remove some uses of visit_all_item_likes in incremental, metadata and ↵Miguel Guarniz-1/+5
interface crates Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-04-07rustdoc: Early doc link resolution fixes and refactoringsVadim Petrochenkov-9/+15
2022-03-31Merge impl_constness and is_const_fn_raw.Camille GILLOT-15/+4
2022-03-31Create trait_def table.Camille GILLOT-58/+14
2022-03-31Store fn constness in impl_constness.Camille GILLOT-49/+32
2022-03-31Introduce repr_options table.Camille GILLOT-33/+36
2022-03-31Rollup merge of #95497 - nyurik:compiler-spell-comments, r=compiler-errorsDylan DPC-2/+2
Spellchecking compiler comments This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-30Auto merge of #95436 - cjgillot:static-mut, r=oli-obkbors-28/+11
Remember mutability in `DefKind::Static`. This allows to compute the `BodyOwnerKind` from `DefKind` only, and removes a direct dependency of some MIR queries onto HIR. As a side effect, it also simplifies metadata, since we don't need 4 flavours of `EntryKind::*Static` any more.
2022-03-30Spellchecking compiler commentsYuri Astrakhan-2/+2
This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-30typolcnr-1/+1
2022-03-30fix rustdoc wrt builtin impls switchlcnr-9/+21
2022-03-30rework implementation for inherent impls for builtin typeslcnr-14/+84
2022-03-29Remember mutability in `DefKind::Static`.Camille GILLOT-28/+11
This allows to compute the `BodyOwnerKind` from `DefKind` only, and removes a direct dependency of some MIR queries onto HIR. As a side effect, it also simplifies metadata, since we don't need 4 flavours of `EntryKind::*Static` any more.
2022-03-11Improve `AdtDef` interning.Nicholas Nethercote-16/+16
This commit makes `AdtDef` use `Interned`. Much the commit is tedious changes to introduce getter functions. The interesting changes are in `compiler/rustc_middle/src/ty/adt.rs`.
2022-03-03Rollup merge of #94057 - lcnr:simplify_type-uwu, r=nikomatsakisMatthias Krüger-2/+2
improve comments for `simplify_type` Should now correctly describe what's going on. Experimented with checking the invariant for projections but that ended up requiring fairly involved changes. I assume that it is not possible to get unsoundness here, at least for now and I can pretty much guarantee that it's impossible to trigger it by accident. r? `````@nikomatsakis````` cc #92721