]> git.proxmox.com Git - rustc.git/blame - src/test/auxiliary/attr_plugin_test.rs
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / test / auxiliary / attr_plugin_test.rs
CommitLineData
1a4d82fc
JJ
1// Copyright 2014 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
62682a34 11// force-host
c34b1796 12
62682a34
SL
13#![feature(plugin_registrar)]
14#![feature(rustc_private)]
c34b1796 15
62682a34 16extern crate syntax;
970d7e83 17
62682a34 18extern crate rustc;
92a42be0 19extern crate rustc_plugin;
970d7e83 20
62682a34 21use syntax::feature_gate::AttributeType;
92a42be0 22use rustc_plugin::Registry;
970d7e83 23
970d7e83 24
62682a34
SL
25
26#[plugin_registrar]
27pub fn plugin_registrar(reg: &mut Registry) {
28 reg.register_attribute("foo".to_owned(), AttributeType::Normal);
29 reg.register_attribute("bar".to_owned(), AttributeType::CrateLevel);
30 reg.register_attribute("baz".to_owned(), AttributeType::Whitelisted);
970d7e83 31}