-
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
Type annotations needed error on definition site #84398
Comments
Bisected: searched nightlies: from nightly-2021-01-01 to nightly-2021-04-20 bisected with cargo-bisect-rustc v0.6.0Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --test-dir=. --start=2021-01-01 |
An MCVE would be extremely helpful here. |
@rustbot ping icebreakers-cleanup-crew I've tried without success to reduce this, it's buried in layers of crates. Maybe one of you will have better luck. |
Hey Cleanup Crew ICE-breakers! This bug has been identified as a good cc @AminArria @camelid @chrissimpkins @contrun @DutchGhost @elshize @h-michael @HallerPatrick @hdhoang @hellow554 @henryboisdequin @imtsuki @JamesPatrickGill @kanru @KarlK90 @LeSeulArtichaut @MAdrianMattocks @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @shekohex @sinato @smmalis37 @steffahn @Stupremee @tamuhey @turboladen @woshilapin @yerke |
Reduced: pub trait Deserialize<'de>: Sized {}
pub trait DeserializeOwned: for<'de> Deserialize<'de> {}
pub trait Extensible {
type Config;
}
pub trait Installer<C> {
fn init<B: Extensible<Config = C>>(&mut self) -> ()
where
B::Config: DeserializeOwned,
{
}
} |
Assigning priority as discussed as part of the Prioritization Working Group and removing @rustbot label -I-prioritize +P-high |
I can try to look into this over the weekend. |
So, a bit of info: We end up trying to prove
and
that both evaluate to okay. This is ambiguous and WF checking fails. |
This regression now slipped into beta 1.53.0. |
Hello
After upgrading nightly rustc, I'm getting a lot of type inference errors on code that was compiling fine previously. Moreover, these are not at the call site, but at the definition site, so there doesn't seem to be any place to put any type annotations, like this:
It spills more kinds of errors that make little sense, but I have the impression these will have a common cause:
The problematic code is both released on crates.io (crate spirit, version 0.4.16, but I expect that to be happening through most of the history of the crate), and in master (vorner/spirit@1495c1c).
I think this is a regression, as it was compiling previously.
It compiles fine with older nightly (and stable is fine way back, this particular code is looking mostly the same for some 2 years or more):
Breaks with
(Unfortunately, I haven't been keeping fully up to date recently, so I don't have a smaller range).
The text was updated successfully, but these errors were encountered: