Skip to content

Dont recur on items during gather loans of block #8993

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

@pnkfelix pnkfelix commented Sep 5, 2013

Fix #7740

r? anyone, @nikomatsakis especially.

…he block.

gather_loans does not need to recurse into any items declared in the
current block.  Rather than special-case `fk_item_fn` and `fk_method`,
just make the GatherLoanVisitor's visit_item method a no-op.

This indirectly implies that the example of rust-lang#7740 is fixed:

    fn f() {
        static A: &'static char = &'A';
    }

Since we do not recurse into items, we no longer encounter `&'A'`.
bors added a commit that referenced this pull request Sep 5, 2013
…during-gather-loans-of-block, r=nikomatsakis

Fix #7740

r? anyone, @nikomatsakis especially.
@bors bors closed this Sep 5, 2013
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 when declaring static char inside a function
3 participants