diff options
| author | bors <bors@rust-lang.org> | 2014-10-21 11:37:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-21 11:37:14 +0000 |
| commit | b69cd73b7bd448dbfde4cf074b73a4b8384cad38 (patch) | |
| tree | cd67057c778592286a506b7d0adea3c61b52f60a /src/test | |
| parent | e8cc3f26ec998181a883d79c9a668fe55695e681 (diff) | |
| parent | dd55c8003cb9c4b065e8a8e54bbc0496ac0a3dfd (diff) | |
| download | rust-b69cd73b7bd448dbfde4cf074b73a4b8384cad38.tar.gz rust-b69cd73b7bd448dbfde4cf074b73a4b8384cad38.zip | |
auto merge of #17508 : vberger/rust/stability_lint_for_nested_macros, r=pnkfelix
Finishes the job of #17286.
Now the stability lint will successfully detect patterns such as:
```
first_macro!(second_macro!(deprecated_function()));
```
```
macro_rules! foo (
($e: expr) => (bar!($e))
)
foo!(deprected_function());
```
and
```
println!("{}", deprecated_function());
```
even with more levels of nesting, such as
```
println!("{}", foo!(bar!(deprecated_function())));
```
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/lint-stability.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/compile-fail/lint-stability.rs b/src/test/compile-fail/lint-stability.rs index 6a36e270740..fdb0d801164 100644 --- a/src/test/compile-fail/lint-stability.rs +++ b/src/test/compile-fail/lint-stability.rs @@ -116,6 +116,7 @@ mod cross_crate { // on macros themselves are not yet linted. macro_test!(); macro_test_arg!(deprecated_text()); //~ ERROR use of deprecated item: text + macro_test_arg!(macro_test_arg!(deprecated_text())); //~ ERROR use of deprecated item: text macro_test_arg_nested!(deprecated_text); } |
