rust/tests/ui-fulldeps/rustc_encodable_hygiene.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
529 B
Rust
Raw Normal View History

// run-pass
#![feature(rustc_private)]
2020-07-04 23:20:24 +08:00
extern crate rustc_macros;
2020-06-03 03:46:42 +08:00
extern crate rustc_serialize;
2024-01-01 23:13:39 +08:00
extern crate rustc_span;
2022-12-13 03:37:28 +08: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 23:20:24 +08:00
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() {}