Closed
Description
auto-reduced (treereduce-rust):
struct S0<T>();
impl<T> S0<T> {
fn foo() {
fn bar<T2>() -> S0<T2> {
Self()
}
}
}
original:
code from #117246
use std::marker::PhantomData;
struct S0<T>(PhantomData<T>);
impl<T> S0<T> {
fn foo() {
fn bar<T2>() -> S0<T2> {
Self(PhantomData) // <~ this constructs S0<T> not S0<T2> :(
}
}
}
Version information
rustc 1.78.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.78.0-dev
LLVM version: 18.1.0
Command:
/home/matthias/.rustup/toolchains/local-debug-assertions/bin/rustc
Metadata
Metadata
Assignees
Labels
Category: This is a bug.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a build of rustc or tooling with debug-assertions in some way