-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE when declaring static char inside a function #7740
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
Labels
A-lifetimes
Area: Lifetimes / regions
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Comments
visiting for bug triage, 2013-09-02. I know some labels to add here. And I'll poke at it a bit too, see if I can dissect a little about the caller (mem_categorization.rs) and why it isn't doing whatever it usually does to deal with the static lifetime. |
By the way, here is one way to work-around this: pub fn f() {
static A_backing: char = 'A'; // <---- this is the important thing.
static A: &'static char = &A_backing;
}
fn main() {
f();
} So, next steps for the bug itself:
|
pnkfelix
added a commit
to pnkfelix/rust
that referenced
this issue
Sep 5, 2013
bors
added a commit
that referenced
this issue
Sep 5, 2013
…during-gather-loans-of-block, r=nikomatsakis Fix #7740 r? anyone, @nikomatsakis especially.
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Oct 21, 2021
…r=llogiq Refactor `clippy::match_ref_pats` to check for multiple reference patterns fixes rust-lang#7740 When there is only one pattern, to begin with, i.e. a single deref(`&`), then in such cases we suppress `clippy::match_ref_pats`. This is done by checking the count of the reference pattern and emitting `clippy::match_ref_pats` when more than one pattern is present. Removed certain errors in the `stderr` tests as they would not be triggered. changelog: Refactor `clippy::match_ref_pats` to check for multiple reference patterns
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-lifetimes
Area: Lifetimes / regions
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Minimal test case:
Also tried a couple of other types; crashes with a
u8
, doesn't crash with astr
.The text was updated successfully, but these errors were encountered: