rust/tests/ui-fulldeps/rustc_encodable_hygiene.rs
2024-02-07 10:42:01 +08:00

32 lines
531 B
Rust

// check-pass
#![feature(rustc_private)]
extern crate rustc_macros;
extern crate rustc_serialize;
extern crate rustc_span;
// 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() {}