Skip to content

Commit b42d806

Browse files
committed
Cleaned up some tests
1 parent 92f21a8 commit b42d806

File tree

53 files changed

+125
-118
lines changed

Some content is hidden

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

53 files changed

+125
-118
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
//! regression test for issue https://github.com/rust-lang/rust/issues/46472
12
fn bar<'a>() -> &'a mut u32 {
23
&mut 4
34
//~^ ERROR cannot return reference to temporary value [E0515]
45
}
56

6-
fn main() { }
7+
fn main() {}

tests/ui/borrowck/return-ref-to-temporary.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0515]: cannot return reference to temporary value
2-
--> $DIR/issue-46472.rs:2:5
2+
--> $DIR/return-ref-to-temporary.rs:3:5
33
|
44
LL | &mut 4
55
| ^^^^^-

tests/ui/closures/closure-upvar-trait-caching.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
// reasonable examples) let to ambiguity errors about not being able
88
// to infer sufficient type information.
99

10-
1110
fn main() {
1211
let n = 0;
13-
let it = Some(1_usize).into_iter().inspect(|_| {n;});
12+
let it = Some(1_usize).into_iter().inspect(|_| {
13+
n;
14+
});
1415
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
//! regression test for https://github.com/rust-lang/rust/issues/24779
12
//@ run-pass
23
fn main() {
3-
assert_eq!((||||42)()(), 42);
4+
assert_eq!((|| || 42)()(), 42);
45
}

tests/ui/codegen/repeated-debug-opt-flags.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! regression test for https://github.com/rust-lang/rust/issues/24945
12
//@ run-pass
23
// This test is just checking that we continue to accept `-g -g -O -O`
34
// as options to the compiler.

tests/ui/enum/enum-variant-no-field.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
enum Foo { Bar }
1+
//! regression test for https://github.com/rust-lang/rust/issues/23253
2+
enum Foo {
3+
Bar,
4+
}
25

36
fn main() {
47
Foo::Bar.a;

tests/ui/enum/enum-variant-no-field.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0609]: no field `a` on type `Foo`
2-
--> $DIR/issue-23253.rs:4:14
2+
--> $DIR/enum-variant-no-field.rs:7:14
33
|
44
LL | Foo::Bar.a;
55
| ^ unknown field

tests/ui/enum/enum-with-uninhabited-variant.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
//! regression test for issue https://github.com/rust-lang/rust/issues/50442
12
//@ run-pass
23
#![allow(dead_code)]
34
enum Void {}
45

56
enum Foo {
67
A(i32),
78
B(Void),
8-
C(i32)
9+
C(i32),
910
}
1011

1112
fn main() {
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
//! regression test for https://github.com/rust-lang/rust/issues/18110
12
//@ run-pass
23
#![allow(unreachable_code)]
34

45
fn main() {
5-
({return},);
6+
({ return },);
67
}

tests/ui/extern/extern-rust-trait-method.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/19398
12
//@ check-pass
23

34
trait T {

0 commit comments

Comments
 (0)