about summary refs log tree commit diff
path: root/src/test/ui/iterators
AgeCommit message (Collapse)AuthorLines
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
2020-04-11rustc: Add a warning count upon completionRoccoDev-0/+2
2020-04-08Small tweaks to required bound spanEsteban Küber-1/+1
2020-04-08Use `PredicateObligation`s instead of `Predicate`sEsteban Küber-1/+1
Keep more information about trait binding failures.
2020-01-22Avoid overflow in `std::iter::Skip::count`Oliver Middleton-0/+8
The call to `count` on the inner iterator can overflow even if `Skip` itself would return less that `usize::max_value()` items.
2019-12-24Generalize `array_into_iter` lint to also lint for boxed arraysLukas Kalbertodt-0/+122
`Box` is special in that a method call on a box can move the value out of the box. Thus, the same backwards-compatibility problem can arise for boxed arrays as for simple arrays.
2019-11-06Add UI test for `array.into_iter()` lintLukas Kalbertodt-0/+103
2019-10-25Re-enable Emscripten's exception handling supportThomas Lively-5/+5
Passes LLVM codegen and Emscripten link-time flags for exception handling if and only if the panic strategy is `unwind`. Sets the default panic strategy for Emscripten targets to `unwind`. Re-enables tests that depend on unwinding support for Emscripten, including `should_panic` tests.
2019-10-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-5/+5
- Compatible with Emscripten 1.38.46-upstream or later upstream. - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the old incorrect wasm32 C call ABI with the correct one, preserving the old one as wasm32_bindgen_compat for wasm-bindgen compatibility. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-05Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, ↵Tyler Mandry-5/+5
r=alexcrichton" This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-04Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-5/+5
- Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-08-31Use span label instead of note for cause in E0631Esteban Küber-5/+2
2019-08-12Force optimization in 32-bit iter overflow testsJosh Stone-4/+4
2019-08-12Move run-pass/iterators/* to ui/iterators/Josh Stone-0/+100
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+270
2018-12-17Fix grammar in compiler error for array iteratorsMatthew Russell-4/+4
2018-12-04Update testsOliver Scherer-10/+23
2018-10-11Reword Range*/[Range*]: Iterator E0277 messagesEsteban Küber-4/+91
2018-10-11review commentsEsteban Küber-15/+15
- reword messages - apply custom comments to all types of ranges - fix indentation
2018-10-09Add tests for handled casesEsteban Küber-0/+286