about summary refs log tree commit diff
path: root/src/test/ui/iterators
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-1434/+0
2022-12-21Substitute things correctlyMichael Goulet-4/+4
2022-12-15Consider lifetimes when comparing assoc types in method chainEsteban Küber-13/+43
Do not say "Type changed to X here" when the only difference is caused by lifetimes.
2022-12-13Avoid rendering empty annotationsOli Scherer-23/+0
2022-12-13Make some diagnostics not depend on the source of what they reference being ↵Oli Scherer-31/+25
available
2022-12-11Point at method call when it is the source of the bound errorEsteban Küber-53/+24
2022-12-11Use `with_forced_trimmed_paths`Esteban Küber-28/+28
2022-12-11fix rebaseEsteban Küber-10/+15
2022-12-11Only point at methods that might be relevantEsteban Küber-15/+62
2022-12-11Add label to method chains where assoc type remains the sameEsteban Küber-5/+5
2022-12-11Remove mention of "assoc type" in label as it is already in the `note` messageEsteban Küber-12/+12
2022-12-11Account for method call chains split across multiple bindingsEsteban Küber-1/+44
2022-12-11Mention only assoc types changesEsteban Küber-20/+18
2022-12-11Expand iterator chain testEsteban Küber-7/+26
2022-12-11Provide associated type information in method chainsMichael Goulet-0/+128
When encountering an unmet obligation that affects a method chain, like in iterator chains where one of the links has the wrong associated type, we point at every method call and mention their evaluated associated type at that point to give context to the user of where expectations diverged from the code as written. ``` note: the expression is of type `Map<std::slice::Iter<'_, {integer}>, [closure@$DIR/invalid-iterator-chain.rs:12:18: 12:21]>` --> $DIR/invalid-iterator-chain.rs:12:14 | LL | vec![0, 1] | ---------- this expression has type `Vec<{integer}>` LL | .iter() | ------ associated type `std::iter::Iterator::Item` is `&{integer}` here LL | .map(|x| { x; }) | ^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` is `()` here ```
2022-12-10Introduce `with_forced_trimmed_paths`Esteban Küber-3/+3
2022-11-11Don't add message that will never be shown to usersOli Scherer-7/+4
It will still be used in json, as seen by the ui test changes
2022-10-01bless ui testsMaybe Waffle-2/+2
2022-09-23Restore ignore tagFlorian Bartels-5/+0
This test case actually requires std::process.
2022-09-03Auto merge of #100966 - compiler-errors:revert-remove-deferred-sized-checks, ↵bors-6/+60
r=pnkfelix Revert "Remove deferred sized checks" cc: https://github.com/rust-lang/rust/pull/100652#issuecomment-1225798572 I'm okay with reverting this for now, and I will look into the diagnostic regressions. This reverts commit 33212bf7f527798a8cfa2bbb38781742f4ca718a. r? `@pnkfelix` ---- EDIT: This _also_ fixes #101066, a regression in method selection logic/coercion(?) due to the early registering of a `Sized` bound.
2022-08-31Fix a bunch of typoDezhi Wu-1/+1
This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
2022-08-27Revert "Remove deferred sized checks"Michael Goulet-6/+60
This reverts commit 33212bf7f527798a8cfa2bbb38781742f4ca718a.
2022-08-21Deduplicate errors that come from places like normalization, sizedMichael Goulet-33/+1
2022-08-21Rework point-at-argMichael Goulet-7/+62
2022-08-18Reword "Required because of the requirements on the impl of ..."Andy Wang-18/+18
2022-08-16Remove deferred sized checksMichael Goulet-24/+6
2022-06-16diagnostics: fix trailing spaceklensy-1/+1
2022-06-08Suggest using `iter()` or `into_iter()` for `Vec`Chayim Refael Friedman-0/+24
We cannot do that for `&Vec` because `#[rustc_on_unimplemented]` is limited (it does not clean generic instantiation for references, only for ADTs).
2022-05-28Move some tests to more reasonable placesCaio-0/+104
2022-04-26Better error messages when collecting into `[T; n]`Michael Goulet-2/+25
2022-03-24add #[must_use] to functions of slice and its iterators.Jendrik-12/+14
2022-02-09Suggest collecting into `Vec<_>` when collecting into `[_]`Michael Goulet-0/+41
2021-12-09Add needs-unwind to tests that depend on panickingDavid Koloski-0/+5
This directive isn't automatically set by compiletest or x.py, but can be turned on manually for targets that require it.
2021-11-20Do not mention associated items when they introduce an obligationEsteban Kuber-80/+0
2021-11-03Clean up some `-Z unstable-options` in tests.Eric Huss-1/+0
2021-10-21Make RSplit<T, P>: Clone not require T: CloneCaleb Sander-0/+11
This addresses a TODO comment. The behavior of #[derive(Clone)] *does* result in a T: Clone requirement. Add a manual Clone implementation, matching Split and SplitInclusive.
2021-10-03Practice diagnostic message conventionHirochika Matsumoto-17/+17
2021-08-30Update tests for array_into_iter lint upgrade.Mara Bos-82/+31
2021-08-16Use note to point at bound introducing requirementEsteban Küber-2/+5
2021-08-12Rollup merge of #87885 - m-ou-se:edition-guide-links, r=rylevGuillaume Gomez-15/+15
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-31/+32
* 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-15/+15
2021-07-19Various diagnostics clean ups/tweaksEsteban Küber-16/+80
* Always point at macros, including derive macros * Point at non-local items that introduce a trait requirement * On private associated item, point at definition
2021-06-26Fix array-into-iter tests.Mara Bos-13/+18
2021-06-26Add test for suggestion of array_into_iter in for loop.Mara Bos-1/+19
2021-06-26Update tests for updated array_into_iter lint.Mara Bos-54/+166
2021-06-25Change how edition based future compatibility warnings are handledRyan Levick-197/+40
2021-04-16Test array into_iter with more wrapper typesJosh Stone-5/+39
2021-04-16Test Box::new(array).into_iter()Josh Stone-4/+29
2021-04-16Skip into_iter() for arrays before 2021Josh Stone-0/+55