Skip to content
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

Tweak nearest_common_ancestor(). #50649

Merged
merged 1 commit into from May 18, 2018

Commits on May 11, 2018

  1. Tweak nearest_common_ancestor().

    - Remove the "no nearest common ancestor found" case, because it's never
      hit in practise. (This means `closure_is_enclosed_by` can also be
      removed.)
    
    - Add a comment about why `SmallVec` is used for the "seen" structures.
    
    - Use `&Scope` instead of `Scope` to avoid some `map()` calls.
    
    - Use `any(p)` instead of `position(p).is_some()`.
    nnethercote committed May 11, 2018
    Configuration menu
    Copy the full SHA
    a91f6f7 View commit details
    Browse the repository at this point in the history