rust/tests/ui-fulldeps/deriving-hygiene.rs

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

27 lines
606 B
Rust
Raw Normal View History

//@ run-pass
#![allow(non_upper_case_globals)]
2018-04-19 20:11:43 +00:00
#![feature(rustc_private)]
2020-07-04 15:20:24 +00:00
extern crate rustc_macros;
2020-06-02 19:46:42 +00:00
extern crate rustc_serialize;
2024-01-01 15:13:39 +00:00
extern crate rustc_span;
2018-04-19 20:11:43 +00:00
2020-07-04 15:20:24 +00:00
use rustc_macros::{Decodable, Encodable};
2022-12-12 19:37:28 +00: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;
2018-04-19 20:11:43 +00:00
pub const other: u8 = 1;
pub const f: u8 = 1;
pub const d: u8 = 1;
pub const s: u8 = 1;
pub const state: u8 = 1;
pub const cmp: u8 = 1;
2020-07-04 15:20:24 +00:00
#[derive(Ord, Eq, PartialOrd, PartialEq, Debug, Decodable, Encodable, Hash)]
2018-04-19 20:11:43 +00:00
struct Foo {}
2020-07-04 15:20:24 +00:00
fn main() {}