-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc: ICE: synthetic auto trait impls: unexpected result when selecting […] obligation
involving (nested) projections
#116539
Comments
Unexpected result when selecting
https://github.com/drahnr/rustdoc-failure-116539 contains a somewhat MCVE example @GuillaumeGomez , I'll keep trimming it at some point later this week, but it's already significantly smaller, not quite single page just yet |
It's a good start indeed. Problem is mostly proc-macro. Without proc-macro, it'd be good enough already. |
pub trait IdentifyAccount {
type AccountId;
}
pub trait Verify {
type Signer;
}
pub struct RealSigner {}
impl IdentifyAccount for RealSigner {
type AccountId = u32;
}
pub struct RealSignature {}
impl Verify for RealSignature {
type Signer = RealSigner;
}
pub type RealAccountId = <<RealSignature as Verify>::Signer as IdentifyAccount>::AccountId;
pub struct Pallet<T>(std::marker::PhantomData<T>);
pub struct BaseEvent<T: ?Sized> {
_x: std::marker::PhantomData<T>,
}
pub mod inner {
pub trait Config {
type RuntimeEvent;
type AccountId;
}
}
pub trait IsType<T>: From<T> + Into<T> {}
pub trait Config: inner::Config<AccountId = RealAccountId> {
type RuntimeEvent: From<BaseEvent<Self>> + IsType<<Self as inner::Config>::RuntimeEvent>;
}
pub struct GenesisConfig<T: Config> {
pub shelves: Vec<<T as inner::Config>::AccountId>,
} showcases the issue, repo got updated |
Thanks! I'm working on another issue at the moment but I'll try to get back to this one as soon as possible. |
If you could point me in a general direction I'd be up for taking a look into it |
It's a failing compiler query which is run in |
pub trait IdentifyAccount {
type A;
}
pub struct RealSigner {}
impl IdentifyAccount for RealSigner {
type A = u32;
}
pub type RealAccountId = <RealSigner as IdentifyAccount>::A;
pub trait BaseConfig {
type B;
}
pub trait Config: BaseConfig<B = RealAccountId> {}
pub struct GenesisConfig<T: Config> {
pub shelves: Vec<<T as BaseConfig>::B>,
} |
@rustbot label -E-needs-mcve #116539 (comment) is a MCVE for this |
Unexpected result when selecting
unexpected result when selecting […]
involving (nested) projections
unexpected result when selecting […]
involving (nested) projectionsunexpected result when selecting […] obligation
involving (nested) projections
Related
#114657
and a possible duplicate of
#114097 , #107715
with the main difference that they still reproduce with the compiler toolchain versions listed below.
Code
<very large>
Meta
rustc --version --verbose
:same as
+nightly
Error output / Backtrace
The project in question is rather large and still under wraps, so this is pending a minimal verifiable example and I am still working on cutting it down.
rustc-ice-2023-10-08T18:55:36.409984428Z-305658.txt
The text was updated successfully, but these errors were encountered: