Skip to content

Commit 2eee522

Browse files
committed
Bless ui tests.
1 parent b15360a commit 2eee522

38 files changed

+460
-525
lines changed

tests/ui/associated-type-bounds/duplicate.stderr

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -208,17 +208,6 @@ LL | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
208208
|
209209
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
210210

211-
error[E0282]: type annotations needed
212-
--> $DIR/duplicate.rs:136:5
213-
|
214-
LL | iter::empty()
215-
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
216-
|
217-
help: consider specifying the generic argument
218-
|
219-
LL | iter::empty::<T>()
220-
| +++++
221-
222211
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
223212
--> $DIR/duplicate.rs:139:42
224213
|
@@ -237,17 +226,6 @@ LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
237226
|
238227
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
239228

240-
error[E0282]: type annotations needed
241-
--> $DIR/duplicate.rs:142:5
242-
|
243-
LL | iter::empty()
244-
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
245-
|
246-
help: consider specifying the generic argument
247-
|
248-
LL | iter::empty::<T>()
249-
| +++++
250-
251229
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
252230
--> $DIR/duplicate.rs:145:45
253231
|
@@ -266,17 +244,6 @@ LL | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
266244
|
267245
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
268246

269-
error[E0282]: type annotations needed
270-
--> $DIR/duplicate.rs:148:5
271-
|
272-
LL | iter::empty()
273-
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
274-
|
275-
help: consider specifying the generic argument
276-
|
277-
LL | iter::empty::<T>()
278-
| +++++
279-
280247
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
281248
--> $DIR/duplicate.rs:151:40
282249
|
@@ -697,6 +664,39 @@ LL | type A: Iterator<Item: 'static, Item: 'static>;
697664
|
698665
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
699666

667+
error[E0282]: type annotations needed
668+
--> $DIR/duplicate.rs:136:5
669+
|
670+
LL | iter::empty()
671+
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
672+
|
673+
help: consider specifying the generic argument
674+
|
675+
LL | iter::empty::<T>()
676+
| +++++
677+
678+
error[E0282]: type annotations needed
679+
--> $DIR/duplicate.rs:142:5
680+
|
681+
LL | iter::empty()
682+
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
683+
|
684+
help: consider specifying the generic argument
685+
|
686+
LL | iter::empty::<T>()
687+
| +++++
688+
689+
error[E0282]: type annotations needed
690+
--> $DIR/duplicate.rs:148:5
691+
|
692+
LL | iter::empty()
693+
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
694+
|
695+
help: consider specifying the generic argument
696+
|
697+
LL | iter::empty::<T>()
698+
| +++++
699+
700700
error: aborting due to 81 previous errors
701701

702702
Some errors have detailed explanations: E0282, E0719.

tests/ui/async-await/async-fn/edition-2015.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,20 @@ LL | fn foo(x: impl async Fn()) -> impl async Fn() { x }
3939
= help: to use an async block, remove the `||`: `async {`
4040

4141
error[E0658]: use of unstable library feature 'async_closure'
42-
--> $DIR/edition-2015.rs:1:22
42+
--> $DIR/edition-2015.rs:1:42
4343
|
4444
LL | fn foo(x: impl async Fn()) -> impl async Fn() { x }
45-
| ^^^^
45+
| ^^^^
4646
|
4747
= note: see issue #62290 <https://github.com/rust-lang/rust/issues/62290> for more information
4848
= help: add `#![feature(async_closure)]` to the crate attributes to enable
4949
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
5050

5151
error[E0658]: use of unstable library feature 'async_closure'
52-
--> $DIR/edition-2015.rs:1:42
52+
--> $DIR/edition-2015.rs:1:22
5353
|
5454
LL | fn foo(x: impl async Fn()) -> impl async Fn() { x }
55-
| ^^^^
55+
| ^^^^
5656
|
5757
= note: see issue #62290 <https://github.com/rust-lang/rust/issues/62290> for more information
5858
= help: add `#![feature(async_closure)]` to the crate attributes to enable

