summaryrefslogtreecommitdiffstats
path: root/tests/ui-fulldeps/rustc_encodable_hygiene.rs
blob: 509a6b1d22ca61769fc0cc714e64b20cd3014db5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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() {}