You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/indexing/index_message.stderr
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,9 @@ error[E0608]: cannot index into a value of type `({integer},)`
2
2
--> $DIR/index_message.rs:3:14
3
3
|
4
4
LL | let _ = z[0];
5
-
| ^^^ help: to access tuple elements, use: `.0`
5
+
| ^^^ help: to access tuple element `0`, use: `.0`
6
+
|
7
+
= help: tuples are indexed (like structs) with dot (`._`) not with brackets (`[_]`), element names are their positions: tuple = (tuple.0, tuple.1, ...)
Copy file name to clipboardExpand all lines: tests/ui/issues/issue-27842.stderr
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2,25 +2,25 @@ error[E0608]: cannot index into a value of type `({integer}, {integer}, {integer
2
2
--> $DIR/issue-27842.rs:4:16
3
3
|
4
4
LL | let _ = tup[0];
5
-
| ^^^ help: to access tuple elements, use: `.0`
5
+
| ^^^ help: to access tuple element `0`, use: `.0`
6
+
|
7
+
= help: tuples are indexed (like structs) with dot (`._`) not with brackets (`[_]`), element names are their positions: tuple = (tuple.0, tuple.1, ...)
6
8
7
9
error[E0608]: cannot index into a value of type `({integer}, {integer}, {integer})`
8
10
--> $DIR/issue-27842.rs:9:16
9
11
|
10
12
LL | let _ = tup[i];
11
-
| ^-^
12
-
| |
13
-
| cannot access tuple elements at a variable index
13
+
| ^^^
14
14
|
15
-
= help: to access tuple elements, use tuple indexing syntax (e.g., `tuple.0`)
15
+
= help: tuples are indexed (like structs) with dot (`._`) not with brackets (`[_]`), element names are their positions: tuple = (tuple.0, tuple.1, ...)
16
16
17
17
error[E0608]: cannot index into a value of type `({integer},)`
18
18
--> $DIR/issue-27842.rs:14:16
19
19
|
20
20
LL | let _ = tup[3];
21
21
| ^^^
22
22
|
23
-
= help: to access tuple elements, use tuple indexing syntax (e.g., `tuple.0`)
23
+
= help: tuples are indexed (like structs) with dot (`._`) not with brackets (`[_]`), element names are their positions: tuple = (tuple.0, tuple.1, ...)
Copy file name to clipboardExpand all lines: tests/ui/span/suggestion-non-ascii.stderr
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,9 @@ error[E0608]: cannot index into a value of type `({integer},)`
2
2
--> $DIR/suggestion-non-ascii.rs:3:24
3
3
|
4
4
LL | println!("☃{}", tup[0]);
5
-
| ^^^ help: to access tuple elements, use: `.0`
5
+
| ^^^ help: to access tuple element `0`, use: `.0`
6
+
|
7
+
= help: tuples are indexed (like structs) with dot (`._`) not with brackets (`[_]`), element names are their positions: tuple = (tuple.0, tuple.1, ...)
Copy file name to clipboardExpand all lines: tests/ui/typeck/coercion-check-for-indexing-expression-issue-40861.stderr
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ error[E0608]: cannot index into a value of type `()`
4
4
LL | ()[f(&[1.0])];
5
5
| ^^^^^^^^^^^
6
6
|
7
-
= help: to access tuple elements, use tuple indexing syntax (e.g., `tuple.0`)
7
+
= help: tuples are indexed (like structs) with dot (`._`) not with brackets (`[_]`), element names are their positions: tuple = (tuple.0, tuple.1, ...)
0 commit comments