rust/src/libcore
Mazdak Farrokhzad c9eae9ea63
Rollup merge of #66017 - LukasKalbertodt:array-into-iter-lint, r=matthewjasper
Add future incompatibility lint for `array.into_iter()`

This is for #65819. This lint warns when calling `into_iter` on an array directly. That's because today the method call resolves to `<&[T] as IntoIterator>::into_iter` but that would change when adding `IntoIterator` impls for arrays. This problem is discussed in detail in #65819.

We still haven't decided how to proceed exactly, but it seems like adding a lint is a good idea regardless?

Also: this is the first time I implement a lint, so there are probably a lot of things I can improve. I used a different strategy than @scottmcm describes [here](https://github.com/rust-lang/rust/pull/65819#issuecomment-548667847) since I already started implementing this before they commented.

### TODO

- [x] Decide if we want this lint -> apparently [we want](https://github.com/rust-lang/rust/pull/65819#issuecomment-548964818)
- [x] Open a lint-tracking-issue and add the correct issue number in the code -> https://github.com/rust-lang/rust/issues/66145
2019-11-07 08:51:58 +01:00
..
array Fill tracking issue number for array_value_iter and fix Rust version 2019-10-25 11:37:30 +02:00
benches Improve ptr_rotate performance, tests, and benchmarks 2019-08-06 10:42:48 -05:00
char Improve docs on some char boolean methods 2019-10-12 15:06:20 +02:00
fmt Apply clippy::redundant_pattern_matching suggestion 2019-10-22 19:23:10 +02:00
future Use associated_type_bounds where applicable - closes #61738 2019-08-08 22:39:15 +02:00
hash Snap cfgs to new beta 2019-09-25 08:42:46 -04:00
iter Rollup merge of #66017 - LukasKalbertodt:array-into-iter-lint, r=matthewjasper 2019-11-07 08:51:58 +01:00
mem Rollup merge of #66044 - RalfJung:uninit-lint, r=oli-obk 2019-11-07 09:20:36 +09:00
num Stabilize float_to_from_bytes feature 2019-10-31 16:13:28 +00:00
ops Rollup merge of #65902 - gilescope:issue62570, r=estebank 2019-11-01 11:20:14 -07:00
prelude Move the matches! macro to the prelude 2019-10-23 15:35:36 +02:00
ptr Apply suggestions from code review 2019-11-05 21:50:55 +01:00
slice fix link to ptr docs 2019-11-05 13:22:43 +01:00
str doc(str): show example of chars().count() under len() 2019-11-01 20:18:33 -07:00
sync Rollup merge of #65214 - Amanieu:cfg_atomic, r=alexcrichton 2019-10-13 19:17:04 +02:00
task Fix typo 2019-10-12 15:18:17 +02:00
tests Add unit tests for array::IntoIter 2019-10-24 15:46:44 +02:00
unicode it's more pythonic to use 'is not None' in python files 2019-09-06 15:14:25 +08:00
alloc.rs Fix clippy::clone_on_copy warnings 2019-07-18 15:14:56 +02:00
any.rs add example for type_name 2019-10-16 16:54:04 +00:00
ascii.rs Implement Clone, Display for ascii::EscapeDefault 2019-08-09 22:45:06 -04:00
bool.rs Snap cfgs to new beta 2019-09-25 08:42:46 -04:00
borrow.rs be more direct about borrow requirenments 2019-04-03 11:41:24 +03:00
Cargo.toml Move the matches! macro to the prelude 2019-10-23 15:35:36 +02:00
cell.rs Fixed libcore/cell.rs example 2019-11-06 01:03:31 +03:00
clone.rs Snap cfgs to new beta 2019-09-25 08:42:46 -04:00
cmp.rs Migrate from #[structural_match] attribute a lang-item trait. 2019-10-25 14:52:07 +02:00
convert.rs Rename SuperiorThanZero -> GreaterThanZero 2019-11-02 13:12:07 +00:00
default.rs Snap cfgs to new beta 2019-09-25 08:42:46 -04:00
ffi.rs doc: use new feature gate for c_void type 2019-10-29 13:01:54 +00:00
hint.rs Upgrade Emscripten targets to use upstream LLVM backend 2019-10-16 17:06:48 -07:00
internal_macros.rs std: Remove internal definitions of cfg_if! macro 2019-06-10 10:58:44 -07:00
intrinsics.rs Auto merge of #63810 - oli-obk:const_offset_from, r=RalfJung,nikic 2019-11-02 22:26:54 +00:00
iter_private.rs Remove licenses 2018-12-25 21:08:33 -07:00
lib.rs gate rustc_on_unimplemented under rustc_attrs 2019-11-06 07:34:51 +01:00
macros.rs caller_location: use in core::panic!. 2019-10-30 18:55:17 +02:00
marker.rs Migrate from #[structural_match] attribute a lang-item trait. 2019-10-25 14:52:07 +02:00
option.rs Rollup merge of #64747 - ethanboxx:master, r=Centril 2019-10-28 04:53:05 +01:00
panic.rs Panicking infra uses &core::panic::Location. 2019-10-27 12:50:58 -07:00
panicking.rs Panicking infra uses &core::panic::Location. 2019-10-27 12:50:58 -07:00
pin.rs pin.rs: fix links to primitives in documentation 2019-09-27 14:33:08 +00:00
raw.rs Fix more tests after revert of rustdoc cfg(test) feature 2019-06-09 18:15:53 +01:00
result.rs Auto merge of #63166 - ksqsf:master, r=alexcrichton 2019-09-04 07:47:08 +00:00
time.rs fix tests 2019-07-30 16:41:03 +00:00
tuple.rs libcore => 2018 2019-04-18 14:47:35 +09:00
unit.rs libcore => 2018 2019-04-18 14:47:35 +09:00