Skip to content

Commit 9cacfae

Browse files
committed
Fix some tests to *only* test their main issue and not have secondary failures
1 parent 97d831d commit 9cacfae

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// FIXME This should compile, but it currently doesn't
55

66
mod m {
7-
type Foo = impl std::fmt::Debug;
7+
pub type Foo = impl std::fmt::Debug;
88
//~^ ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391]
99

1010
pub fn foo() -> Foo {

tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`
2-
--> $DIR/auto-trait-leakage3.rs:7:16
2+
--> $DIR/auto-trait-leakage3.rs:7:20
33
|
4-
LL | type Foo = impl std::fmt::Debug;
5-
| ^^^^^^^^^^^^^^^^^^^^
4+
LL | pub type Foo = impl std::fmt::Debug;
5+
| ^^^^^^^^^^^^^^^^^^^^
66
|
77
note: ...which requires type-checking `m::bar`...
88
--> $DIR/auto-trait-leakage3.rs:15:9

tests/ui/type-alias-impl-trait/inference-cycle.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(dead_code)]
33

44
mod m {
5-
type Foo = impl std::fmt::Debug;
5+
pub type Foo = impl std::fmt::Debug;
66
//~^ ERROR cycle detected
77

88
// Cycle: error today, but it'd be nice if it eventually worked
@@ -16,7 +16,7 @@ mod m {
1616
}
1717

1818
fn baz() {
19-
let f: Foo = 22_u32;
19+
let f: Foo = ();
2020
}
2121

2222
fn is_send<T: Send>(_: T) {}

tests/ui/type-alias-impl-trait/inference-cycle.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`
2-
--> $DIR/inference-cycle.rs:5:16
2+
--> $DIR/inference-cycle.rs:5:20
33
|
4-
LL | type Foo = impl std::fmt::Debug;
5-
| ^^^^^^^^^^^^^^^^^^^^
4+
LL | pub type Foo = impl std::fmt::Debug;
5+
| ^^^^^^^^^^^^^^^^^^^^
66
|
77
note: ...which requires type-checking `m::bar`...
88
--> $DIR/inference-cycle.rs:15:9

0 commit comments

Comments
 (0)