Skip to content

Commit c86a4aa

Browse files
Backticks
1 parent b92758a commit c86a4aa

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

compiler/rustc_lint/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ lint_ambiguous_wide_pointer_comparisons = ambiguous wide pointer comparison, the
33
.addr_suggestion = use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
44
55
lint_array_into_iter =
6-
this method call resolves to `<&{$target} as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <{$target} as IntoIterator>::into_iter in Rust 2021
6+
this method call resolves to `<&{$target} as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<{$target} as IntoIterator>::into_iter` in Rust 2021
77
.use_iter_suggestion = use `.iter()` instead of `.into_iter()` to avoid ambiguity
88
.remove_into_iter_suggestion = or remove `.into_iter()` to iterate by value
99
.use_explicit_into_iter_suggestion =

tests/ui/iterators/into-iter-on-arrays-2018.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
1+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
22
--> $DIR/into-iter-on-arrays-2018.rs:14:34
33
|
44
LL | let _: Iter<'_, i32> = array.into_iter();
@@ -16,7 +16,7 @@ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicit
1616
LL | let _: Iter<'_, i32> = IntoIterator::into_iter(array);
1717
| ++++++++++++++++++++++++ ~
1818

19-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
19+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
2020
--> $DIR/into-iter-on-arrays-2018.rs:18:44
2121
|
2222
LL | let _: Iter<'_, i32> = Box::new(array).into_iter();
@@ -25,7 +25,7 @@ LL | let _: Iter<'_, i32> = Box::new(array).into_iter();
2525
= warning: this changes meaning in Rust 2021
2626
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
2727

28-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
28+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
2929
--> $DIR/into-iter-on-arrays-2018.rs:22:43
3030
|
3131
LL | let _: Iter<'_, i32> = Rc::new(array).into_iter();
@@ -34,7 +34,7 @@ LL | let _: Iter<'_, i32> = Rc::new(array).into_iter();
3434
= warning: this changes meaning in Rust 2021
3535
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
3636

37-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
37+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
3838
--> $DIR/into-iter-on-arrays-2018.rs:25:41
3939
|
4040
LL | let _: Iter<'_, i32> = Array(array).into_iter();
@@ -43,7 +43,7 @@ LL | let _: Iter<'_, i32> = Array(array).into_iter();
4343
= warning: this changes meaning in Rust 2021
4444
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
4545

46-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
46+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
4747
--> $DIR/into-iter-on-arrays-2018.rs:32:24
4848
|
4949
LL | for _ in [1, 2, 3].into_iter() {}

tests/ui/iterators/into-iter-on-arrays-lint.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
1+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
22
--> $DIR/into-iter-on-arrays-lint.rs:11:11
33
|
44
LL | small.into_iter();
@@ -16,7 +16,7 @@ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicit
1616
LL | IntoIterator::into_iter(small);
1717
| ++++++++++++++++++++++++ ~
1818

19-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
19+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
2020
--> $DIR/into-iter-on-arrays-lint.rs:14:12
2121
|
2222
LL | [1, 2].into_iter();
@@ -33,7 +33,7 @@ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicit
3333
LL | IntoIterator::into_iter([1, 2]);
3434
| ++++++++++++++++++++++++ ~
3535

36-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
36+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
3737
--> $DIR/into-iter-on-arrays-lint.rs:17:9
3838
|
3939
LL | big.into_iter();
@@ -50,7 +50,7 @@ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicit
5050
LL | IntoIterator::into_iter(big);
5151
| ++++++++++++++++++++++++ ~
5252

53-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
53+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
5454
--> $DIR/into-iter-on-arrays-lint.rs:20:15
5555
|
5656
LL | [0u8; 33].into_iter();
@@ -67,7 +67,7 @@ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicit
6767
LL | IntoIterator::into_iter([0u8; 33]);
6868
| ++++++++++++++++++++++++ ~
6969

70-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
70+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
7171
--> $DIR/into-iter-on-arrays-lint.rs:24:21
7272
|
7373
LL | Box::new(small).into_iter();
@@ -76,7 +76,7 @@ LL | Box::new(small).into_iter();
7676
= warning: this changes meaning in Rust 2021
7777
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
7878

79-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
79+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
8080
--> $DIR/into-iter-on-arrays-lint.rs:27:22
8181
|
8282
LL | Box::new([1, 2]).into_iter();
@@ -85,7 +85,7 @@ LL | Box::new([1, 2]).into_iter();
8585
= warning: this changes meaning in Rust 2021
8686
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
8787

88-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
88+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
8989
--> $DIR/into-iter-on-arrays-lint.rs:30:19
9090
|
9191
LL | Box::new(big).into_iter();
@@ -94,7 +94,7 @@ LL | Box::new(big).into_iter();
9494
= warning: this changes meaning in Rust 2021
9595
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
9696

97-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
97+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
9898
--> $DIR/into-iter-on-arrays-lint.rs:33:25
9999
|
100100
LL | Box::new([0u8; 33]).into_iter();
@@ -103,7 +103,7 @@ LL | Box::new([0u8; 33]).into_iter();
103103
= warning: this changes meaning in Rust 2021
104104
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
105105

106-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
106+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
107107
--> $DIR/into-iter-on-arrays-lint.rs:37:31
108108
|
109109
LL | Box::new(Box::new(small)).into_iter();
@@ -112,7 +112,7 @@ LL | Box::new(Box::new(small)).into_iter();
112112
= warning: this changes meaning in Rust 2021
113113
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
114114

115-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
115+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
116116
--> $DIR/into-iter-on-arrays-lint.rs:40:32
117117
|
118118
LL | Box::new(Box::new([1, 2])).into_iter();
@@ -121,7 +121,7 @@ LL | Box::new(Box::new([1, 2])).into_iter();
121121
= warning: this changes meaning in Rust 2021
122122
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
123123

124-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
124+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
125125
--> $DIR/into-iter-on-arrays-lint.rs:43:29
126126
|
127127
LL | Box::new(Box::new(big)).into_iter();
@@ -130,7 +130,7 @@ LL | Box::new(Box::new(big)).into_iter();
130130
= warning: this changes meaning in Rust 2021
131131
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
132132

133-
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021
133+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
134134
--> $DIR/into-iter-on-arrays-lint.rs:46:35
135135
|
136136
LL | Box::new(Box::new([0u8; 33])).into_iter();

0 commit comments

Comments
 (0)