summary refs log tree commit diff
path: root/src/test/ui/iterators
AgeCommit message (Collapse)AuthorLines
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
2021-04-16Adjust docs and tests for new `IntoIterator` impl for arraysLukas Kalbertodt-150/+4
2021-03-26fix rustc_on_implemented `_Self` pathslcnr-13/+15
2021-03-26update array missing `IntoIterator` msglcnr-18/+18
2020-11-29Update tests to remove old numeric constantsbstrie-14/+8
Part of #68490. Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros. For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed.
2020-11-23Qualify `panic!` as `core::panic!` in non-built-in `core` macrosCamelid-2/+0
Otherwise code like this #![no_implicit_prelude] fn main() { ::std::todo!(); ::std::unimplemented!(); } will fail to compile, which is unfortunate and presumably unintended. This changes many invocations of `panic!` in a `macro_rules!` definition to invocations of `$crate::panic!`, which makes the invocations hygienic. Note that this does not make the built-in macro `assert!` hygienic.
2020-10-30Always pass `-Z future-incompat-report` to UI testsAaron Hill-28/+26
2020-10-30Update into-iter-on-arrays test to check future-incompat-reportAaron Hill-1/+143
2020-10-30Some workAaron Hill-12/+14
2020-10-06Fix tests from rebaseMatthew Jasper-0/+28
2020-09-21move 'test zip ...' testsAlexis Bourget-103/+0
2020-09-03Auto merge of #73996 - da-x:short-unique-paths, r=petrochenkovbors-81/+79
diagnostics: shorten paths of unique symbols This is a step towards implementing a fix for #50310, and continuation of the discussion in [Pre-RFC: Nicer Types In Diagnostics - compiler - Rust Internals](https://internals.rust-lang.org/t/pre-rfc-nicer-types-in-diagnostics/11139). Impressed upon me from previous discussion in #21934 that an RFC for this is not needed, and I should just come up with code. The recent improvements to `use` suggestions that I've contributed have given rise to this implementation. Contrary to previous suggestions, it's rather simple logic, and I believe it only reduces the amount of cognitive load that a developer would need when reading type errors. ----- If a symbol name can only be imported from one place, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path to the last component. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable from anywhere.
2020-09-03avoid applying in-place collect specialization in type-length testThe8472-1/+2
the test was sized to match external iteration only, since vec's in-place collect now uses internal iteration we collect into a different type now. Note that any other try-fold based operation such as count() would also have exceeded the type length limit for that iterator.
2020-09-02pretty: trim paths of unique symbolsDan Aloni-81/+79
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-07-05Remove the usage of the LengthAtMost32 traitRoman Proskuryakov-18/+18
2020-06-10Migrate to numeric associated constsLzu Tao-23/+23
2020-04-26test iterator chain type length blowupBastian Kauschke-0/+31