about summary refs log tree commit diff
path: root/compiler/rustc_ast/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_ast/src')
-rw-r--r--compiler/rustc_ast/src/ast.rs7
-rw-r--r--compiler/rustc_ast/src/ast/tests.rs11
2 files changed, 2 insertions, 16 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs
index b81f7a24270..b64f7b8ad1b 100644
--- a/compiler/rustc_ast/src/ast.rs
+++ b/compiler/rustc_ast/src/ast.rs
@@ -41,9 +41,6 @@ use std::convert::TryFrom;
 use std::fmt;
 use std::mem;
 
-#[cfg(test)]
-mod tests;
-
 /// A "Label" is an identifier of some point in sources,
 /// e.g. in the following code:
 ///
@@ -2476,8 +2473,8 @@ rustc_index::newtype_index! {
 }
 
 impl<S: Encoder> rustc_serialize::Encodable<S> for AttrId {
-    fn encode(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_unit()
+    fn encode(&self, _s: &mut S) -> Result<(), S::Error> {
+        Ok(())
     }
 }
 
diff --git a/compiler/rustc_ast/src/ast/tests.rs b/compiler/rustc_ast/src/ast/tests.rs
deleted file mode 100644
index 8ba55bf037b..00000000000
--- a/compiler/rustc_ast/src/ast/tests.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-use super::*;
-
-// Are ASTs encodable?
-#[test]
-fn check_asts_encodable() {
-    fn assert_encodable<
-        T: for<'a> rustc_serialize::Encodable<rustc_serialize::json::Encoder<'a>>,
-    >() {
-    }
-    assert_encodable::<Crate>();
-}