Commit Graph

24 Commits

Author SHA1 Message Date
Maybe Waffle
13b67fb9d2 bless ui tests 2022-10-01 10:03:06 +00:00
Michael Goulet
370c816a71 A SubstitutionPart is not a deletion if it replaces nothing with nothing 2022-09-12 22:08:30 +00:00
klensy
0ff8ae3111 diagnostics: fix trailing space 2022-06-16 14:40:28 +03:00
Camille GILLOT
748e95b568 Bless tests. 2021-12-04 23:13:58 +01:00
Camille GILLOT
d3a6d4b1a0 Use multipart suggestions. 2021-12-04 23:13:58 +01:00
Camille GILLOT
646f58a7e1 Lint bare traits in AstConv. 2021-12-04 23:13:58 +01:00
Mara Bos
f8beb8f7f7 Add test for extra <> in dyn suggestion. 2021-08-30 22:34:46 +02:00
Guillaume Gomez
3d733f6785 Rollup merge of #87885 - m-ou-se:edition-guide-links, r=rylev
Link to edition guide instead of issues for 2021 lints.

This changes the 2021 lints to not link to github issues, but to the edition guide instead.

Fixes  #86996
2021-08-12 13:25:07 +02:00
Esteban Küber
99f2977031 Modify structured suggestion output
* On suggestions that include deletions, use a diff inspired output format
* When suggesting addition, use `+` as underline
* Color highlight modified span
2021-08-11 09:46:24 +00:00
Mara Bos
260f9b9e91 Link to edition guide instead of issues for 2021 lints. 2021-08-09 17:45:01 +02:00
Michael Howell
83d3a94b04 Add #![allow(dyn_drop)] to test cases with dyn Drop in them
These are all testing corner-cases in the compiler.
Adding a new warning broke these test cases, but --cap-lints stops
it from actually breaking things in production.
2021-07-18 07:55:57 -07:00
Ryan Levick
7b3940f44b Address PR feedback 2021-06-25 14:51:56 +02:00
Ryan Levick
23176f60e7 Change how edition based future compatibility warnings are handled 2021-06-25 14:51:56 +02:00
Aris Merchant
8ad63bafed Mark some edition tests as check-pass 2021-06-21 22:41:26 -07:00
Ryan Levick
aa4457fa5f Add compatibility info to lints 2021-04-13 16:55:54 +02:00
Ryan Levick
a2b1347bbb Improve error 2021-04-08 15:36:29 +02:00
Ryan Levick
c2d0f1457a Update BARE_TRAIT_OBJECT and ELLIPSIS_INCLUSIVE_RANGE_PATTERNS to errors in Rust 2021 2021-04-08 15:36:27 +02:00
varkor
24a2929ed1 Normalise notes with the/is 2020-01-24 16:24:50 +00:00
Tomasz Miąsko
0501d8ab0d Use check-pass in ui tests where appropriate 2019-11-04 16:03:46 +01:00
Yuki Okushi
c004451a20 Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
Felix S. Klock II
528366d3ff Revise and generalize the macros-unlinted tests.
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-28 13:08:56 +01:00
Felix S. Klock II
f043d2da65 Revise test slightly so that dyn in macro invocation *must* be parsed as 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-28 12:49:50 +01:00
Felix S. Klock II
1f63a52ca2 Regression test for rust-lang/rust#56327. 2019-03-27 17:18:49 +01:00
Felix S. Klock II
6d7e5df3d9 Some tests illustrating where the revised lint does and does not apply. 2019-03-27 17:13:51 +01:00