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

proper subtyping/LUB/GLB for region fn types #2263

Closed
nikomatsakis opened this issue Apr 20, 2012 · 7 comments
Closed

proper subtyping/LUB/GLB for region fn types #2263

nikomatsakis opened this issue Apr 20, 2012 · 7 comments
Labels
A-lifetimes Area: lifetime related

Comments

@nikomatsakis
Copy link
Contributor

It occurs to me that our universal quantification step rather expects to know the type which is being universally quantified. But, in some cases, there may be variables present in this type. I am specifically concerned about inference of the parameter types for fn expressions. It's possible that we do something wrong there, though I can't say specifically what, so this issue is kind of a mental note to come back to this and think about it.

@ghost ghost assigned nikomatsakis Apr 20, 2012
@nikomatsakis
Copy link
Contributor Author

In fact the inference is wrong. We need to adjust our handling of functions and we need to correctly implement the algorithm for handling this sort of thing---

  • replace bound regions in the subtype with fresh region variables;
  • replace bound regions in the supertype with "skolemized" variants;
  • perform unification;
  • scan the resulting bindings to make sure that the skolemized variants do not leak out

@nikomatsakis
Copy link
Contributor Author

One important point: how do we handle GLB/LUB computations?

@ghost ghost assigned lkuper May 17, 2012
@lkuper
Copy link
Contributor

lkuper commented May 17, 2012

@nikomatsakis suggested this as a starter project, so I'm assigning to myself...

lkuper added a commit that referenced this issue May 21, 2012
@lkuper
Copy link
Contributor

lkuper commented May 22, 2012

Some notes on what I'm doing for this: https://github.com/mozilla/rust/wiki/Bikeshed-function-subtyping-wrt-regions

lkuper added a commit to lkuper/rust that referenced this issue May 24, 2012
nikomatsakis added a commit that referenced this issue May 30, 2012
also: remove "auto-mode-matching" for implemented interfaces, as it
is complex and interacts poorly with classes

cc #2263
lkuper added a commit that referenced this issue Jun 1, 2012
@nikomatsakis
Copy link
Contributor Author

#2981 will help with this.

@nikomatsakis
Copy link
Contributor Author

This is becoming more problematic as demoding proceeds. I have flagged some of the awkward spots in the code that would benefit from having this bug fixed with FIXMEs.

nikomatsakis added a commit to nikomatsakis/rust that referenced this issue Nov 6, 2012
Fixes rust-lang#1896 which was never truly fixed, just masked.
The given tests would have failed had they used `~fn()` and
not `@fn()`.  They now result in compilation errors.

Fixes rust-lang#2978.

Necessary first step for rust-lang#2202, rust-lang#2263.
nikomatsakis added a commit that referenced this issue Nov 6, 2012
Fixes #1896 which was never truly fixed, just masked.
The given tests would have failed had they used `~fn()` and
not `@fn()`.  They now result in compilation errors.

Fixes #2978.

Necessary first step for #2202, #2263.
nikomatsakis added a commit to nikomatsakis/rust that referenced this issue Dec 12, 2012
nikomatsakis added a commit that referenced this issue Jan 8, 2013
@nikomatsakis
Copy link
Contributor Author

This situation is not perfect but I am going to close the issue for now. It's working well enough for the time being.

bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
Update measureme to the latest version

The major version number is different due to changes to the on-disk recording format but the core API is the same and miri continues to build on the latest version.
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lifetimes Area: lifetime related
Projects
None yet
Development

No branches or pull requests

2 participants