Skip to content
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

ICE: parameter should have been resolved #130399

Closed
matthiaskrgr opened this issue Sep 15, 2024 · 1 comment · Fixed by #130414
Closed

ICE: parameter should have been resolved #130399

matthiaskrgr opened this issue Sep 15, 2024 · 1 comment · Fixed by #130414
Assignees
Labels
C-bug Category: This is a bug. F-precise_capturing `#![feature(precise_capturing)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

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

@matthiaskrgr matthiaskrgr added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Sep 15, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 15, 2024
@matthiaskrgr
Copy link
Member Author

#127672 cc @compiler-errors 🤔

@matthiaskrgr matthiaskrgr added the F-precise_capturing `#![feature(precise_capturing)]` label Sep 15, 2024
@compiler-errors compiler-errors self-assigned this Sep 15, 2024
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Sep 16, 2024
@bors bors closed this as completed in 3a22be3 Sep 16, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. F-precise_capturing `#![feature(precise_capturing)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants