about summary refs log tree commit diff
path: root/src/test/ui/dyn-keyword
AgeCommit message (Collapse)AuthorLines
2019-03-28Revise and generalize the macros-unlinted tests.Felix S. Klock II-2/+85
Review feedback asked for the test to be generalized to include macros 2.0; that generalization is dyn-2015-idents-in-decl-macros-unlinted.rs As a drive-by, I also decided to revise the test to make it clear *why* we cannot generally lint these cases. (I already had similar demonstrations in dyn-2015-edition-keyword-ident-lint.rs, but it does not hurt to try to emphasize matters.) I also added some commentary on the cases where we could choose to make the lint smarter, namely the situations where a macro is *definitely* using `dyn` as an identifier (because it is using it as a path component).
2019-03-28Revise test slightly so that `dyn` in macro invocation *must* be parsed as ↵Felix S. Klock II-4/+4
keyword in test. Back-story: After reflection this morning, I realized that the previous form of this test would allow the macro invocation to treat the `dyn` input as a raw-identifier rather than a keyword, and since the input was discarded by that version of the macro, the test would pass despite the detail that the input `dyn` should not have been parsed as a raw-identifier. This revision fixes that oversight, by actually *using* the macro input to construct a `Box<dyn Trait>` type.
2019-03-27Regression test for rust-lang/rust#56327.Felix S. Klock II-0/+25
2019-03-27Some tests illustrating where the revised lint does and does not apply.Felix S. Klock II-0/+346