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

cargo clean -p Suggestion after ICE uses incorrect name #116725

Open
AldaronLau opened this issue Oct 13, 2023 · 2 comments
Open

cargo clean -p Suggestion after ICE uses incorrect name #116725

AldaronLau opened this issue Oct 13, 2023 · 2 comments
Labels
C-bug Category: This is a bug. S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work.

Comments

@AldaronLau
Copy link
Contributor

Summary

When clippy gets and ICE in a package with a - in the name, it suggests fixing but with an _.

I'm not sure if this happens on the current stable release or not since I don't know how to reliably trigger an ICE, but am willing to test if I could.

Reproducer

I tried this code:

[package]                                                                                            
name = "package-name"

I expected to see this happen:

error: internal compiler error: encountered incremental compilation error with mir_built(70094b76db2b4923-9e5dabcfe18f14d7)
  |
  = help: This is a known issue with the compiler. Run `cargo clean -p package-name` or `cargo clean` to allow your project to compile
  = note: Please follow the instructions below to create a bug report with the provided information
  = note: See <https://github.com/rust-lang/rust/issues/84970> for more information

Instead, this happened:

error: internal compiler error: encountered incremental compilation error with mir_built(70094b76db2b4923-9e5dabcfe18f14d7)
  |
  = help: This is a known issue with the compiler. Run `cargo clean -p package_name` or `cargo clean` to allow your project to compile
  = note: Please follow the instructions below to create a bug report with the provided information
  = note: See <https://github.com/rust-lang/rust/issues/84970> for more information

And then, of course:

$ cargo clean -p package_name
error: package ID specification `package_name` did not match any packages

	Did you mean `package-name`?

Version

rustc 1.70.0 (90c541806 2023-05-31)
binary: rustc
commit-hash: 90c541806f23a127002de5b4038be731ba1458ca
commit-date: 2023-05-31
host: x86_64-unknown-linux-gnu
release: 1.70.0
LLVM version: 16.0.2

Additional Labels

No response

@AldaronLau AldaronLau added the C-bug Category: This is a bug. label Oct 13, 2023
@AldaronLau AldaronLau changed the title cargo clean -p Suggestion after ICE uses incorrect name cargo clean -p Suggestion after ICE uses incorrect name Oct 13, 2023
@Alexendoo
Copy link
Member

Transferring to the rust repo as that's where the message originates

@Alexendoo Alexendoo transferred this issue from rust-lang/rust-clippy Oct 14, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 14, 2023
@ehuss
Copy link
Contributor

ehuss commented Oct 14, 2023

This requires rust-lang/compiler-team#635 to fix.

@saethlin saethlin added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 28, 2023
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. S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work.
Projects
None yet
Development

No branches or pull requests

5 participants