Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4de9c6d
rustdoc: search by macro when query ends with `!`
notriddle Feb 16, 2023
d963318
Correct eslint warning
notriddle Feb 17, 2023
07cf219
Update how-to-read-rustdoc.md
notriddle Feb 22, 2023
317be61
make --open work on all books
pietroalbini Feb 23, 2023
96e6fb6
Update search eBNF with `!` moved
notriddle Feb 25, 2023
379b18b
Use checked_add in VecDeque::append for ZSTs to avoid overflow
pommicket Feb 25, 2023
12f959b
Add test for VecDeque::append ZST capacity overflow
pommicket Feb 25, 2023
0758c05
recover from for-else and while-else
y21 Feb 23, 2023
9642346
Add regression test for #107280
JohnTitor Mar 1, 2023
50d35c1
Add regression test for #105821
JohnTitor Mar 1, 2023
5295de1
Add opt_rpitit_info query
spastorino Feb 28, 2023
e74f50e
Add unstable option new_rpitit to be used for new RPITIT lowering system
spastorino Feb 28, 2023
be72bec
Fix typo in docs
spastorino Feb 28, 2023
811a1ca
Make associated_item_def_ids for traits use an unstable option to als…
spastorino Feb 28, 2023
73e2fe0
Properly implement should_encode_fn_impl_trait_in_trait using new uns…
spastorino Feb 28, 2023
f03e534
Rollup merge of #108143 - notriddle:notriddle/filter-exclamation-macr…
Dylan-DPC Mar 1, 2023
38461f8
Rollup merge of #108394 - ferrocene:pa-open, r=ozkanonur
Dylan-DPC Mar 1, 2023
27fa7b5
Rollup merge of #108427 - y21:for-else-diagnostic, r=compiler-errors
Dylan-DPC Mar 1, 2023
093a53f
Rollup merge of #108462 - pommicket:fix-vecdeque-zst-overflow, r=Amanieu
Dylan-DPC Mar 1, 2023
9d132f7
Rollup merge of #108568 - spastorino:new-rpitit-flag, r=compiler-errors
Dylan-DPC Mar 1, 2023
0ed76b4
Rollup merge of #108604 - JohnTitor:issue-107280, r=compiler-errors
Dylan-DPC Mar 1, 2023
02e4eef
Rollup merge of #108605 - JohnTitor:issue-105821, r=compiler-errors
Dylan-DPC Mar 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add opt_rpitit_info query
  • Loading branch information
spastorino committed Mar 1, 2023
commit 5295de1694c07fe47db112468a08098f930fcf53
1 change: 1 addition & 0 deletions compiler/rustc_middle/src/hir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ pub fn provide(providers: &mut Providers) {
}
};
providers.opt_def_kind = |tcx, def_id| tcx.hir().opt_def_kind(def_id.expect_local());
providers.opt_rpitit_info = |_, _| None;
providers.all_local_trait_impls = |tcx, ()| &tcx.resolutions(()).trait_impls;
providers.expn_that_defined = |tcx, id| {
let id = id.expect_local();
Expand Down
8 changes: 8 additions & 0 deletions compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,14 @@ rustc_queries! {
separate_provide_extern
}

/// The `opt_rpitit_info` query returns the pair of the def id of the function where the RPIT
/// is defined and the opaque def id if any.
query opt_rpitit_info(def_id: DefId) -> Option<ty::ImplTraitInTraitData> {
desc { |tcx| "opt_rpitit_info `{}`", tcx.def_path_str(def_id) }
cache_on_disk_if { def_id.is_local() }
feedable
}

/// Gets the span for the definition.
query def_span(def_id: DefId) -> Span {
desc { |tcx| "looking up span for `{}`", tcx.def_path_str(def_id) }
Expand Down
6 changes: 6 additions & 0 deletions compiler/rustc_middle/src/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2071,6 +2071,12 @@ pub enum ImplOverlapKind {
Issue33140,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable, HashStable)]
pub enum ImplTraitInTraitData {
Trait { fn_def_id: DefId, opaque_def_id: DefId },
Impl { fn_def_id: DefId },
}

impl<'tcx> TyCtxt<'tcx> {
pub fn typeck_body(self, body: hir::BodyId) -> &'tcx TypeckResults<'tcx> {
self.typeck(self.hir().body_owner_def_id(body))
Expand Down