Skip to content
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

"overflow evaluating the requirement" regression in nightly-2020-12-27 #80807

Open
is8ac opened this issue Jan 8, 2021 · 6 comments
Open

"overflow evaluating the requirement" regression in nightly-2020-12-27 #80807

is8ac opened this issue Jan 8, 2021 · 6 comments
Labels
A-trait-system Area: Trait system P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@is8ac
Copy link

is8ac commented Jan 8, 2021

Code

trait Foo {}

trait Bar {
    type Corge;
}

struct Fuga<T> {
    _a: T,
}

struct Piyo<T> {
    _b: T,
}

impl<T> Foo for Piyo<T> {}

impl<T> Bar for Fuga<T>
where
    T: Bar,
    Self::Corge: Foo,
{
    type Corge = Piyo<T>;
}

fn main() {}

Error

On current nightly or stable 1.49.0, rustc errors with:

error[E0275]: overflow evaluating the requirement `<Fuga<T> as Bar>::Corge == _`
  --> src/bin/demo.rs:17:1
   |
17 | / impl<T> Bar for Fuga<T>
18 | | where
19 | |     T: Bar,
20 | |     Self::Corge: Foo,
21 | | {
22 | |     type Corge = Piyo<T>;
23 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `Bar` for `Fuga<T>`

error[E0275]: overflow evaluating the requirement `<Fuga<T> as Bar>::Corge == _`
  --> src/bin/demo.rs:22:5
   |
22 |     type Corge = Piyo<T>;
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: required because of the requirements on the impl of `Bar` for `Fuga<T>`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0275`.

but on nightly-2020-12-20 it compiles without issue.

bisect-rustc gives:

searched nightlies: from nightly-2020-12-22 to nightly-2021-01-06
regressed nightly: nightly-2020-12-27
searched commits: from bb17823 to 0b644e4
regressed commit: 931aa27

bisected with cargo-bisect-rustc v0.6.0

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc 
@camelid
Copy link
Member

camelid commented Jan 8, 2021

cc @matthewjasper (bisection points to #80246)

@camelid
Copy link
Member

camelid commented Jan 8, 2021

Just to be clear: it seems this was fixed and then regressed again in nightly-2020-12-27?

@camelid camelid added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Jan 8, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jan 8, 2021
@camelid camelid added A-trait-system Area: Trait system T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 8, 2021
@matthewjasper
Copy link
Contributor

Not a regression, this has never compiled on stable.

@matthewjasper matthewjasper removed the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Jan 8, 2021
@camelid
Copy link
Member

camelid commented Jan 8, 2021

I think the author's saying that it compiled on a recent nightly though?

@matthewjasper
Copy link
Contributor

Yes, I mean that none of the regression lables apply

@apiraino apiraino added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Jan 13, 2021
@apiraino
Copy link
Contributor

Assigning P-medium as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trait-system Area: Trait system P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants