Skip to content

Commit 05aed6c

Browse files
committed
bless
1 parent d1a9704 commit 05aed6c

22 files changed

+55
-84
lines changed

tests/ui/const-generics/generic_const_exprs/issue-105608.stderr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ error[E0282]: type annotations needed
44
LL | Combination::<0>.and::<_>().and::<_>();
55
| ^^^ cannot infer type of the type parameter `M` declared on the method `and`
66
|
7+
help: consider specifying the generic argument
8+
|
9+
LL | Combination::<0>.and::<M>().and::<_>();
10+
| ~~~~~
711

812
error: aborting due to 1 previous error
913

tests/ui/const-generics/issues/issue-62878.min.stderr

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,17 @@ help: add `#![feature(adt_const_params)]` to the crate attributes to enable more
1818
LL + #![feature(adt_const_params)]
1919
|
2020

21-
error[E0747]: type provided when a constant was expected
21+
error[E0658]: const arguments cannot yet be inferred with `_`
2222
--> $DIR/issue-62878.rs:10:11
2323
|
2424
LL | foo::<_, { [1] }>();
2525
| ^
2626
|
27-
= help: const arguments cannot yet be inferred with `_`
28-
help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
29-
|
30-
LL + #![feature(generic_arg_infer)]
31-
|
27+
= note: see issue #85077 <https://github.com/rust-lang/rust/issues/85077> for more information
28+
= help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
29+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
3230

3331
error: aborting due to 3 previous errors
3432

35-
Some errors have detailed explanations: E0747, E0770.
36-
For more information about an error, try `rustc --explain E0747`.
33+
Some errors have detailed explanations: E0658, E0770.
34+
For more information about an error, try `rustc --explain E0658`.

tests/ui/const-generics/issues/issue-62878.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ fn foo<const N: usize, const A: [u8; N]>() {}
88

99
fn main() {
1010
foo::<_, { [1] }>();
11-
//[min]~^ ERROR: type provided when a constant was expected
11+
//[min]~^ ERROR: const arguments cannot yet be inferred with `_`
1212
}

tests/ui/did_you_mean/bad-assoc-ty.stderr

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,6 @@ LL | fn foo<X: K<_, _>>(x: X) {}
233233
| ^ ^ not allowed in type signatures
234234
| |
235235
| not allowed in type signatures
236-
|
237-
help: use type parameters instead
238-
|
239-
LL | fn foo<X: K<T, T>, T>(x: X) {}
240-
| ~ ~ +++
241236

242237
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
243238
--> $DIR/bad-assoc-ty.rs:54:34

tests/ui/feature-gates/feature-gate-generic_arg_infer.normal.stderr

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@ LL | let _y: [u8; _] = [0; 3];
88
= help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
99
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1010

11-
error[E0747]: type provided when a constant was expected
11+
error[E0658]: const arguments cannot yet be inferred with `_`
1212
--> $DIR/feature-gate-generic_arg_infer.rs:18:20
1313
|
14-
LL | let _x = foo::<_>([1,2]);
14+
LL | let _x = foo::<_>([1, 2]);
1515
| ^
1616
|
17-
= help: const arguments cannot yet be inferred with `_`
18-
help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
19-
|
20-
LL + #![feature(generic_arg_infer)]
21-
|
17+
= note: see issue #85077 <https://github.com/rust-lang/rust/issues/85077> for more information
18+
= help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
19+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
2220

2321
error[E0658]: using `_` for array lengths is unstable
2422
--> $DIR/feature-gate-generic_arg_infer.rs:11:27
@@ -32,5 +30,4 @@ LL | let _x: [u8; 3] = [0; _];
3230

3331
error: aborting due to 3 previous errors
3432

35-
Some errors have detailed explanations: E0658, E0747.
36-
For more information about an error, try `rustc --explain E0658`.
33+
For more information about this error, try `rustc --explain E0658`.

tests/ui/feature-gates/feature-gate-generic_arg_infer.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![cfg_attr(feature, feature(generic_arg_infer))]
55

66
fn foo<const N: usize>(_: [u8; N]) -> [u8; N] {
7-
[0; N]
7+
[0; N]
88
}
99

1010
fn bar() {
@@ -15,7 +15,7 @@ fn bar() {
1515
}
1616

1717
fn main() {
18-
let _x = foo::<_>([1,2]);
19-
//[normal]~^ ERROR: type provided when a constant was expected
18+
let _x = foo::<_>([1, 2]);
19+
//[normal]~^ ERROR: const arguments cannot yet be inferred with `_`
2020
bar();
2121
}

tests/ui/generics/issue-79605.stderr

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
33
|
44
LL | impl X<'_, _> {}
55
| ^ not allowed in type signatures
6-
|
7-
help: use type parameters instead
8-
|
9-
LL | impl<T> X<'_, T> {}
10-
| +++ ~
116

127
error: aborting due to 1 previous error
138

tests/ui/macros/macro-span-issue-116502.stderr

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ LL | T: Trait<m!()>;
1717
| ---- in this macro invocation
1818
|
1919
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
20-
help: use type parameters instead
21-
|
22-
LL ~ U
23-
LL | };
24-
LL | }
25-
LL ~ struct S<U>(m!(), T)
26-
|
2720

2821
error: aborting due to 1 previous error
2922

tests/ui/mismatched_types/issue-75361-mismatched-impl.stderr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ LL | fn adjacent_edges(&self) -> Box<dyn MyTrait<Item = &Self::EdgeType> + '_>
1010
= note: expected signature `fn(&'1 T) -> Box<(dyn MyTrait<Item = &'1 T> + 'static)>`
1111
found signature `fn(&'1 T) -> Box<(dyn MyTrait<Item = &'1 T> + '1)>`
1212
help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
13-
--> $DIR/issue-75361-mismatched-impl.rs:12:55
13+
--> $DIR/issue-75361-mismatched-impl.rs:12:22
1414
|
1515
LL | fn adjacent_edges(&self) -> Box<dyn MyTrait<Item = &Self::EdgeType>>;
16-
| ^^^^ consider borrowing this type parameter in the trait
16+
| ^^^^ ^^^^ consider borrowing this type parameter in the trait
17+
| |
18+
| consider borrowing this type parameter in the trait
1719

1820
error: aborting due to 1 previous error
1921

tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@ LL | msg_send!();
130130
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/never-type-fallback.html>
131131
= help: specify the type explicitly
132132
= note: this warning originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info)
133-
help: use `()` annotations to avoid fallback changes
134-
|
135-
LL | match send_message::<() /* ?0 */>() {
136-
| ~~
137133

138134
warning: 10 warnings emitted
139135

tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@ LL | msg_send!();
130130
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/never-type-fallback.html>
131131
= help: specify the type explicitly
132132
= note: this error originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info)
133-
help: use `()` annotations to avoid fallback changes
134-
|
135-
LL | match send_message::<() /* ?0 */>() {
136-
| ~~
137133

138134
warning: the type `!` does not permit zero-initialization
139135
--> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:12:18

tests/ui/parser/issues/issue-14303-fncall.full.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0747]: type provided when a lifetime was expected
2-
--> $DIR/issue-14303-fncall.rs:15:26
1+
error[E0747]: placeholder provided when a lifetime was expected
2+
--> $DIR/issue-14303-fncall.rs:12:77
33
|
4-
LL | .collect::<Vec<S<_, 'a>>>();
5-
| ^
4+
LL | let _x = (*start..*end).map(|x| S { a: start, b: end }).collect::<Vec<S<_, 'a>>>();
5+
| ^
66

77
error: aborting due to 1 previous error
88

tests/ui/parser/issues/issue-14303-fncall.generic_arg.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0747]: inferred provided when a lifetime was expected
2-
--> $DIR/issue-14303-fncall.rs:15:26
1+
error[E0747]: placeholder provided when a lifetime was expected
2+
--> $DIR/issue-14303-fncall.rs:12:77
33
|
4-
LL | .collect::<Vec<S<_, 'a>>>();
5-
| ^
4+
LL | let _x = (*start..*end).map(|x| S { a: start, b: end }).collect::<Vec<S<_, 'a>>>();
5+
| ^
66

77
error: aborting due to 1 previous error
88

tests/ui/parser/issues/issue-14303-fncall.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@
33
// we need the above to avoid ast borrowck failure in recovered code
44
#![cfg_attr(generic_arg, feature(generic_arg_infer))]
55

6-
76
struct S<'a, T> {
87
a: &'a T,
98
b: &'a T,
109
}
1110

1211
fn foo<'a, 'b>(start: &'a usize, end: &'a usize) {
13-
let _x = (*start..*end)
14-
.map(|x| S { a: start, b: end })
15-
.collect::<Vec<S<_, 'a>>>();
16-
//[generic_arg]~^ ERROR inferred provided when a lifetime was expected
17-
//[full]~^^ ERROR type provided when a lifetime was expected
12+
let _x = (*start..*end).map(|x| S { a: start, b: end }).collect::<Vec<S<_, 'a>>>();
13+
//[generic_arg]~^ ERROR placeholder provided when a lifetime was expected
14+
//[full]~^^ ERROR placeholder provided when a lifetime was expected
1815
}
1916

2017
fn main() {}

tests/ui/self/elision/no-shadow-pin-self.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ LL | fn method(self: Pin<&Self>, f: &u32) -> &u32 {
99
|
1010
= note: expected signature `fn(Pin<&'1 Pin<P>>, &'a u32) -> &'a u32`
1111
found signature `fn(Pin<&'1 Pin<P>>, &'2 u32) -> &'1 u32`
12-
= help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
13-
= help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
12+
help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
13+
--> $DIR/no-shadow-pin-self.rs:3:30
14+
|
15+
LL | fn method<'a>(self: Pin<&Self>, f: &'a u32) -> &'a u32 {
16+
| ^^^^ consider borrowing this type parameter in the trait
1417

