Skip to content

ICE: assertion failure "infinite recursion" #53169

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

Closed
joshlf opened this issue Aug 7, 2018 · 1 comment
Closed

ICE: assertion failure "infinite recursion" #53169

joshlf opened this issue Aug 7, 2018 · 1 comment

Comments

@joshlf
Copy link
Contributor

joshlf commented Aug 7, 2018

The following program:

trait Any {}
impl<T> Any for T {}

fn into_option<T>(t: T) -> Option<impl Any> {
    into_option(t)
}

fn main() {
    let _ = into_option(0u8);
}

(playground link)

Produces the following compiler error:

thread 'main' panicked at 'assertion failed: `(left != right)`
  left: `impl Any`,
 right: `impl Any`: infinite recursion', librustc/traits/query/normalize.rs:130:25
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Details

  • rustc 1.28.0 (9634041f0 2018-07-30) running on x86_64-unknown-linux-gnu
  • compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type bin
@DutchGhost
Copy link
Contributor

Duplicate of #52701

@oli-obk oli-obk closed this as completed Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants