]> git.lizzy.rs Git - rust.git/blob - src/test/ui-fulldeps/deriving-global.rs
:arrow_up: rust-analyzer
[rust.git] / src / test / ui-fulldeps / deriving-global.rs
1 // run-pass
2
3 #![feature(rustc_private)]
4
5 extern crate rustc_macros;
6 extern crate rustc_serialize;
7
8 mod submod {
9     use rustc_macros::{Decodable, Encodable};
10
11     // if any of these are implemented without global calls for any
12     // function calls, then being in a submodule will (correctly)
13     // cause errors about unrecognised module `std` (or `extra`)
14     #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
15     enum A {
16         A1(usize),
17         A2(isize),
18     }
19
20     #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
21     struct B {
22         x: usize,
23         y: isize,
24     }
25
26     #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
27     struct C(usize, isize);
28 }
29
30 pub fn main() {}