2019-07-26 16:54:25 -05:00
|
|
|
// run-pass
|
|
|
|
|
2016-04-12 08:41:46 -05:00
|
|
|
#![feature(rustc_private)]
|
|
|
|
|
2020-07-04 10:20:24 -05:00
|
|
|
extern crate rustc_macros;
|
2016-04-12 08:41:46 -05:00
|
|
|
#[allow(dead_code)]
|
2020-06-02 14:46:42 -05:00
|
|
|
extern crate rustc_serialize;
|
2016-04-12 08:41:46 -05:00
|
|
|
|
2022-12-12 13:37:28 -06:00
|
|
|
// 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;
|
|
|
|
|
2020-07-04 10:20:24 -05:00
|
|
|
use rustc_macros::{Decodable, Encodable};
|
|
|
|
|
|
|
|
#[derive(Decodable, Encodable, Debug)]
|
2016-04-12 08:41:46 -05:00
|
|
|
struct A {
|
|
|
|
a: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
trait Trait {
|
|
|
|
fn encode(&self);
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> Trait for T {
|
|
|
|
fn encode(&self) {
|
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|