-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
panic about linkage external and static variables _rust_extern_with_linkage_* #144940
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Metadata
Metadata
Assignees
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
This is simplified from https://github.com/rust-lang/rust/blob/master/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs
It's normal to report errors
error: symbol `collision` is already definedif_rust_extern_with_linkage_collisionbefore the main.However once I moved
_rust_extern_with_linkage_collisionafter the main function, I got a panic.Playground
Meta
rustc --version --verbose:Error output
Backtrace