about summary refs log tree commit diff
path: root/compiler/rustc_passes/src
AgeCommit message (Collapse)AuthorLines
2022-05-16Add a query for checking whether a function is an intrinsic.Oli Scherer-3/+1
2022-05-15rustc: Stricter checking for #[link] attributesVadim Petrochenkov-14/+20
2022-05-14allocate string only when error will be emittedMiguel Guarniz-2/+7
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-14use opt_item_name to pattern match items with namesMiguel Guarniz-2/+2
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-14avoid fetching HIR when handling Impl assoc itemsMiguel Guarniz-12/+18
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove redundant branchMiguel Guarniz-4/+4
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove unnecessary methods from HirIdValidatorMiguel Guarniz-14/+0
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13avoid converting to DefId from LocalDefId when using queryMiguel Guarniz-1/+1
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13use for_each_module instead of iterating over Item'sMiguel Guarniz-7/+8
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13change back to using tcx.hir() visit-item methodMiguel Guarniz-47/+8
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13rename visit item-like methodsMiguel Guarniz-7/+7
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove ItemLikeVisitor and DeepVisitorMiguel Guarniz-10/+7
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove HirVisitorMiguel Guarniz-10/+4
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove DebuggerVisualizerCollectorMiguel Guarniz-90/+68
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13replace hir().def_kind for def_kind query in rustc_passesMiguel Guarniz-5/+5
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13check def_kind before fetching itemMiguel Guarniz-21/+27
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove CollectPrivateImplItemsVisitorMiguel Guarniz-70/+57
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove LayoutTestMiguel Guarniz-79/+67
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove OuterVisitorMiguel Guarniz-39/+52
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13optimize find_item to fetch Item only when neededMiguel Guarniz-26/+39
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove ItemLikeVisitor impl for EntryContextMiguel Guarniz-23/+8
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove DiagnosticItemCollectorMiguel Guarniz-39/+28
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove LifeSeederMiguel Guarniz-52/+69
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13replace usage of visit_item_likes_in_modules with hir_module_items queryMiguel Guarniz-2/+20
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13Remove CheckConstTraitVisitorMiguel Guarniz-68/+54
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-10fix typolcnr-1/+1
2022-05-10only_local: always check for misuselcnr-9/+9
2022-05-09Auto merge of #96473 - lcnr:querify-codegen-fn-attrs, r=cjgillotbors-21/+52
store `codegen_fn_attrs` in crate metadata extracted from #95562 because the change isn't trivial.
2022-05-09reviewlcnr-3/+3
2022-05-09only compute `codegen_fn_attrs` where neededlcnr-21/+52
2022-05-09use hir::Let in hir::GuardSparrowLii-5/+5
2022-05-08Warn on unused doc(hidden) on trait impl itemsLeón Orell Valerian Liehr-2/+74
2022-05-06use def_span and def_kind queries instead of calling tcx.hir() methodsMiguel Guarniz-2/+2
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-05Auto merge of #96520 - lcnr:general-incoherent-impls, r=petrochenkovbors-1/+27
generalize "incoherent impls" impl for user defined types To allow the move of `trait Error` into core. continues the work from #94963, finishes https://github.com/rust-lang/compiler-team/issues/487 r? `@petrochenkov` cc `@yaahc`
2022-05-05generalize "incoherent impls" impl for custom typeslcnr-1/+27
2022-05-04Cleanup broken doc links.ridwanabdillahi-1/+1
2022-05-03Add support for a new attribute `#[debugger_visualizer]` to support ↵ridwanabdillahi-0/+199
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-05-02rustc: Panic by default in `DefIdTree::parent`Vadim Petrochenkov-9/+8
Only crate root def-ids don't have a parent, and in majority of cases the argument of `DefIdTree::parent` cannot be a crate root. So we now panic by default in `parent` and introduce a new non-panicing function `opt_parent` for cases where the argument can be a crate root. Same applies to `local_parent`/`opt_local_parent`.
2022-04-30Box HIR Generics and Impl.Camille GILLOT-2/+2
2022-04-25Auto merge of #95604 - nbdd0121:used2, r=petrochenkovbors-0/+5
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-25Auto merge of #96246 - SparrowLii:bound_contxet, r=compiler-errorsbors-1/+2
Add `BoundKind` in `visit_param_bounds` to check questions in bounds From the FIXME in the impl of `AstValidator`. Better bound checks by adding `BoundCtxt` type parameter to `visit_param_bound` cc `@ecstatic-morse`
2022-04-23Fix lints.Camille GILLOT-35/+14
2022-04-23Drop vis in Item.Camille GILLOT-1/+1
2022-04-23Drop vis in FieldDef.Camille GILLOT-4/+14
2022-04-21rename to `BoundKind` and add commentsSparrowLii-2/+2
2022-04-20Add `BoundCtxt` in `visit_param_bounds` to check questions in boundsSparrowLii-1/+2
2022-04-19Rollup merge of #96142 - cjgillot:no-crate-def-index, r=petrochenkovDylan DPC-35/+26
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-18Make `#[used]` considered reachableGary Guo-0/+5
2022-04-17Stop using CRATE_DEF_INDEX.Camille GILLOT-35/+26
`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-59/+48
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`