about summary refs log tree commit diff
path: root/src/test/ui/rust-2021
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-1744/+0
2022-10-01bless ui testsMaybe Waffle-20/+20
2022-09-12Don't trim substitution if it's only whitespaceMichael Goulet-14/+14
2022-09-12A SubstitutionPart is not a deletion if it replaces nothing with nothingMichael Goulet-28/+14
2022-06-16diagnostics: fix trailing spaceklensy-14/+14
2022-02-21Do not suggest wrapping an item if it has ambiguous un-imported methodsMichael Goulet-26/+0
2021-11-03Clean up some `-Z unstable-options` in tests.Eric Huss-3/+2
2021-10-26Add test checking that Edition 2021 is suggested for .try_into() and fix ↵Jakob Degen-0/+1
other test
2021-10-15Bless testsCameron Steffen-3/+3
2021-10-07Add tests for panic and [debug_]assert in Rust 2021.Mara Bos-0/+125
2021-09-02Bless tests.Camille GILLOT-3/+6
2021-08-31Rollup merge of #88504 - m-ou-se:turbofish-please-stay, r=oli-obkMara Bos-0/+81
Keep turbofish in prelude collision lint. Fixes https://github.com/rust-lang/rust/issues/88442
2021-08-31Add macro test for prelude collision suggestions.Mara Bos-0/+115
2021-08-31Rollup merge of #88503 - m-ou-se:array-into-inter-ambiguous, r=cjgillotMara Bos-0/+70
Warn when [T; N].into_iter() is ambiguous in the new edition. Fixes https://github.com/rust-lang/rust/issues/88475 In https://github.com/rust-lang/rust/issues/88475, a situation was found where `[T; N].into_iter()` becomes *ambiguous* in the new edition. This is different than the case where `(&[T; N]).into_iter()` resolves differently, which was the only case handled by the `array_into_iter` lint. This is almost identical to the new-traits-in-the-prelude problem. Effectively, due to the array-into-iter hack disappearing in Rust 2021, we effectively added `IntoIterator` to the 'prelude' in Rust 2021 specifically for arrays. This modifies the prelude collisions lint to detect that case and emit a `array_into_iter` lint in that case.
2021-08-31Rollup merge of #88497 - m-ou-se:prelude-collision-glob, r=nikomatsakisMara Bos-1/+32
Fix prelude collision suggestions for glob imported traits. Fixes https://github.com/rust-lang/rust/issues/88471 cc `@nikomatsakis`
2021-08-31Rollup merge of #88496 - m-ou-se:prelude-collision-lifetime-generics, ↵Mara Bos-20/+96
r=petrochenkov Fix prelude collision lint suggestion for generics with lifetimes Fixes https://github.com/rust-lang/rust/issues/88470 cc `@nikomatsakis`
2021-08-30Test that turbofish does not swim away in prelude collusion suggestion.Mara Bos-0/+81
2021-08-30Add test for 2021 ambiguous [T; N].into_iter().Mara Bos-0/+70
2021-08-30No longer pass -Z unstable-options for edition 2021 in test.Mara Bos-1/+1
2021-08-30Add test for glob imported prelude collision trait.Mara Bos-1/+32
2021-08-30Add and update tests.Mara Bos-20/+96
2021-08-12Rollup merge of #87885 - m-ou-se:edition-guide-links, r=rylevGuillaume Gomez-21/+21
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-11Modify structured suggestion outputEsteban Küber-32/+46
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-08-09Link to edition guide instead of issues for 2021 lints.Mara Bos-21/+21
2021-08-04Remove trailing whitespace from error messagesFabian Wolff-1/+1
2021-07-30Fix error with suggestion for how to disambiguate associated function when ↵Ryan Levick-0/+115
struct is generic
2021-07-08Update src/test/ui/rust-2021/future-prelude-collision-unneeded.rsNiko Matsakis-0/+2
2021-07-07Add generic types to prelude collision lint test.Mara Bos-0/+25
2021-07-07Add test for trait check in prelude collision lint.Mara Bos-1/+16
2021-07-06rename rust_2021_token_prefixes to rust_2021_prefixes_incompatible_syntaxRyan Levick-14/+14
2021-07-06Rename future_prelude_collisions to rust_2021_prelude_collisionsRyan Levick-19/+19
2021-07-06rust_2021_token_prefixesRyan Levick-14/+14
2021-07-06Rename reserved_prefix lint to reserved_prefixesRyan Levick-14/+14
2021-07-06Add s to FUTURE_PRELUDE_COLLISIONRyan Levick-20/+22
2021-06-29Rollup merge of #86657 - jam1garner:future_prelude_false_positive, ↵Yuki Okushi-0/+16
r=nikomatsakis Fix `future_prelude_collision` false positive Fixes #86633 The lint for checking if method resolution of methods named `try_into` will fail in 2021 edition previously would fire on all inherent methods, however for inherent methods that consume `self`, this takes priority over `TryInto::try_into` due to being inherent, while trait method and methods that take `&self` or `&mut self` don't take priority, and thus aren't affected by this false positive. This fix is rather simple: simply checking if the inherent method doesn't auto-deref or auto-ref (and thus takes `self`) and if so, prevents the lint from firing.
2021-06-27Fix `future_prelude_collision` false positivejam1garner-0/+16
2021-06-26Update reserved prefixes test for new edition lint wording.Mara Bos-15/+15
2021-06-26Add reserved_prefixe tests for macros from different editions.Mara Bos-0/+112
2021-06-26Add quote!() example to reserved_prefix lint test.Mara Bos-1/+34
2021-06-26Add test for the reserved_prefix migration lint.Mara Bos-0/+115
2021-06-26Update reserved-prefixes test output.Mara Bos-36/+54
2021-06-26Reserve prefixed identifiers and string literals (RFC 3101)lrh2000-0/+128
This commit denies any identifiers immediately followed by one of three tokens `"`, `'` or `#`, which is stricter than the requirements of RFC 3101 but may be necessary according to the discussion at [Zulip]. [Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/268952-edition-2021/topic/reserved.20prefixes/near/238470099
2021-06-25Fix new broken testsRyan Levick-51/+55
2021-06-21add test for `dyn` collisionsNiko Matsakis-0/+122
2021-06-21do not run rustfix for future-prelude-collision-shadowNiko Matsakis-35/+1
2021-06-19Fix future_prelude_collision for object calls and use as _jam1garner-2/+175
2021-06-17WIP: Find the imports that were used to reach a methodNiko Matsakis-0/+85
And add tests for some corner cases we have to consider.
2021-06-15Add future_prelude_collision to 2021 compat groupjam1garner-11/+66
* Add to 2021 compatibility group * Set default to Allow
2021-06-14don't warn for fully qual inherent methodsNiko Matsakis-0/+42
But do continue to warn for trait methods.
2021-06-14add inherent-method-collision testNiko Matsakis-0/+15