]> git.proxmox.com Git - rustc.git/blame - src/test/run-pass/variant-attributes.rs
Imported Upstream version 1.0.0~beta
[rustc.git] / src / test / run-pass / variant-attributes.rs
CommitLineData
223e47cc
LB
1// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
11// pp-exact - Make sure we actually print the attributes
c34b1796
AL
12// pretty-expanded FIXME #23616
13
85aaf69f 14#![feature(custom_attribute)]
223e47cc
LB
15
16enum crew_of_enterprise_d {
17
18 #[captain]
19 jean_luc_picard,
20
21 #[oldcommander]
22 william_t_riker,
23
24 #[chief_medical_officer]
25 beverly_crusher,
26
27 #[ships_councellor]
28 deanna_troi,
29
30 #[lieutenant_oldcommander]
31 data,
32
33 #[chief_of_security]
34 worf,
35
36 #[chief_engineer]
37 geordi_la_forge,
38}
39
1a4d82fc 40fn boldly_go(_crew_member: crew_of_enterprise_d, _where: String) { }
223e47cc 41
1a4d82fc
JJ
42pub fn main() {
43 boldly_go(crew_of_enterprise_d::worf,
44 "where no one has gone before".to_string());
45}