diff options
Diffstat (limited to 'tests/ui-fulldeps/rustc_encodable_hygiene.rs')
-rw-r--r-- | tests/ui-fulldeps/rustc_encodable_hygiene.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/ui-fulldeps/rustc_encodable_hygiene.rs b/tests/ui-fulldeps/rustc_encodable_hygiene.rs new file mode 100644 index 000000000..509a6b1d2 --- /dev/null +++ b/tests/ui-fulldeps/rustc_encodable_hygiene.rs @@ -0,0 +1,31 @@ +// run-pass + +#![feature(rustc_private)] + +extern crate rustc_macros; +#[allow(dead_code)] +extern crate rustc_serialize; + +// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta +// files. +#[allow(unused_extern_crates)] +extern crate rustc_driver; + +use rustc_macros::{Decodable, Encodable}; + +#[derive(Decodable, Encodable, Debug)] +struct A { + a: String, +} + +trait Trait { + fn encode(&self); +} + +impl<T> Trait for T { + fn encode(&self) { + unimplemented!() + } +} + +fn main() {} |