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

Introduce VecPerParamSpace and use it to represent sets of types and parameters #14872

Conversation

nikomatsakis
Copy link
Contributor

This involves numerous substeps:

  1. Treat Self same as any other parameter.
  2. No longer compute offsets for method parameters.
  3. Store all generic types (both trait/impl and method) with a method,
    eliminating odd discrepancies.
  4. Stop doing unspeakable things to static methods and instead just use
    the natural types, now that we can easily add the type parameters from
    trait into the method's polytype.
  5. No doubt some more. It was hard to separate these into distinct commits.

Fixes #13564

@nikomatsakis
Copy link
Contributor Author

This was already reviewed by @pnkfelix but prevented from landing due to the windows debug build issue.

parameters

This involves numerous substeps:

1. Treat Self same as any other parameter.
2. No longer compute offsets for method parameters.
3. Store all generic types (both trait/impl and method) with a method,
   eliminating odd discrepancies.
4. Stop doing unspeakable things to static methods and instead just use
   the natural types, now that we can easily add the type parameters from
   trait into the method's polytype.
5. No doubt some more. It was hard to separate these into distinct commits.

Fixes rust-lang#13564
@nikomatsakis
Copy link
Contributor Author

@pcwalton I was just waiting on travis, but thanks.

@nikomatsakis
Copy link
Contributor Author

closing in favor of #14604

@nikomatsakis nikomatsakis deleted the issue-5527-namespace-substs-d branch March 30, 2016 16:15
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
…lbasi

fix: introduce new type var when expectation for ref pat is not ref

Fixes rust-lang#14840

When we infer the type of ref patterns, its expected type may not be reference type: 1) expected type is an unresolved inference variable, or 2) expected type is erroneously other kind of type. In either case, we should produce a reference type with a new type variable rather than an error type so that we can continue inferring the inner patterns without further errors because of the (possible) type mismatch of this pattern.
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.

Consider implementing "two-dimensional" index for ty::substs
3 participants