Open drahnr opened 1 year ago
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 clean::auto_trait::AutoTraitFinder
. Maybe start checking there?
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
https://github.com/rust-lang/rust/issues/116539#issuecomment-1756309287 is a MCVE for this
Related
https://github.com/rust-lang/rust/issues/114657
and a possible duplicate of
https://github.com/rust-lang/rust/issues/114097 , https://github.com/rust-lang/rust/issues/107715
with the main difference that they still reproduce with the compiler toolchain versions listed below.
Code
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