Skip to content

Commit c4fa0d5

Browse files
Rollup merge of rust-lang#156082 - danieljofficial:move-tests-associated-types, r=petrochenkov
Move tests associated types Hi, I have moved some ui tests I feel belong in the associated types folder
2 parents 47b5379 + 4cca528 commit c4fa0d5

30 files changed

Lines changed: 52 additions & 8 deletions

tests/ui/issues/issue-23073.rs renamed to tests/ui/associated-types/ambiguous-associated-type-default.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/23073
2+
13
#![feature(associated_type_defaults)]
24

35
trait Foo { type T; }

tests/ui/issues/issue-23073.stderr renamed to tests/ui/associated-types/ambiguous-associated-type-default.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0223]: ambiguous associated type
2-
--> $DIR/issue-23073.rs:6:17
2+
--> $DIR/ambiguous-associated-type-default.rs:8:17
33
|
44
LL | type FooT = <<Self as Bar>::Foo>::T;
55
| ^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/issues/issue-20803.rs renamed to tests/ui/associated-types/assoc-type-add-output-via-operator-syntax.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/20803
2+
13
//@ run-pass
24
use std::ops::Add;
35

tests/ui/issues/issue-37051.rs renamed to tests/ui/associated-types/assoc-type-default-without-override-in-impl.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/37051
2+
13
//@ check-pass
24

35
#![feature(associated_type_defaults)]

tests/ui/issues/issue-39970.rs renamed to tests/ui/associated-types/assoc-type-element-mismatch-in-hrtb.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/39970
2+
13
trait Array<'a> {
24
type Element: 'a;
35
}

tests/ui/issues/issue-39970.stderr renamed to tests/ui/associated-types/assoc-type-element-mismatch-in-hrtb.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error[E0271]: type mismatch resolving `<() as Array<'a>>::Element == ()`
2-
--> $DIR/issue-39970.rs:19:6
2+
--> $DIR/assoc-type-element-mismatch-in-hrtb.rs:21:6
33
|
44
LL | <() as Visit>::visit();
55
| ^^ type mismatch resolving `<() as Array<'a>>::Element == ()`
66
|
77
note: expected this to be `()`
8-
--> $DIR/issue-39970.rs:10:20
8+
--> $DIR/assoc-type-element-mismatch-in-hrtb.rs:12:20
99
|
1010
LL | type Element = &'a ();
1111
| ^^^^^^
1212
note: required for `()` to implement `Visit`
13-
--> $DIR/issue-39970.rs:13:6
13+
--> $DIR/assoc-type-element-mismatch-in-hrtb.rs:15:6
1414
|
1515
LL | impl Visit for () where
1616
| ^^^^^ ^^

tests/ui/issues/issue-28983.rs renamed to tests/ui/associated-types/assoc-type-in-extern-fn-signature.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/28983
2+
13
//@ run-pass
24
pub trait Test { type T; }
35

tests/ui/issues/issue-19632.rs renamed to tests/ui/associated-types/assoc-type-in-generic-struct-bound.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/19632
2+
13
//@ check-pass
24
#![allow(dead_code)]
35

tests/ui/issues/issue-20797.rs renamed to tests/ui/associated-types/assoc-type-in-strategy-pattern-iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ build-pass
22

3-
// Regression test for #20797.
3+
// Regression test for https://github.com/rust-lang/rust/issues/20797
44

55
use std::default::Default;
66
use std::io;

tests/ui/issues/issue-26127.rs renamed to tests/ui/associated-types/assoc-type-in-struct-constructor.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/26127
2+
13
//@ run-pass
24
trait Tr { type T; }
35
impl Tr for u8 { type T=(); }

0 commit comments

Comments
 (0)