]> git.lizzy.rs Git - rust.git/commitdiff
Preventing moving out of the trait item kind
authorSunjay Varma <varma.sunjay@gmail.com>
Tue, 21 Nov 2017 07:30:39 +0000 (02:30 -0500)
committerSunjay Varma <varma.sunjay@gmail.com>
Fri, 1 Dec 2017 06:26:29 +0000 (01:26 -0500)
src/libsyntax/feature_gate.rs

index 09cbd3d591c3711f26998b60d4886ff74bdf212f..d4b54e896abca182f34465b92cdb1caf4dd285b0 100644 (file)
@@ -1617,7 +1617,7 @@ fn visit_trait_item(&mut self, ti: &'a ast::TraitItem) {
                     gate_feature_post!(&self, const_fn, ti.span, "const fn is unstable");
                 }
             }
-            ast::TraitItemKind::Type(_, default) => {
+            ast::TraitItemKind::Type(_, ref default) => {
                 // We use two if statements instead of something like match guards so that both
                 // of these errors can be emitted if both cases apply.
                 if default.is_some() {