diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-01-30 11:43:45 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-01-30 11:43:45 -0800 |
| commit | 0e498da47e265b5bb7a4f59bbed53bc843bd83cc (patch) | |
| tree | faa59e85a242835d965df27778221b19aa4db5ad /src/test | |
| parent | 6ba3d2435556ae4ea72eeb6095e95b5c14a3c1f7 (diff) | |
rustc: Allow attributes on methods. Closes #1709
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/method-attributes.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/run-pass/method-attributes.rs b/src/test/run-pass/method-attributes.rs new file mode 100644 index 00000000000..32230dfca02 --- /dev/null +++ b/src/test/run-pass/method-attributes.rs @@ -0,0 +1,24 @@ +// pp-exact - Make sure we print all the attributes + +#[frobable] +iface frobable { + #[frob_attr] + fn frob(); + #[defrob_attr] + fn defrob(); +} + +#[int_frobable] +impl frobable for int { + #[frob_attr1] + fn frob() { + #[frob_attr2]; + } + + #[defrob_attr1] + fn defrob() { + #[defrob_attr2]; + } +} + +fn main() { } |
