Uh oh!
There was an error while loading. Please reload this page.
Move struct placeholder pt2 - #150271
Conversation
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
753b92c to
2077c6bCompare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
lcnr
commented
Jan 5, 2026
The reason
Try to replace the manual impl with a derive and see if anything breaks. If it does break, add |
d262f5c to
d36238dCompare
This comment has been minimized.
This comment has been minimized.
d36238d to
a03a907Compare
This comment has been minimized.
This comment has been minimized.
a03a907 to
b4de573Compare
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
044bbd5 to
cdff0b9Compare
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
| fn lift_to_interner(self, cx: U) -> Option<Self::Lifted> { | ||
| Some(BoundTy { var: self.var, kind: self.kind.lift_to_interner(cx)? }) | ||
| } | ||
| } |
There was a problem hiding this comment.
I get this error without the implementation;
error[E0277]: the trait bound `BoundTy<TyCtxt<'_>>: Lift<TyCtxt<'tcx>>` is not satisfied
--> compiler/rustc_infer/src/infer/region_constraints/mod.rs:672:59
|
672 | GenericKind::Placeholder(ref p) => write!(f, "{p}"),
| -----------^^^--
| | |
| | unsatisfied trait bound
| in this macro invocation (#1)
|
--> /rustc/9b1f8ff42d110b0ca138116745be921df5dc97e7/library/core/src/macros/mod.rs:610:0
|
= note: in this expansion of `write!` (#1)
::: /rustc/9b1f8ff42d110b0ca138116745be921df5dc97e7/library/core/src/macros/mod.rs:612:23
|
= note: in this macro invocation (#2)
::: /rustc/9b1f8ff42d110b0ca138116745be921df5dc97e7/library/core/src/macros/mod.rs:997:4
|
= note: in this expansion of `$crate::format_args!` (#2)
|
= help: the nightly-only, unstable trait `for<'tcx> Lift<rustc_middle::ty::TyCtxt<'tcx>>` is not implemented for `BoundTy<rustc_middle::ty::TyCtxt<'_>>`
= help: the following other types implement trait `Lift<I>`:
`&RawList<(), BoundVariableKind<TyCtxt<'a>>>` implements `Lift<rustc_middle::ty::TyCtxt<'tcx>>`
`&RawList<(), GenericArg<'a>>` implements `Lift<rustc_middle::ty::TyCtxt<'tcx>>`
`&RawList<(), Ty<'a>>` implements `Lift<rustc_middle::ty::TyCtxt<'tcx>>`
`&RawList<(), Binder<TyCtxt<'a>, ...>>` implements `Lift<rustc_middle::ty::TyCtxt<'tcx>>`
`()` implements `Lift<rustc_middle::ty::TyCtxt<'tcx>>`
`AliasTerm<I>` implements `Lift<J>`
`AliasTy<I>` implements `Lift<J>`
`AllocId` implements `Lift<rustc_middle::ty::TyCtxt<'tcx>>`
and 68 others
= note: required for `Placeholder<TyCtxt<'_>, BoundTy<TyCtxt<'_>>>` to implement `for<'tcx> Lift<rustc_middle::ty::TyCtxt<'tcx>>`
= note: required for `rustc_middle::ty::TyCtxt<'_>` to implement `IrPrint<Placeholder<TyCtxt<'_>, BoundTy<...>>>`
= note: required for `Placeholder<TyCtxt<'_>, BoundTy<TyCtxt<'_>>>` to implement `std::fmt::Display`
= note: 1 redundant requirement hidden
= note: required for `&Placeholder<TyCtxt<'_>, BoundTy<TyCtxt<'_>>>` to implement `std::fmt::Display`
= note: the full name for the type has been written to '/home/jambar02/Documents/arm/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_infer-29c3d638b97358db.long-type-10995706924995725161.txt'
= note: consider using `--verbose` to print the full type name to the console
There was a problem hiding this comment.
without the manual implementation but with a derive?
There was a problem hiding this comment.
I get the same error when doing;
#[derive_where(Clone,Copy,PartialEq,Eq,Hash;I:Interner)]#[derive(Lift_Generic)]#[cfg_attr( feature = "nightly", derive(Encodable_NoContext,Decodable_NoContext,HashStable_NoContext))]pubstructBoundTy<I:Interner>{pubvar: ty::BoundVar,pubkind:BoundTyKind<I>,}There was a problem hiding this comment.
that might be as BoundVar doesn't implement Lift.
Does only deriving it for BoundRegionKind also error? The same with its HashStable impl
There was a problem hiding this comment.
Doing it for BoundRegionKind allowed me to then also do it for BoundVariableKind and BoundTyKind.
| type BoundTy: BoundVarLike<Self>; | ||
| type PlaceholderTy: PlaceholderLike<Self, Bound = Self::BoundTy>; | ||
| type Symbol: Copy + Hash + PartialEq + Eq + Debug; | ||
| type Symbol: Copy + Hash + PartialEq + Eq + Debug + Symbol<Self>; |
There was a problem hiding this comment.
please move all these item bounds to be super traits of Symbol instead
There was a problem hiding this comment.
I didn't push my changes 🤦
8387fa4 to
267fa27CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
267fa27 to
9f0791eCompareUh oh!
There was an error while loading. Please reload this page.
lcnr
commented
Jan 29, 2026
@bors delegate+ |
✌️ @Jamesbarford, you can now approve this pull request! If @lcnr told you to " |
9f0791e to
25c1365CompareJamesbarford
commented
Jan 29, 2026
@bors r=lcnr |
…uwer Rollup of 8 pull requests Successful merges: - #147387 (hir_owner_parent optimized to inlined call for non-incremental build) - #150271 (Move struct placeholder pt2) - #151283 (Suggest ignore returning value inside macro for unused_must_use lint) - #151565 (Rename, clarify, and document code for "erasing" query values) - #149482 (thread::scope: document how join interacts with TLS destructors) - #151827 (Use `Rustc` prefix for `rustc` attrs in `AttributeKind`) - #151833 (Treat unions as 'data types' in attr parsing diagnostics) - #151834 (Update `askama` version to `0.15.4`)
Uh oh!
There was an error while loading. Please reload this page.
Rollup merge of #150271 - Jamesbarford:chore/refactor-struct-placeholder-pt2, r=lcnr Move struct placeholder pt2 r? ghost
…-placeholder-pt2, r=lcnr Move struct placeholder pt2 r? ghost
…uwer Rollup of 8 pull requests Successful merges: - rust-lang/rust#147387 (hir_owner_parent optimized to inlined call for non-incremental build) - rust-lang/rust#150271 (Move struct placeholder pt2) - rust-lang/rust#151283 (Suggest ignore returning value inside macro for unused_must_use lint) - rust-lang/rust#151565 (Rename, clarify, and document code for "erasing" query values) - rust-lang/rust#149482 (thread::scope: document how join interacts with TLS destructors) - rust-lang/rust#151827 (Use `Rustc` prefix for `rustc` attrs in `AttributeKind`) - rust-lang/rust#151833 (Treat unions as 'data types' in attr parsing diagnostics) - rust-lang/rust#151834 (Update `askama` version to `0.15.4`)
…uwer Rollup of 8 pull requests Successful merges: - rust-lang/rust#147387 (hir_owner_parent optimized to inlined call for non-incremental build) - rust-lang/rust#150271 (Move struct placeholder pt2) - rust-lang/rust#151283 (Suggest ignore returning value inside macro for unused_must_use lint) - rust-lang/rust#151565 (Rename, clarify, and document code for "erasing" query values) - rust-lang/rust#149482 (thread::scope: document how join interacts with TLS destructors) - rust-lang/rust#151827 (Use `Rustc` prefix for `rustc` attrs in `AttributeKind`) - rust-lang/rust#151833 (Treat unions as 'data types' in attr parsing diagnostics) - rust-lang/rust#151834 (Update `askama` version to `0.15.4`)
…uwer Rollup of 8 pull requests Successful merges: - rust-lang/rust#147387 (hir_owner_parent optimized to inlined call for non-incremental build) - rust-lang/rust#150271 (Move struct placeholder pt2) - rust-lang/rust#151283 (Suggest ignore returning value inside macro for unused_must_use lint) - rust-lang/rust#151565 (Rename, clarify, and document code for "erasing" query values) - rust-lang/rust#149482 (thread::scope: document how join interacts with TLS destructors) - rust-lang/rust#151827 (Use `Rustc` prefix for `rustc` attrs in `AttributeKind`) - rust-lang/rust#151833 (Treat unions as 'data types' in attr parsing diagnostics) - rust-lang/rust#151834 (Update `askama` version to `0.15.4`)
…uwer Rollup of 8 pull requests Successful merges: - rust-lang/rust#147387 (hir_owner_parent optimized to inlined call for non-incremental build) - rust-lang/rust#150271 (Move struct placeholder pt2) - rust-lang/rust#151283 (Suggest ignore returning value inside macro for unused_must_use lint) - rust-lang/rust#151565 (Rename, clarify, and document code for "erasing" query values) - rust-lang/rust#149482 (thread::scope: document how join interacts with TLS destructors) - rust-lang/rust#151827 (Use `Rustc` prefix for `rustc` attrs in `AttributeKind`) - rust-lang/rust#151833 (Treat unions as 'data types' in attr parsing diagnostics) - rust-lang/rust#151834 (Update `askama` version to `0.15.4`)
r? ghost