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/range/issue-54505-no-std.stderr
+8-3
Original file line number
Diff line number
Diff line change
@@ -53,13 +53,18 @@ note: function defined here
53
53
|
54
54
LL | fn take_range(_r: &impl RangeBounds<i8>) {}
55
55
| ^^^^^^^^^^ -------------------------
56
+
help: you might have meant to use `..` to skip providing a value for expected fields, but this is only supported on non-tuple struct literals when `#![feature(default_field_values)]` is enabled; it is instead interpreted as a `std::ops::RangeFull` literal
57
+
--> $DIR/issue-54505-no-std.rs:39:16
58
+
|
59
+
LL | take_range(..);
60
+
| ^^
56
61
help: consider borrowing here
57
62
|
58
63
LL | take_range(&(..));
59
64
| ++ +
60
65
61
66
error[E0308]: mismatched types
62
-
--> $DIR/issue-54505-no-std.rs:44:16
67
+
--> $DIR/issue-54505-no-std.rs:45:16
63
68
|
64
69
LL | take_range(0..=1);
65
70
| ---------- ^^^^^ expected `&_`, found `RangeInclusive<{integer}>`
@@ -79,7 +84,7 @@ LL | take_range(&(0..=1));
79
84
| ++ +
80
85
81
86
error[E0308]: mismatched types
82
-
--> $DIR/issue-54505-no-std.rs:49:16
87
+
--> $DIR/issue-54505-no-std.rs:50:16
83
88
|
84
89
LL | take_range(..5);
85
90
| ---------- ^^^ expected `&_`, found `RangeTo<{integer}>`
@@ -99,7 +104,7 @@ LL | take_range(&(..5));
99
104
| ++ +
100
105
101
106
error[E0308]: mismatched types
102
-
--> $DIR/issue-54505-no-std.rs:54:16
107
+
--> $DIR/issue-54505-no-std.rs:55:16
103
108
|
104
109
LL | take_range(..=42);
105
110
| ---------- ^^^^^ expected `&_`, found `RangeToInclusive<{integer}>`
Copy file name to clipboardExpand all lines: tests/ui/range/issue-54505.stderr
+8-3
Original file line number
Diff line number
Diff line change
@@ -53,13 +53,18 @@ note: function defined here
53
53
|
54
54
LL | fn take_range(_r: &impl RangeBounds<i8>) {}
55
55
| ^^^^^^^^^^ -------------------------
56
+
help: you might have meant to use `..` to skip providing a value for expected fields, but this is only supported on non-tuple struct literals when `#![feature(default_field_values)]` is enabled; it is instead interpreted as a `std::ops::RangeFull` literal
57
+
--> $DIR/issue-54505.rs:24:16
58
+
|
59
+
LL | take_range(..);
60
+
| ^^
56
61
help: consider borrowing here
57
62
|
58
63
LL | take_range(&(..));
59
64
| ++ +
60
65
61
66
error[E0308]: mismatched types
62
-
--> $DIR/issue-54505.rs:29:16
67
+
--> $DIR/issue-54505.rs:30:16
63
68
|
64
69
LL | take_range(0..=1);
65
70
| ---------- ^^^^^ expected `&_`, found `RangeInclusive<{integer}>`
@@ -79,7 +84,7 @@ LL | take_range(&(0..=1));
79
84
| ++ +
80
85
81
86
error[E0308]: mismatched types
82
-
--> $DIR/issue-54505.rs:34:16
87
+
--> $DIR/issue-54505.rs:35:16
83
88
|
84
89
LL | take_range(..5);
85
90
| ---------- ^^^ expected `&_`, found `RangeTo<{integer}>`
@@ -99,7 +104,7 @@ LL | take_range(&(..5));
99
104
| ++ +
100
105
101
106
error[E0308]: mismatched types
102
-
--> $DIR/issue-54505.rs:39:16
107
+
--> $DIR/issue-54505.rs:40:16
103
108
|
104
109
LL | take_range(..=42);
105
110
| ---------- ^^^^^ expected `&_`, found `RangeToInclusive<{integer}>`
Copy file name to clipboardExpand all lines: tests/ui/structs/default-field-values-failures.stderr
+66-2
Original file line number
Diff line number
Diff line change
@@ -35,12 +35,76 @@ error: missing mandatory field `bar`
35
35
LL | let _ = Bar { .. };
36
36
| ^
37
37
38
+
error[E0308]: mismatched types
39
+
--> $DIR/default-field-values-failures.rs:51:17
40
+
|
41
+
LL | let _ = Rak(..);
42
+
| --- ^^ expected `i32`, found `RangeFull`
43
+
| |
44
+
| arguments to this struct are incorrect
45
+
|
46
+
note: tuple struct defined here
47
+
--> $DIR/default-field-values-failures.rs:26:12
48
+
|
49
+
LL | pub struct Rak(i32 = 42);
50
+
| ^^^
51
+
help: you might have meant to use `..` to skip providing a value for expected fields, but this is only supported on non-tuple struct literals; it is instead interpreted as a `std::ops::RangeFull` literal
52
+
--> $DIR/default-field-values-failures.rs:51:17
53
+
|
54
+
LL | let _ = Rak(..);
55
+
| ^^
56
+
57
+
error[E0061]: this struct takes 1 argument but 2 arguments were supplied
58
+
--> $DIR/default-field-values-failures.rs:53:13
59
+
|
60
+
LL | let _ = Rak(0, ..);
61
+
| ^^^ -- unexpected argument #2 of type `RangeFull`
62
+
|
63
+
help: you might have meant to use `..` to skip providing a value for expected fields, but this is only supported on non-tuple struct literals; it is instead interpreted as a `std::ops::RangeFull` literal
64
+
--> $DIR/default-field-values-failures.rs:53:20
65
+
|
66
+
LL | let _ = Rak(0, ..);
67
+
| ^^
68
+
note: tuple struct defined here
69
+
--> $DIR/default-field-values-failures.rs:26:12
70
+
|
71
+
LL | pub struct Rak(i32 = 42);
72
+
| ^^^
73
+
help: remove the extra argument
74
+
|
75
+
LL - let _ = Rak(0, ..);
76
+
LL + let _ = Rak(0);
77
+
|
78
+
79
+
error[E0061]: this struct takes 1 argument but 2 arguments were supplied
80
+
--> $DIR/default-field-values-failures.rs:55:13
81
+
|
82
+
LL | let _ = Rak(.., 0);
83
+
| ^^^ -- unexpected argument #1 of type `RangeFull`
84
+
|
85
+
help: you might have meant to use `..` to skip providing a value for expected fields, but this is only supported on non-tuple struct literals; it is instead interpreted as a `std::ops::RangeFull` literal
86
+
--> $DIR/default-field-values-failures.rs:55:17
87
+
|
88
+
LL | let _ = Rak(.., 0);
89
+
| ^^
90
+
note: tuple struct defined here
91
+
--> $DIR/default-field-values-failures.rs:26:12
92
+
|
93
+
LL | pub struct Rak(i32 = 42);
94
+
| ^^^
95
+
help: remove the extra argument
96
+
|
97
+
LL - let _ = Rak(.., 0);
98
+
LL + let _ = Rak(0);
99
+
|
100
+
38
101
error: generic `Self` types are currently not permitted in anonymous constants
39
102
--> $DIR/default-field-values-failures.rs:20:14
40
103
|
41
104
LL | bar: S = Self::S,
42
105
| ^^^^
43
106
44
-
error: aborting due to 5 previous errors
107
+
error: aborting due to 8 previous errors
45
108
46
-
For more information about this error, try `rustc --explain E0277`.
109
+
Some errors have detailed explanations: E0061, E0277, E0308.
110
+
For more information about an error, try `rustc --explain E0061`.
0 commit comments