]> git.lizzy.rs Git - rust.git/blob - tests/ui-fulldeps/rustc_encodable_hygiene.rs
Rollup merge of #107706 - tgross35:atomic-as-mut-ptr, r=m-ou-se
[rust.git] / tests / ui-fulldeps / rustc_encodable_hygiene.rs
1 // run-pass
2
3 #![feature(rustc_private)]
4
5 extern crate rustc_macros;
6 #[allow(dead_code)]
7 extern crate rustc_serialize;
8
9 // Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
10 // files.
11 #[allow(unused_extern_crates)]
12 extern crate rustc_driver;
13
14 use rustc_macros::{Decodable, Encodable};
15
16 #[derive(Decodable, Encodable, Debug)]
17 struct A {
18     a: String,
19 }
20
21 trait Trait {
22     fn encode(&self);
23 }
24
25 impl<T> Trait for T {
26     fn encode(&self) {
27         unimplemented!()
28     }
29 }
30
31 fn main() {}