Skip to content

Commit 82bb6d5

Browse files
authored
Rollup merge of rust-lang#145896 - Oneirical:uncountable-integer-10, r=jieyouxu
Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [rust-lang#3 of Batch #2] Part of rust-lang#133895 Methodology: 1. Refer to the previously written `tests/ui/SUMMARY.md` 2. Find an appropriate category for the test, using the original issue thread and the test contents. 3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers) 4. Rename the tests to make their purpose clearer Inspired by the methodology that `@Kivooeo` was using. r? `@jieyouxu`
2 parents 5b37a1e + 957fa10 commit 82bb6d5

File tree

54 files changed

+104
-57
lines changed

Some content is hidden

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

54 files changed

+104
-57
lines changed

tests/ui/issues/issue-56806.rs renamed to tests/ui/abi/invalid-self-parameter-type-56806.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/56806
12
pub trait Trait {
23
fn dyn_instead_of_self(self: Box<dyn Trait>);
34
//~^ ERROR invalid `self` parameter type

tests/ui/issues/issue-56806.stderr renamed to tests/ui/abi/invalid-self-parameter-type-56806.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0307]: invalid `self` parameter type: `Box<(dyn Trait + 'static)>`
2-
--> $DIR/issue-56806.rs:2:34
2+
--> $DIR/invalid-self-parameter-type-56806.rs:3:34
33
|
44
LL | fn dyn_instead_of_self(self: Box<dyn Trait>);
55
| ^^^^^^^^^^^^^^

tests/ui/issues/issue-56870.rs renamed to tests/ui/associated-consts/traits-associated-consts-ice-56870.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/56870
12
//@ build-pass
23
// Regression test for #56870: Internal compiler error (traits & associated consts)
34

tests/ui/issues/issue-59326.rs renamed to tests/ui/associated-types/duplicate-associated-type-resolution-59326.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/59326
12
//@ check-pass
23
trait Service {
34
type S;

tests/ui/issues/issue-57399-self-return-impl-trait.rs renamed to tests/ui/associated-types/impl-trait-member-type-resolution-57399.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/57399
12
//@ check-pass
23

34
trait T {
@@ -12,7 +13,6 @@ struct S<A> {
1213
a: A,
1314
}
1415

15-
1616
impl From<u32> for S<<i32 as T>::T> {
1717
fn from(a: u32) -> Self {
1818
Self { a }

tests/ui/issues/issue-59488.rs renamed to tests/ui/binop/function-comparison-errors-59488.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/59488
12
fn foo() -> i32 {
23
42
34
}

tests/ui/issues/issue-59488.stderr renamed to tests/ui/binop/function-comparison-errors-59488.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
2-
--> $DIR/issue-59488.rs:14:9
2+
--> $DIR/function-comparison-errors-59488.rs:15:9
33
|
44
LL | foo > 12;
55
| --- ^ -- {integer}
@@ -12,7 +12,7 @@ LL | foo() > 12;
1212
| ++
1313

1414
error[E0308]: mismatched types
15-
--> $DIR/issue-59488.rs:14:11
15+
--> $DIR/function-comparison-errors-59488.rs:15:11
1616
|
1717
LL | foo > 12;
1818
| ^^ expected fn item, found `i32`
@@ -21,7 +21,7 @@ LL | foo > 12;
2121
found type `i32`
2222

2323
error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}`
24-
--> $DIR/issue-59488.rs:18:9
24+
--> $DIR/function-comparison-errors-59488.rs:19:9
2525
|
2626
LL | bar > 13;
2727
| --- ^ -- {integer}
@@ -34,7 +34,7 @@ LL | bar(/* i64 */) > 13;
3434
| +++++++++++
3535

3636
error[E0308]: mismatched types
37-
--> $DIR/issue-59488.rs:18:11
37+
--> $DIR/function-comparison-errors-59488.rs:19:11
3838
|
3939
LL | bar > 13;
4040
| ^^ expected fn item, found `i64`
@@ -43,7 +43,7 @@ LL | bar > 13;
4343
found type `i64`
4444

4545
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
46-
--> $DIR/issue-59488.rs:22:9
46+
--> $DIR/function-comparison-errors-59488.rs:23:9
4747
|
4848
LL | foo > foo;
4949
| --- ^ --- fn() -> i32 {foo}
@@ -56,15 +56,15 @@ LL | foo() > foo();
5656
| ++ ++
5757

5858
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
59-
--> $DIR/issue-59488.rs:25:9
59+
--> $DIR/function-comparison-errors-59488.rs:26:9
6060
|
6161
LL | foo > bar;
6262
| --- ^ --- fn(i64) -> i64 {bar}
6363
| |
6464
| fn() -> i32 {foo}
6565

6666
error[E0308]: mismatched types
67-
--> $DIR/issue-59488.rs:25:11
67+
--> $DIR/function-comparison-errors-59488.rs:26:11
6868
|
6969
LL | foo > bar;
7070
| ^^^ expected fn item, found a different fn item
@@ -73,7 +73,7 @@ LL | foo > bar;
7373
found fn item `fn(i64) -> i64 {bar}`
7474

7575
error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}`
76-
--> $DIR/issue-59488.rs:30:5
76+
--> $DIR/function-comparison-errors-59488.rs:31:5
7777
|
7878
LL | assert_eq!(Foo::Bar, i);
7979
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -84,15 +84,15 @@ LL | assert_eq!(Foo::Bar, i);
8484
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
8585

8686
error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
87-
--> $DIR/issue-59488.rs:30:5
87+
--> $DIR/function-comparison-errors-59488.rs:31:5
8888
|
8989
LL | assert_eq!(Foo::Bar, i);
9090
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
9191
|
9292
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
9393

9494
error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
95-
--> $DIR/issue-59488.rs:30:5
95+
--> $DIR/function-comparison-errors-59488.rs:31:5
9696
|
9797
LL | assert_eq!(Foo::Bar, i);
9898
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`

tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741-1.rs renamed to tests/ui/box/boxed-value-matching-57741.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/57741
12
#![allow(warnings)]
23

34
// This tests that the `help: consider dereferencing the boxed value` suggestion isn't made

tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741-1.stderr renamed to tests/ui/box/boxed-value-matching-57741.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/issue-57741-1.rs:14:9
2+
--> $DIR/boxed-value-matching-57741.rs:15:9
33
|
44
LL | let y = match x {
55
| - this expression has type `Box<u32>`
@@ -10,7 +10,7 @@ LL | S::A { a } | S::B { b: a } => a,
1010
found enum `S`
1111

1212
error[E0308]: mismatched types
13-
--> $DIR/issue-57741-1.rs:14:22
13+
--> $DIR/boxed-value-matching-57741.rs:15:22
1414
|
1515
LL | let y = match x {
1616
| - this expression has type `Box<u32>`

tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.fixed renamed to tests/ui/box/dereferencing-boxed-enum-in-match-57741.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/57741
12
//@ run-rustfix
23

34
#![allow(warnings)]

0 commit comments

Comments
 (0)