about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-04-12 23:07:07 +0000
committerbors <bors@rust-lang.org>2018-04-12 23:07:07 +0000
commitc4a03283cd17c86c9bcdc3fdc76d924ab5eaff2a (patch)
tree23c1bb1f332df4d34679d76fedacd15541c5556d /src/libsyntax
parent6c537493d01694cc6e0a614dff12c475055aa2b4 (diff)
parent6a229cbfac2c6ae8e1db4f8ae6320cac731a2c2a (diff)
downloadrust-c4a03283cd17c86c9bcdc3fdc76d924ab5eaff2a.tar.gz
rust-c4a03283cd17c86c9bcdc3fdc76d924ab5eaff2a.zip
Auto merge of #45298 - toidiu:ak-44493-infer-predicate, r=nikomatsakis
Ak 44493 infer predicate

 **WIP**  Implements #44493

Things to do:

- [x] add feature gate and appropriate tests (see [forge](https://forge.rust-lang.org/feature-guide.html) for some details)
- [x] add a unit testing system similar to `#[rustc_variance]`
  - [x] to see how, maybe `rg rustc_variance` and take some notes
- [ ] add more tests:
- [x] we need to decide how to handle `struct Foo<'a, T> { x: &'a T::Item }`
- [x] handle explicit predicates on types
- [ ] handle explicit predicates on `dyn Trait` (this could be put off to a follow-up PR)
- [ ] handle explicit predicates on projections (this could be put off to a follow-up PR)
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index df39757d1eb..73ebfc20876 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -426,6 +426,9 @@ declare_features! (
     // Use `?` as the Kleene "at most one" operator
     (active, macro_at_most_once_rep, "1.25.0", Some(48075), None),
 
+    // Infer outlives requirements; RFC 2093
+    (active, infer_outlives_requirements, "1.26.0", Some(44493), None),
+
     // Multiple patterns with `|` in `if let` and `while let`
     (active, if_while_or_patterns, "1.26.0", Some(48215), None),
 
@@ -1023,6 +1026,12 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
                                  "never will be stable",
                                  cfg_fn!(rustc_attrs))),
 
+    // RFC #2093
+    ("infer_outlives_requirements", Normal, Gated(Stability::Unstable,
+                                   "infer_outlives_requirements",
+                                   "infer outlives requirements is an experimental feature",
+                                   cfg_fn!(infer_outlives_requirements))),
+
     ("wasm_custom_section", Whitelisted, Gated(Stability::Unstable,
                                  "wasm_custom_section",
                                  "attribute is currently unstable",