Skip to content

ICE: Expected type for ... but found Lifetime(ReErased) when substituting #119064

Closed
@saethlin

Description

@saethlin

https://github.com/oxidecomputer/cancel-safe-futures on commit 857ddd3a30c5f82e6edb72ac7c8a471860501d9f

RUSTFLAGS="-Zinline-mir -Zcross-crate-inline-threshold=always -Zinline-mir-hint-threshold=10000 -Zinline-mir-threshold=10000" cargo +nightly test --target=x86_64-unknown-linux-gnu

If you don't set a --target you will OOM while optimizing syn with these very silly flags.

error: internal compiler error: compiler/rustc_middle/src/ty/generic_args.rs:885:9: expected type for `T/#0` (T/#0/0) but found Lifetime(ReErased) when substituting
error: internal compiler error: compiler/rustc_middle/src/ty/generic_args.rs:885:9: expected type for `T/#0` (T/#0/0) but found Lifetime(ReErased) when substituting

I also have another example of this that produces a "but found Const` ICE. They look similar, I'll post the other one later if someone wants.

rustc-ice-2023-12-18T05_32_24-344139.txt

Metadata

Metadata

Labels

A-mir-opt-inliningArea: MIR inliningC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions