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

Ensure that Rustdoc discovers all necessary auto trait bounds #55318

Merged
merged 4 commits into from
Dec 7, 2018

Commits on Nov 28, 2018

  1. Ensure that Rusdoc discovers all necessary auto trait bounds

    Fixes rust-lang#50159
    
    This commit makes several improvements to AutoTraitFinder:
    
    * Call infcx.resolve_type_vars_if_possible before processing new
    predicates. This ensures that we eliminate inference variables wherever
    possible.
    * Process all nested obligations we get from a vtable, not just ones
    with depth=1.
      * The 'depth=1' check was a hack to work around issues processing
    certain predicates. The other changes in this commit allow us to
    properly process all predicates that we encounter, so the check is no
    longer necessary,
    * Ensure that we only display predicates *without* inference variables
    to the user, and only attempt to unify predicates that *have* an
    inference variable as their type.
    
    Additionally, the internal helper method is_of_param now operates
    directly on a type, rather than taking a Substs. This allows us to use
    the 'self_ty' method, rather than directly dealing with Substs.
    Aaron1011 committed Nov 28, 2018
    Configuration menu
    Copy the full SHA
    f57247c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1a84d21 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2018

  1. Filter out self-referential projection predicates

    If we end up with a projection predicate that equates a type with
    itself (e.g. <T as MyType>::Value == <T as MyType>::Value), we can
    run into issues if we try to add it to our ParamEnv.
    Aaron1011 committed Nov 29, 2018
    Configuration menu
    Copy the full SHA
    5045e12 View commit details
    Browse the repository at this point in the history
  2. Fix Tidy error

    Aaron1011 committed Nov 29, 2018
    Configuration menu
    Copy the full SHA
    9139374 View commit details
    Browse the repository at this point in the history