Skip to content

Specifying static-nobundle on command line causes an internal compiler error #57323

Closed
@petrochenkov

Description

@petrochenkov

Reproduction:

rustc -l static-nobundle=nonexistent main.rs

---

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src\libcore\option.rs:345:21
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

error: internal compiler error: unexpected panic

This happens because code in

assumes that the span always exists, which is not true for things passed from command line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions