Skip to content

Check for borrow of local variable introduced within static block. #18124

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

Conversation

pnkfelix
Copy link
Member

Check for borrow of local variable introduced within static block.

(Rather than ICE on it.)

Fix #18118.

@alexcrichton
Copy link
Member

Could you add a test for this as well?

Those insertions of unreachable!() may have been a bit too eager, this kind of code should be prevented via some other portion of the compiler which requires that statics only contain other statics in blocks.

bors added a commit that referenced this pull request Oct 19, 2014
…atic, r=thestinger

Check for borrow of local variable introduced within static block.

(Rather than ICE on it.)

Fix #18118.
@bors bors closed this Oct 19, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Sep 25, 2024
… r=Veykril

fix: Handle errors and lints from external macros

Some lints should not be reported if they originate from an external macro, and quickfixes should be disabled (or they'll change library code).

Fixes rust-lang#18122.
Closes rust-lang#18124.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: unreachable code in check_static.rs is actually reachable.
4 participants