Rollup merge of #99345 - compiler-errors:issue-99073-redux, r=oli-obk
Do not allow typeck children items to constrain outer RPITs Fixes #99073 in a simpler and more conservative way than #99079. Simply raise a mismatched types error if we try to constrain an RPIT in an item that isn't the RPIT's parent. r? `@oli-obk`
This commit is contained in:
commit
3c3c5da9ad
6 changed files with 76 additions and 1 deletions
|
@ -433,7 +433,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||
}
|
||||
|
||||
#[instrument(skip(self), level = "trace")]
|
||||
fn opaque_ty_origin_unchecked(&self, def_id: LocalDefId, span: Span) -> OpaqueTyOrigin {
|
||||
pub fn opaque_ty_origin_unchecked(&self, def_id: LocalDefId, span: Span) -> OpaqueTyOrigin {
|
||||
let origin = match self.tcx.hir().expect_item(def_id).kind {
|
||||
hir::ItemKind::OpaqueTy(hir::OpaqueTy { origin, .. }) => origin,
|
||||
ref itemkind => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue