Skip to content

nightly-2024-04-05 regression: error[E0275]: overflow evaluating the requirement #123573

Description

@stepancheg

Code

Sorry, I don't have simple code to reproduce the issue, because the project is large.

The repro is this:

$ git clone https://github.com/facebook/starlark-rust

$ git co 96a2bf3d164d99cccc6cf330433d770e7d01b15a  # Latest revision

$ cargo +nightly-2024-04-05-aarch64-apple-darwin test -p starlark --lib --no-run

This works (warnings are unrelated)

$ cargo +nightly-2024-04-06-aarch64-apple-darwin test -p starlark --lib --no-run

...

error[E0275]: overflow evaluating the requirement `&_: StarlarkTypeRepr`
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`starlark`)
note: required for `&[_]` to implement `StarlarkTypeRepr`
   --> starlark/src/values/types/list/value.rs:251:17
    |
251 | impl<'a, V: 'a> StarlarkTypeRepr for &'a [V]
    |                 ^^^^^^^^^^^^^^^^     ^^^^^^^
252 | where
253 |     &'a V: StarlarkTypeRepr,
    |            ---------------- unsatisfied trait bound introduced here
    = note: 126 redundant requirements hidden
    = note: required for `&[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]` to implement `StarlarkTypeRepr`
    = note: the full name for the type has been written to '/Users/nga/devel/starlark-rust/target/debug/deps/starlark-e78de373a7652cbb.long-type-11371795697589288004.txt'

Contents of the mentioned file is:

&[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]

I tried increasing #![recursion_limit = "256"], did not help.

Version it worked on

$ cargo +nightly-2024-04-05-aarch64-apple-darwin --version
cargo 1.79.0-nightly (0637083df 2024-04-02)
$ rustc +nightly-2024-04-05-aarch64-apple-darwin --version
rustc 1.79.0-nightly (385fa9d84 2024-04-04)

Also works on stable.

Version with regression

$ cargo +nightly-2024-04-06-aarch64-apple-darwin --version
cargo 1.79.0-nightly (0637083df 2024-04-02)
$ rustc +nightly-2024-04-06-aarch64-apple-darwin --version
rustc 1.79.0-nightly (9d79cd5f7 2024-04-05)

This may be duplicate of #123493 because timing.

Activity

  1. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Apr 6, 2024
  2. changed the title [-]nightly-2024-04-05: error[E0275]: overflow evaluating the requirement[/-] [+]nightly-2024-04-05 regression: error[E0275]: overflow evaluating the requirement[/+] on Apr 6, 2024
  3. SergioBenitez commented on Apr 7, 2024

    @SergioBenitez
    Contributor

    This is also affecting diesel:

    error[E0275]: overflow evaluating the requirement `(&_, &_, &_, ..., ..., ...): diesel::Insertable<...>`
      |
      = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`rust_out`)
      = note: required for `&(_, _, _, _, _, _)` to implement `diesel::Insertable<table>`
      = note: 127 redundant requirements hidden
      = note: required for `(&((..., ..., ..., ..., ..., ...), ..., ..., ..., ..., ...), ..., ..., ..., ..., ...)` to implement `diesel::Insertable<table>`
      = note: the full name for the type has been written to '/tmp/rustdoctestmnF1pz/rust_out.long-type-2635572469679000095.txt'
      = note: consider using `--verbose` to print the full type name to the console
    
    error: aborting due to 1 previous error; 1 warning emitted
    
    For more information about this error, try `rustc --explain E0275`.
    Couldn't compile the test.
    
    failures:
        contrib/db_pools/lib/src/diesel.rs - diesel (line 26)
  4. dtolnay commented on Apr 7, 2024

    @dtolnay
    Member

    Using the starlark-rust repro, this bisects to #122747. @Urgau @lcnr

  5. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    and removed
    regression-untriagedUntriaged performance or correctness regression.
    on Apr 7, 2024
  6. lcnr commented on Apr 7, 2024

    @lcnr
    Contributor

    overflow is fatal in the old trait solver, so by proving additional goals, especially if they have inference variables, we can end up with new sources of overflow causing an error.

    the most straightforward fix is to use the new solver for this lint 😁 given that the lint uses an empty environment it uses pretty much the same parts of the solver as coherence so it should already be ready for that

  7. added a commit that references this issue on Apr 8, 2024
  8. apiraino commented on Apr 8, 2024

    @apiraino
    Contributor

    WG-prioritization assigning priority (Zulip discussion).

    @rustbot label -I-prioritize +P-high

  9. added
    P-highHigh priority
    and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Apr 8, 2024
  10. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Apr 8, 2024
  11. rcorre commented on Apr 9, 2024

    @rcorre
    Contributor

    I have a somewhat minimal repro, it has a lot of deps (via bevy) but not much code:
    example.zip

    use bevy::{gltf::GltfMesh, prelude::*};
    
    fn main() {
        App::new().add_plugins(DefaultPlugins).run();
    }
    
    fn parse(gltf_meshes: Res<Assets<GltfMesh>>) {
        for (transform, aabb) in &gltf_meshes {}
    }
    

    Where gltf_meshes is not something (I think) that can be decomposed into a tuple.

  12. added a commit that references this issue on Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions