Skip to content

Commit fc48541

Browse files
committed
Update syntax in existing tests
1 parent 87738fe commit fc48541

File tree

100 files changed

+343
-328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+343
-328
lines changed

src/test/ui/associated-type-bounds/duplicate.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// error-pattern:could not find defining uses
44

55
#![feature(associated_type_bounds)]
6-
#![feature(existential_type)]
6+
#![feature(type_alias_impl_trait)]
77
#![feature(impl_trait_in_bindings)]
88
#![feature(untagged_unions)]
99

@@ -107,17 +107,17 @@ type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
107107
type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
108108
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
109109

110-
existential type ETAI1<T: Iterator<Item: Copy, Item: Send>>: Copy;
110+
type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
111111
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
112-
existential type ETAI2<T: Iterator<Item: Copy, Item: Copy>>: Copy;
112+
type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
113113
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
114-
existential type ETAI3<T: Iterator<Item: 'static, Item: 'static>>: Copy;
114+
type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
115115
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
116-
existential type ETAI4: Iterator<Item: Copy, Item: Send>;
116+
type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
117117
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
118-
existential type ETAI5: Iterator<Item: Copy, Item: Copy>;
118+
type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
119119
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
120-
existential type ETAI6: Iterator<Item: 'static, Item: 'static>;
120+
type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
121121
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
122122

123123
trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}

src/test/ui/associated-type-bounds/duplicate.stderr

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -369,86 +369,86 @@ LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
369369
error: could not find defining uses
370370
--> $DIR/duplicate.rs:110:1
371371
|
372-
LL | existential type ETAI1<T: Iterator<Item: Copy, Item: Send>>: Copy;
373-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
372+
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
373+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
374374

375375
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
376-
--> $DIR/duplicate.rs:110:48
376+
--> $DIR/duplicate.rs:110:36
377377
|
378-
LL | existential type ETAI1<T: Iterator<Item: Copy, Item: Send>>: Copy;
379-
| ---------- ^^^^^^^^^^ re-bound here
380-
| |
381-
| `Item` bound here first
378+
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
379+
| ---------- ^^^^^^^^^^ re-bound here
380+
| |
381+
| `Item` bound here first
382382

383383
error: could not find defining uses
384384
--> $DIR/duplicate.rs:112:1
385385
|
386-
LL | existential type ETAI2<T: Iterator<Item: Copy, Item: Copy>>: Copy;
387-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
386+
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
387+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
388388

389389
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
390-
--> $DIR/duplicate.rs:112:48
390+
--> $DIR/duplicate.rs:112:36
391391
|
392-
LL | existential type ETAI2<T: Iterator<Item: Copy, Item: Copy>>: Copy;
393-
| ---------- ^^^^^^^^^^ re-bound here
394-
| |
395-
| `Item` bound here first
392+
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
393+
| ---------- ^^^^^^^^^^ re-bound here
394+
| |
395+
| `Item` bound here first
396396

397397
error: could not find defining uses
398398
--> $DIR/duplicate.rs:114:1
399399
|
400-
LL | existential type ETAI3<T: Iterator<Item: 'static, Item: 'static>>: Copy;
401-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
400+
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
401+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
402402

403403
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
404-
--> $DIR/duplicate.rs:114:51
404+
--> $DIR/duplicate.rs:114:39
405405
|
406-
LL | existential type ETAI3<T: Iterator<Item: 'static, Item: 'static>>: Copy;
407-
| ------------- ^^^^^^^^^^^^^ re-bound here
408-
| |
409-
| `Item` bound here first
406+
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
407+
| ------------- ^^^^^^^^^^^^^ re-bound here
408+
| |
409+
| `Item` bound here first
410410

411411
error: could not find defining uses
412412
--> $DIR/duplicate.rs:116:1
413413
|
414-
LL | existential type ETAI4: Iterator<Item: Copy, Item: Send>;
415-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
414+
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
415+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
416416

417417
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
418-
--> $DIR/duplicate.rs:116:46
418+
--> $DIR/duplicate.rs:116:40
419419
|
420-
LL | existential type ETAI4: Iterator<Item: Copy, Item: Send>;
421-
| ---------- ^^^^^^^^^^ re-bound here
422-
| |
423-
| `Item` bound here first
420+
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
421+
| ---------- ^^^^^^^^^^ re-bound here
422+
| |
423+
| `Item` bound here first
424424

425425
error: could not find defining uses
426426
--> $DIR/duplicate.rs:118:1
427427
|
428-
LL | existential type ETAI5: Iterator<Item: Copy, Item: Copy>;
429-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
428+
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
429+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
430430

431431
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
432-
--> $DIR/duplicate.rs:118:46
432+
--> $DIR/duplicate.rs:118:40
433433
|
434-
LL | existential type ETAI5: Iterator<Item: Copy, Item: Copy>;
435-
| ---------- ^^^^^^^^^^ re-bound here
436-
| |
437-
| `Item` bound here first
434+
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
435+
| ---------- ^^^^^^^^^^ re-bound here
436+
| |
437+
| `Item` bound here first
438438

439439
error: could not find defining uses
440440
--> $DIR/duplicate.rs:120:1
441441
|
442-
LL | existential type ETAI6: Iterator<Item: 'static, Item: 'static>;
443-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
442+
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
443+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
444444

445445
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
446-
--> $DIR/duplicate.rs:120:49
446+
--> $DIR/duplicate.rs:120:43
447447
|
448-
LL | existential type ETAI6: Iterator<Item: 'static, Item: 'static>;
449-
| ------------- ^^^^^^^^^^^^^ re-bound here
450-
| |
451-
| `Item` bound here first
448+
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
449+
| ------------- ^^^^^^^^^^^^^ re-bound here
450+
| |
451+
| `Item` bound here first
452452

453453
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
454454
--> $DIR/duplicate.rs:123:36

src/test/ui/associated-type-bounds/dyn-existential-type.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// run-pass
22

33
#![feature(associated_type_bounds)]
4-
#![feature(existential_type)]
54

65
use std::ops::Add;
76

src/test/ui/associated-type-bounds/existential-type.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// run-pass
22

33
#![feature(associated_type_bounds)]
4-
#![feature(existential_type)]
4+
#![feature(type_alias_impl_trait)]
55

66
use std::ops::Add;
77

@@ -17,15 +17,15 @@ struct S1;
1717
struct S2;
1818
impl Tr1 for S1 { type As1 = S2; fn mk(self) -> Self::As1 { S2 } }
1919

20-
existential type Et1: Tr1<As1: Copy>;
20+
type Et1 = impl Tr1<As1: Copy>;
2121
fn def_et1() -> Et1 { S1 }
2222
pub fn use_et1() { assert_copy(def_et1().mk()); }
2323

24-
existential type Et2: Tr1<As1: 'static>;
24+
type Et2 = impl Tr1<As1: 'static>;
2525
fn def_et2() -> Et2 { S1 }
2626
pub fn use_et2() { assert_static(def_et2().mk()); }
2727

28-
existential type Et3: Tr1<As1: Clone + Iterator<Item: Add<u8, Output: Into<u8>>>>;
28+
type Et3 = impl Tr1<As1: Clone + Iterator<Item: Add<u8, Output: Into<u8>>>>;
2929
fn def_et3() -> Et3 {
3030
struct A;
3131
impl Tr1 for A {
@@ -44,7 +44,7 @@ pub fn use_et3() {
4444
assert_eq!(s, (0..10).map(|x| x + 1).sum());
4545
}
4646

47-
existential type Et4: Tr1<As1: for<'a> Tr2<'a>>;
47+
type Et4 = impl Tr1<As1: for<'a> Tr2<'a>>;
4848
fn def_et4() -> Et4 {
4949
#[derive(Copy, Clone)]
5050
struct A;

src/test/ui/async-await/issues/issue-60655-latebound-regions.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
// build-pass (FIXME(62277): could be check-pass?)
44
// edition:2018
55

6-
#![feature(async_await, existential_type)]
6+
#![feature(async_await)]
7+
#![feature(type_alias_impl_trait)]
78

89
use std::future::Future;
910

10-
pub existential type Func: Sized;
11+
pub type Func = impl Sized;
1112

1213
// Late bound region should be allowed to escape the function, since it's bound
1314
// in the type.
@@ -17,7 +18,7 @@ fn null_function_ptr() -> Func {
1718

1819
async fn async_nop(_: &u8) {}
1920

20-
pub existential type ServeFut: Future<Output=()>;
21+
pub type ServeFut = impl Future<Output=()>;
2122

2223
// Late bound regions occur in the generator witness type here.
2324
fn serve() -> ServeFut {

src/test/ui/existential_types/auxiliary/cross_crate_ice.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
#![crate_type="rlib"]
44

5-
#![feature(existential_type)]
5+
#![feature(type_alias_impl_trait)]
66

7-
pub existential type Foo: std::fmt::Debug;
7+
pub type Foo = impl std::fmt::Debug;
88

99
pub fn foo() -> Foo {
1010
5

src/test/ui/existential_types/auxiliary/cross_crate_ice2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#![crate_type="rlib"]
44

5-
#![feature(existential_type)]
5+
#![feature(type_alias_impl_trait)]
66

77
pub trait View {
88
type Tmp: Iterator<Item = u32>;
@@ -13,7 +13,7 @@ pub trait View {
1313
pub struct X;
1414

1515
impl View for X {
16-
existential type Tmp: Iterator<Item = u32>;
16+
type Tmp = impl Iterator<Item = u32>;
1717

1818
fn test(&self) -> Self::Tmp {
1919
vec![1,2,3].into_iter()

src/test/ui/existential_types/bound_reduction.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
#![allow(warnings)]
44

5-
#![feature(existential_type)]
5+
#![feature(type_alias_impl_trait)]
66

77
fn main() {
88
}
99

10-
existential type Foo<V>: std::fmt::Debug;
10+
type Foo<V> = impl std::fmt::Debug;
1111

1212
trait Trait<U> {}
1313

src/test/ui/existential_types/bound_reduction2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(existential_type)]
1+
#![feature(type_alias_impl_trait)]
22

33
fn main() {
44
}
@@ -7,7 +7,7 @@ trait TraitWithAssoc {
77
type Assoc;
88
}
99

10-
existential type Foo<V>: Trait<V>;
10+
type Foo<V> = impl Trait<V>;
1111
//~^ ERROR could not find defining uses
1212

1313
trait Trait<U> {}

src/test/ui/existential_types/bound_reduction2.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ LL | | }
99
error: could not find defining uses
1010
--> $DIR/bound_reduction2.rs:10:1
1111
|
12-
LL | existential type Foo<V>: Trait<V>;
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
LL | type Foo<V> = impl Trait<V>;
13+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

1515
error: aborting due to 2 previous errors
1616

0 commit comments

Comments
 (0)