]> git.proxmox.com Git - rustc.git/blame - tests/ui-fulldeps/rustc_encodable_hygiene.rs
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / ui-fulldeps / rustc_encodable_hygiene.rs
CommitLineData
416331ca
XL
1// run-pass
2
a7813a04 3#![feature(rustc_private)]
1a4d82fc 4
3dfed10e 5extern crate rustc_macros;
a7813a04 6#[allow(dead_code)]
f035d41b 7extern crate rustc_serialize;
a7813a04 8
9c376795
FG
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)]
12extern crate rustc_driver;
13
3dfed10e
XL
14use rustc_macros::{Decodable, Encodable};
15
16#[derive(Decodable, Encodable, Debug)]
a7813a04
XL
17struct A {
18 a: String,
19}
20
21trait Trait {
22 fn encode(&self);
223e47cc
LB
23}
24
a7813a04
XL
25impl<T> Trait for T {
26 fn encode(&self) {
27 unimplemented!()
28 }
223e47cc 29}
a7813a04
XL
30
31fn main() {}