tests/ui/async-await/inference_var_self_argument.stderr

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
error[E0307]: invalid `self` parameter type: `&dyn Foo`
2+
--> $DIR/inference_var_self_argument.rs:5:24
3+
|
4+
LL | async fn foo(self: &dyn Foo) {
5+
| ^^^^^^^^
6+
|
7+
= note: type of `self` must be `Self` or a type that dereferences to it
8+
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
9+
110
error[E0038]: the trait `Foo` cannot be made into an object
211
--> $DIR/inference_var_self_argument.rs:5:5
312
|
@@ -13,15 +22,6 @@ LL | async fn foo(self: &dyn Foo) {
1322
| ^^^ ...because method `foo` is `async`
1423
= help: consider moving `foo` to another trait
1524

16-
error[E0307]: invalid `self` parameter type: `&dyn Foo`
17-
--> $DIR/inference_var_self_argument.rs:5:24
18-
|
19-
LL | async fn foo(self: &dyn Foo) {
20-
| ^^^^^^^^
21-
|
22-
= note: type of `self` must be `Self` or a type that dereferences to it
23-
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
24-
2525
error: aborting due to 2 previous errors
2626

2727
Some errors have detailed explanations: E0038, E0307.

tests/ui/async-await/issue-66312.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
error[E0308]: mismatched types
2-
--> $DIR/issue-66312.rs:9:8
3-
|
4-
LL | if x.is_some() {
5-
| ^^^^^^^^^^^ expected `bool`, found `()`
6-
71
error[E0307]: invalid `self` parameter type: `T`
82
--> $DIR/issue-66312.rs:4:22
93
|
@@ -13,6 +7,12 @@ LL | fn is_some(self: T);
137
= note: type of `self` must be `Self` or a type that dereferences to it
148
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
159

10+
error[E0308]: mismatched types
11+
--> $DIR/issue-66312.rs:9:8
12+
|
13+
LL | if x.is_some() {
14+
| ^^^^^^^^^^^ expected `bool`, found `()`
15+
1616
error: aborting due to 2 previous errors
1717

1818
Some errors have detailed explanations: E0307, E0308.

tests/ui/const-generics/opaque_types.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
error: `Foo` is forbidden as the type of a const generic parameter
2+
--> $DIR/opaque_types.rs:7:17
3+
|
4+
LL | fn foo<const C: Foo>() {}
5+
| ^^^
6+
|
7+
= note: the only supported types are integers, `bool` and `char`
8+
19
error: item does not constrain `Foo::{opaque#0}`, but has it in its signature
210
--> $DIR/opaque_types.rs:7:4
311
|
@@ -68,14 +76,6 @@ LL | type Foo = impl Sized;
6876
| ^^^^^^^^^^
6977
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
7078

71-
error: `Foo` is forbidden as the type of a const generic parameter
72-
--> $DIR/opaque_types.rs:7:17
73-
|
74-
LL | fn foo<const C: Foo>() {}
75-
| ^^^
76-
|
77-
= note: the only supported types are integers, `bool` and `char`
78-
7979
error[E0391]: cycle detected when computing type of opaque `Foo::{opaque#0}`
8080
--> $DIR/opaque_types.rs:3:12
8181
|

tests/ui/delegation/not-supported.stderr

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -120,22 +120,6 @@ LL | fn foo2<T>(&self, x: T) -> T { x }
120120
LL | reuse Trait::foo2 { &self.0 }
121121
| ^^^^
122122

123-
warning: this function depends on never type fallback being `()`
124-
--> $DIR/not-supported.rs:79:9
125-
|
126-
LL | fn opaque_ret() -> impl Trait { unimplemented!() }
127-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128-
|
129-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
130-
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
131-
= help: specify the types explicitly
132-
note: in edition 2024, the requirement `!: opaque::Trait` will fail
133-
--> $DIR/not-supported.rs:79:28
134-
|
135-
LL | fn opaque_ret() -> impl Trait { unimplemented!() }
136-
| ^^^^^^^^^^
137-
= note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
138-
139123
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:85:5: 85:24>::{synthetic#0}`
140124
--> $DIR/not-supported.rs:86:25
141125
|
@@ -169,6 +153,7 @@ note: in edition 2024, the requirement `!: opaque::Trait` will fail
169153
|
170154
LL | pub fn opaque_ret() -> impl Trait { unimplemented!() }
171155
| ^^^^^^^^^^
156+
= note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
172157

173158
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:88:5: 88:25>::{synthetic#0}`
174159
--> $DIR/not-supported.rs:89:24
@@ -189,6 +174,21 @@ LL | impl ToReuse for u16 {
189174
| ^^^^^^^^^^^^^^^^^^^^
190175
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
191176

177+
warning: this function depends on never type fallback being `()`
178+
--> $DIR/not-supported.rs:79:9
179+
|
180+
LL | fn opaque_ret() -> impl Trait { unimplemented!() }
181+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
182+
|
183+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
184+
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
185+
= help: specify the types explicitly
186+
note: in edition 2024, the requirement `!: opaque::Trait` will fail
187+
--> $DIR/not-supported.rs:79:28
188+
|
189+
LL | fn opaque_ret() -> impl Trait { unimplemented!() }
190+
| ^^^^^^^^^^
191+
192192
error: recursive delegation is not supported yet
193193
--> $DIR/not-supported.rs:102:22
194194
|

tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ LL | type Bop = impl std::fmt::Debug;
1818
= help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable
1919
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
2020

21-
error: unconstrained opaque type
22-
--> $DIR/feature-gate-impl_trait_in_assoc_type.rs:6:16
23-
|
24-
LL | type Bar = impl std::fmt::Debug;
25-
| ^^^^^^^^^^^^^^^^^^^^
26-
|
27-
= note: `Bar` must be used in combination with a concrete type within the same impl
28-
2921
error[E0658]: inherent associated types are unstable
3022
--> $DIR/feature-gate-impl_trait_in_assoc_type.rs:14:5
3123
|
@@ -36,6 +28,14 @@ LL | type Bop = impl std::fmt::Debug;
3628
= help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable
3729
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
3830

31+
error: unconstrained opaque type
32+
--> $DIR/feature-gate-impl_trait_in_assoc_type.rs:6:16
33+
|
34+
LL | type Bar = impl std::fmt::Debug;
35+
| ^^^^^^^^^^^^^^^^^^^^
36+
|
37+
= note: `Bar` must be used in combination with a concrete type within the same impl
38+
3939
error: unconstrained opaque type
4040
--> $DIR/feature-gate-impl_trait_in_assoc_type.rs:14:16
4141
|

tests/ui/impl-trait/impl-fn-predefined-lifetimes.stderr

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ error[E0720]: cannot resolve opaque type
1111
--> $DIR/impl-fn-predefined-lifetimes.rs:4:35
1212
|
1313
LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
14-
| ^^^^^^^^^^^^^^^ cannot resolve opaque type
14+
| ^^^^^^^^^^^^^^^ recursive opaque type
15+
LL |
16+
LL | |x| x
17+
| ----- returning here with type `{closure@$DIR/impl-fn-predefined-lifetimes.rs:6:5: 6:8}`
1518

1619
error: aborting due to 2 previous errors
1720

tests/ui/impl-trait/issues/issue-78722-2.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
error[E0271]: expected `{async block@$DIR/issue-78722-2.rs:13:13: 13:18}` to be a future that resolves to `u8`, but it resolves to `()`
2-
--> $DIR/issue-78722-2.rs:11:30
3-
|
4-
LL | fn concrete_use() -> F {
5-
| ^ expected `()`, found `u8`
6-
71
error[E0308]: mismatched types
82
--> $DIR/issue-78722-2.rs:16:20
93
|
@@ -18,6 +12,12 @@ LL | let f: F = async { 1 };
1812
= note: expected opaque type `F`
1913
found `async` block `{async block@$DIR/issue-78722-2.rs:16:20: 16:25}`
2014

15+
error[E0271]: expected `{async block@$DIR/issue-78722-2.rs:13:13: 13:18}` to be a future that resolves to `u8`, but it resolves to `()`
16+
--> $DIR/issue-78722-2.rs:11:30
17+
|
18+
LL | fn concrete_use() -> F {
19+
| ^ expected `()`, found `u8`
20+
2121
error: aborting due to 2 previous errors
2222

2323
Some errors have detailed explanations: E0271, E0308.

tests/ui/impl-trait/precise-capturing/bad-params.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ LL | fn missing_self() -> impl Sized + use<Self> {}
1717
| |
1818
| `Self` not allowed in a function
1919

20+
error: expected type or const parameter in `use<...>` precise captures list, found function
21+
--> $DIR/bad-params.rs:13:32
22+
|
23+
LL | fn hello() -> impl Sized + use<hello> {}
24+
| ^^^^^
25+
2026
error: `Self` can't be captured in `use<...>` precise captures list, since it is an alias
2127
--> $DIR/bad-params.rs:9:48
2228
|
@@ -25,12 +31,6 @@ LL | impl MyType {
2531
LL | fn self_is_not_param() -> impl Sized + use<Self> {}
2632
| ^^^^
2733

28-
error: expected type or const parameter in `use<...>` precise captures list, found function
29-
--> $DIR/bad-params.rs:13:32
30-
|
31-
LL | fn hello() -> impl Sized + use<hello> {}
32-
| ^^^^^
33-
3434
error: aborting due to 4 previous errors
3535

3636
Some errors have detailed explanations: E0411, E0412.

0 commit comments

Comments
 (0)