diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-05-06 16:37:32 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-07-16 20:01:52 -0700 |
| commit | 357d5cd96caea4fbccb989dc4bf5eed71c785c1c (patch) | |
| tree | 444078402829e231abcbef1ab2a6d30af1ac819e /src/libsyntax/visit.rs | |
| parent | 459ffc2adc74f5e8b64a76f5670edb419b9f65da (diff) | |
| download | rust-357d5cd96caea4fbccb989dc4bf5eed71c785c1c.tar.gz rust-357d5cd96caea4fbccb989dc4bf5eed71c785c1c.zip | |
librustc: Implement the fully-expanded, UFCS form of explicit self.
This makes two changes to region inference: (1) it allows region inference to relate early-bound regions; and (2) it allows regions to be related before variance runs. The former is needed because there is no relation between the two regions before region substitution happens, while the latter is needed because type collection has to run before variance. We assume that, before variance is inferred, that lifetimes are invariant. This is a conservative overapproximation. This relates to #13885. This does not remove `~self` from the language yet, however. [breaking-change]
Diffstat (limited to 'src/libsyntax/visit.rs')
| -rw-r--r-- | src/libsyntax/visit.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs index 795f19d0cfb..6760d7a3932 100644 --- a/src/libsyntax/visit.rs +++ b/src/libsyntax/visit.rs @@ -215,6 +215,7 @@ pub fn walk_explicit_self<E: Clone, V: Visitor<E>>(visitor: &mut V, SelfRegion(ref lifetime, _, _) => { visitor.visit_opt_lifetime_ref(explicit_self.span, lifetime, env) } + SelfExplicit(ref typ, _) => visitor.visit_ty(*typ, env.clone()), } } |
