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

on-demand-ify custom_coerce_unsized_kind and inherent-impls #40683

Merged
merged 3 commits into from
Mar 29, 2017

Commits on Mar 23, 2017

  1. convert custom_coerce_unsized_kind into a coerce_unsized_info

    This "on-demand" task both checks for errors and computes the custom
    unsized kind, if any. This task is only defined on impls of
    `CoerceUnsized`; invoking it on any other kind of impl results in a bug.
    This is just to avoid having an `Option`, could easily be changed.
    nikomatsakis committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    1a87fc2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8e6b10a View commit details
    Browse the repository at this point in the history
  3. convert inherent-impl-related things to on-demand queries

    There are now 3 queries:
    
    - inherent_impls(def-id): for a given type, get a `Rc<Vec<DefId>>` with
      all its inherent impls. This internally uses `crate_inherent_impls`,
      doing some hacks to keep the current deps (which, btw, are not clearly
      correct).
    - crate_inherent_impls(crate): gathers up a map from types
      to `Rc<Vec<DefId>>`, touching the entire krate, possibly generating
      errors.
    - crate_inherent_impls_overlap_check(crate): performs overlap checks
      between the inherent impls for a given type, generating errors.
    nikomatsakis committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    a29ae30 View commit details
    Browse the repository at this point in the history