]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/front/feature_gate.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / librustc / front / feature_gate.rs
index 4412093c6eb0563b9866cf0040ee92e833581861..3ab39dd121f082aca119f359f69293b8863e4b42 100644 (file)
@@ -260,8 +260,7 @@ fn visit_foreign_item(&mut self, i: &ast::ForeignItem, _: ()) {
 
     fn visit_ty(&mut self, t: &ast::Ty, _: ()) {
         match t.node {
-            ast::TyClosure(closure) if closure.onceness == ast::Once &&
-                    closure.sigil != ast::OwnedSigil => {
+            ast::TyClosure(closure, _) if closure.onceness == ast::Once => {
                 self.gate_feature("once_fns", t.span,
                                   "once functions are \
                                    experimental and likely to be removed");
@@ -340,7 +339,7 @@ pub fn check_crate(sess: &Session, krate: &ast::Crate) {
                             sess.add_lint(lint::UnknownFeatures,
                                           ast::CRATE_NODE_ID,
                                           mi.span,
-                                          ~"unknown feature");
+                                          "unknown feature".to_owned());
                         }
                     }
                 }