1518
error: lifetime may not live long enough
1619
--> $DIR/no-shadow-pin-self.rs:12:9

tests/ui/span/issue-42234-unknown-receiver-type.full.stderr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ error[E0282]: type annotations needed
1717
LL | .sum::<_>()
1818
| ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
1919
|
20+
help: consider specifying the generic argument
21+
|
22+
LL | .sum::<S>()
23+
| ~~~~~
2024

2125
error: aborting due to 2 previous errors
2226

tests/ui/traits/param-without-lifetime-constraint.stderr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ LL | fn get_relation(&self) -> &ProofReader {
1010
= note: expected signature `fn(&'1 Article) -> &'2 ProofReader`
1111
found signature `fn(&'1 Article) -> &'1 ProofReader`
1212
help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
13-
--> $DIR/param-without-lifetime-constraint.rs:10:31
13+
--> $DIR/param-without-lifetime-constraint.rs:10:22
1414
|
1515
LL | fn get_relation(&self) -> To;
16-
| ^^ consider borrowing this type parameter in the trait
16+
| ^^^^ ^^ consider borrowing this type parameter in the trait
17+
| |
18+
| consider borrowing this type parameter in the trait
1719

1820
error: aborting due to 1 previous error
1921

tests/ui/traits/self-without-lifetime-constraint.stderr

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ help: the lifetime requirements from the `impl` do not correspond to the require
1313
--> $DIR/self-without-lifetime-constraint.rs:42:60
1414
|
1515
LL | fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self, &Self>;
16-
| ^^^^ consider borrowing this type parameter in the trait
16+
| ^^^^ ^^^^ consider borrowing this type parameter in the trait
17+
| |
18+
| consider borrowing this type parameter in the trait
1719

1820
error[E0515]: cannot return value referencing function parameter `x`
1921
--> $DIR/self-without-lifetime-constraint.rs:17:87

tests/ui/type-alias-impl-trait/issue-77179.stderr

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
2828
--> $DIR/issue-77179.rs:18:25
2929
|
3030
LL | fn bar() -> Pointer<_>;
31-
| ^
32-
| |
33-
| not allowed in type signatures
34-
| help: use type parameters instead: `T`
31+
| ^ not allowed in type signatures
3532

3633
error: aborting due to 3 previous errors
3734

tests/ui/type/pattern_types/bad_const_generics_args_on_const_param.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
type Pat<const START: u32, const END: u32> =
55
std::pat::pattern_type!(u32 is START::<(), i32, 2>..=END::<_, Assoc = ()>);
66
//~^ ERROR type and const arguments are not allowed on const parameter `START`
7-
//~| ERROR type arguments are not allowed on const parameter `END`
7+
//~| ERROR generic arguments are not allowed on const parameter `END`
88
//~| ERROR associated item constraints are not allowed here
99

1010
fn main() {}

tests/ui/type/pattern_types/bad_const_generics_args_on_const_param.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ note: const parameter `START` defined here
1212
LL | type Pat<const START: u32, const END: u32> =
1313
| ^^^^^
1414

15-
error[E0109]: type arguments are not allowed on const parameter `END`
15+
error[E0109]: generic arguments are not allowed on const parameter `END`
1616
--> $DIR/bad_const_generics_args_on_const_param.rs:5:64
1717
|
1818
LL | std::pat::pattern_type!(u32 is START::<(), i32, 2>..=END::<_, Assoc = ()>);
19-
| --- ^ type argument not allowed
19+
| --- ^ generic argument not allowed
2020
| |
2121
| not allowed on const parameter `END`
2222
|

tests/ui/typeck/typeck_type_placeholder_item.stderr

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -507,22 +507,12 @@ LL | impl BadTrait<_> for BadStruct<_> {}
507507
| ^ ^ not allowed in type signatures
508508
| |
509509
| not allowed in type signatures
510-
|
511-
help: use type parameters instead
512-
|
513-
LL | impl<T> BadTrait<T> for BadStruct<T> {}
514-
| +++ ~ ~
515510

516511
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
517512
--> $DIR/typeck_type_placeholder_item.rs:162:34
518513
|
519514
LL | fn impl_trait() -> impl BadTrait<_> {
520515
| ^ not allowed in type signatures
521-
|
522-
help: use type parameters instead
523-
|
524-
LL | fn impl_trait<T>() -> impl BadTrait<T> {
525-
| +++ ~
526516

527517
error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
528518
--> $DIR/typeck_type_placeholder_item.rs:167:25

0 commit comments

Comments
 (0)