about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-24 22:42:00 +0000
committerbors <bors@rust-lang.org>2018-08-24 22:42:00 +0000
commitd95f078f0af28203c379365574a433ca5b79e9d8 (patch)
treeedc38cee7233726cedd15b68fc01cf8874116d36 /src/libsyntax
parentd41f21f11a249ad78990eb9a1ec899ec123c7136 (diff)
parented73a3267a648cffb92f60e50aa75a6547d9955d (diff)
downloadrust-d95f078f0af28203c379365574a433ca5b79e9d8.tar.gz
rust-d95f078f0af28203c379365574a433ca5b79e9d8.zip
Auto merge of #53225 - nikomatsakis:nll-type-annot, r=pnkfelix
MIR: support user-given type annotations on fns, structs, and enums

This branch adds tooling to track user-given type annotations on functions, structs, and enum variant expressions. The user-given types are passed onto NLL which then enforces them.

cc #47184 — not a complete fix, as there are more cases to cover

r? @eddyb
cc @rust-lang/wg-compiler-nll
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 4ed96d26906..e2a22167b7e 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -865,6 +865,12 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
                                         is just used for rustc unit tests \
                                         and will never be stable",
                                        cfg_fn!(rustc_attrs))),
+    ("rustc_dump_user_substs", Whitelisted, Gated(Stability::Unstable,
+                                       "rustc_attrs",
+                                       "this attribute \
+                                        is just used for rustc unit tests \
+                                        and will never be stable",
+                                       cfg_fn!(rustc_attrs))),
     ("rustc_if_this_changed", Whitelisted, Gated(Stability::Unstable,
                                                  "rustc_attrs",
                                                  "the `#[rustc_if_this_changed]` attribute \