Skip to content

Commit 22a7457

Browse files
committed
Cleaned up some tests
Merged tests/ui/typeck/non-function-call-error-2 with tests/ui/typeck/non-function-call-error Add comment to tests/ui/traits/normalize-associated-type-in-where-clause.rs Merged tests/ui/privacy/private-item-simple-2.rs with tests/ui/privacy/private-item-simple.rs Merged tests/ui/str/str-add-operator-2.rs with tests/ui/str/str-add-operator.rs Add comment to tests/ui/imports/duplicate-empty-imports.rs Add comment to tests/ui/for-loop-while/nested-loop-break-unit.rs Add comment to tests/ui/match/match-ref-option-pattern.rs Add comment to tests/ui/closures/simple-capture-and-call.rs Add comment to tests/ui/type/never-type-inference-fail.rs Add comment to tests/ui/match/match-stack-overflow-72933.rs
1 parent c2e43ff commit 22a7457

20 files changed

+77
-99
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
//! regression test for issue #1895
12
//@ run-pass
23

3-
pub fn main() {
4-
let x = 1_usize;
5-
let y = || x;
6-
let _z = y();
4+
fn main() {
5+
let x = 1_usize;
6+
let y = || x;
7+
let _z = y();
78
}

tests/ui/for-loop-while/nested-loop-break-unit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! regression test for issue #2642
12
//@ run-pass
23
#![allow(dead_code)]
34

tests/ui/imports/duplicate-empty-imports.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! regression test for issue #47673
12
//@ check-pass
23
#![allow(unused_imports)]
34

tests/ui/match/match-ref-option-pattern.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! regression test for issue #3500
12
//@ run-pass
23

34
pub fn main() {

tests/ui/match/match-stack-overflow-72933-.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
//! regression test for issue #72933
12
//@ build-pass
23
// ignore-tidy-filelength
3-
#![crate_type="rlib"]
4+
#![crate_type = "rlib"]
45

56
fn banana(v: &str) -> u32 {
67
match v {

tests/ui/privacy/private-item-simple-2.rs

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/ui/privacy/private-item-simple-2.stderr

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
//! regression test for issue #3993
2+
13
mod a {
24
fn f() {}
35
}
46

57
fn main() {
68
a::f(); //~ ERROR function `f` is private
79
}
10+
11+
fn foo() {
12+
use a::f; //~ ERROR function `f` is private
13+
}
Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
error[E0603]: function `f` is private
2-
--> $DIR/private-item-simple.rs:6:8
2+
--> $DIR/private-item-simple.rs:12:12
3+
|
4+
LL | use a::f;
5+
| ^ private function
6+
|
7+
note: the function `f` is defined here
8+
--> $DIR/private-item-simple.rs:4:5
9+
|
10+
LL | fn f() {}
11+
| ^^^^^^
12+
13+
error[E0603]: function `f` is private
14+
--> $DIR/private-item-simple.rs:8:8
315
|
416
LL | a::f();
517
| ^ private function
618
|
719
note: the function `f` is defined here
8-
--> $DIR/private-item-simple.rs:2:5
20+
--> $DIR/private-item-simple.rs:4:5
921
|
1022
LL | fn f() {}
1123
| ^^^^^^
1224

13-
error: aborting due to 1 previous error
25+
error: aborting due to 2 previous errors
1426

1527
For more information about this error, try `rustc --explain E0603`.

tests/ui/str/str-add-operator-2.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)