]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/traits/object_safety.rs
review comments
[rust.git] / src / librustc / traits / object_safety.rs
index 9128851b91cf38d126d9ffce07f0ba2eab9b06c0..dec9ef4f4216f242ee4cc452b183cbb396e4f601 100644 (file)
@@ -18,7 +18,7 @@
 use rustc_session::lint::builtin::WHERE_CLAUSES_OBJECT_SAFETY;
 use rustc_span::symbol::Symbol;
 use rustc_span::{Span, DUMMY_SP};
-use smallvec::SmallVec;
+use smallvec::{smallvec, SmallVec};
 use syntax::ast;
 
 use std::borrow::Cow;
@@ -85,9 +85,9 @@ pub fn error_msg(&self) -> Cow<'static, str> {
             | ObjectSafetyViolation::Method(_, _, span)
                 if *span != DUMMY_SP =>
             {
-                vec![*span].into()
+                smallvec![*span]
             }
-            _ => vec![].into(),
+            _ => smallvec![],
         }
     }
 }