Repository navigation
[ICE]: mir inlining: Failed to normalize Alias(No .. #164123
Copy link
Copy link
Open
Labels
-Zvalidate-mirUnstable option: MIR validationUnstable option: MIR validationA-mir-optArea: MIR optimizationsArea: MIR optimizationsA-mir-opt-inliningArea: MIR inliningArea: MIR inliningC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingrequires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some wayThis issue requires a build of rustc or tooling with debug-assertions in some way
Description
Code
rustc code.rs -Zvalidate-mir "-Zmir-enable-passes=+Inline"
trait ParseError {
type StreamError;
}
impl<T> ParseError for T {
type StreamError = ();
}
trait Stream {
type Error;
}
trait Parser
where
<Self as Parser>::PartialState: Default,
{
type PartialState;
fn parse_mode(&Self, Self::PartialState) {}
}
struct AndThen<A, B>(core::marker::PhantomData<(A, B)>);
impl<A, B> Parser for AndThen<A, B>
where
A: Stream,
B: Into<<A::Error as ParseError>::StreamError>,
{
type PartialState = ();
}
fn expr<A>() -> impl Parser
where
A: Stream,
{
AndThen::<A, ()>(core::marker::PhantomData)
}
fn parse_mode_impl<A>()
where
<A as Stream>::Error: ParseError,
A: Stream,
{
Parser::parse_mode(&expr::<A>(), Default::default())
}
fn main() {}Meta
rustc --version --verbose:
rustc 1.101.0-nightly (6e4cba338 2026-10-10)
binary: rustc
commit-hash: 6e4cba3380a6f9e1e4d7672e11e40372bf04e873
commit-date: 2026-10-10
host: x86_64-unknown-linux-gnu
release: 1.101.0-nightly
LLVM version: 23.1.3
Error output
warning: anonymous parameters are deprecated and will be removed in the next edition
--> code.rs:15:19
|
15 | fn parse_mode(&Self, Self::PartialState) {}
| ^^^^^ help: try naming the parameter or explicitly ignoring it: `_: &Self`
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/trait-fn-parameters.html>
= note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default
warning: anonymous parameters are deprecated and will be removed in the next edition
--> code.rs:15:26
|
15 | fn parse_mode(&Self, Self::PartialState) {}
| ^^^^^^^^^^^^^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: Self::PartialState`
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/trait-fn-parameters.html>
warning: trait `ParseError` is never used
--> code.rs:1:7
|
1 | trait ParseError {
| ^^^^^^^^^^
|
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
warning: trait `Stream` is never used
--> code.rs:7:7
|
7 | trait Stream {
| ^^^^^^
warning: trait `Parser` is never used
--> code.rs:10:7
|
10 | trait Parser
| ^^^^^^
warning: struct `AndThen` is never constructed
--> code.rs:17:8
|
17 | struct AndThen<A, B>(core::marker::PhantomData<(A, B)>);
| ^^^^^^^
warning: function `expr` is never used
--> code.rs:25:4
|
25 | fn expr<A>() -> impl Parser
| ^^^^
warning: function `parse_mode_impl` is never used
--> code.rs:31:4
|
31 | fn parse_mode_impl<A>()
| ^^^^^^^^^^^^^^^
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
-Zvalidate-mirUnstable option: MIR validationUnstable option: MIR validationA-mir-optArea: MIR optimizationsArea: MIR optimizationsA-mir-opt-inliningArea: MIR inliningArea: MIR inliningC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingrequires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some wayThis issue requires a build of rustc or tooling with debug-assertions in some way
Activity
matthiaskrgr commentedon Oct 10, 2026
Backtrace
matthiaskrgr commentedon Oct 10, 2026
this started triggering recently, probaly since #164052