Crates.io | apply_pub |
lib.rs | apply_pub |
version | 0.0.2 |
source | src |
created_at | 2014-11-24 00:08:46.348702 |
updated_at | 2015-12-11 23:57:25.953017 |
description | A Rust syntax extension for applying the `pub` visibility modifer to many items at once. |
homepage | |
repository | https://github.com/Kimundi/apply-pub-rs |
max_upload_size | |
id | 378 |
size | 11,879 |
A Rust syntax extension for applying the pub
visibility modifer to many items at once.
Right now the attribute applies to every possible child AST element that could have public visibility, including:
use
static
fn
, both standalone and methods/associated onesmod
type
, struct
and enum
trait
extern {}
blocks.Add this to your Cargo.toml
:
[dependencies.apply-pub-rs]
git = "https://github.com/Kimundi/apply-pub-rs"
To load the extension and use it:
#![feature(phase)]
#[phase(plugin)]
extern crate apply_pub;
#[apply_pub]
mod foo {
fn bar() {}
mod baz {
fn qux() {}
}
}
fn main() {
foo::bar();
foo::baz::qux();
}