Skip to content

ICE: parameter should have been resolved #130399

Closed
@matthiaskrgr

Description

@matthiaskrgr

auto-reduced (treereduce-rust):

fn elided(main: &()) -> impl Sized + use<main> {}

fn main() {}

original:

//@ check-pass

fn elided(main: &()) -> impl Sized + use<main> {}

fn main() {}

Version information

rustc 1.83.0-nightly (4f1be9215 2024-09-14)
binary: rustc
commit-hash: 4f1be92153167dfc2a54215bfd49f398c04ce647
commit-date: 2024-09-14
host: x86_64-unknown-linux-gnu
release: 1.83.0-nightly
LLVM version: 19.1.0

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc

Program output

warning: unused variable: `main`
 --> /tmp/icemaker_global_tempdir.yOpXonbmxTMn/rustc_testrunner_tmpdir_reporting.NOqyVnnrG3mw/mvce.rs:1:11
  |
1 | fn elided(main: &()) -> impl Sized + use<main> {}
  |           ^^^^ help: if this is intentional, prefix it with an underscore: `_main`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: function `elided` is never used
 --> /tmp/icemaker_global_tempdir.yOpXonbmxTMn/rustc_testrunner_tmpdir_reporting.NOqyVnnrG3mw/mvce.rs:1:4
  |
1 | fn elided(main: &()) -> impl Sized + use<main> {}
  |    ^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 2 warnings emitted

note: no errors encountered even though delayed bugs were created

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: parameter should have been resolved
 --> /tmp/icemaker_global_tempdir.yOpXonbmxTMn/rustc_testrunner_tmpdir_reporting.NOqyVnnrG3mw/mvce.rs:1:42
  |
1 | fn elided(main: &()) -> impl Sized + use<main> {}
  |                                          ^^^^
  |
note: delayed at compiler/rustc_hir_analysis/src/check/check.rs:549:27 - disabled backtrace
 --> /tmp/icemaker_global_tempdir.yOpXonbmxTMn/rustc_testrunner_tmpdir_reporting.NOqyVnnrG3mw/mvce.rs:1:42
  |
1 | fn elided(main: &()) -> impl Sized + use<main> {}
  |                                          ^^^^

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.83.0-nightly (4f1be9215 2024-09-14) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack

Metadata

Metadata

Labels

C-bugCategory: This is a bug.F-precise_capturing`#![feature(precise_capturing)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.T-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