Skip to content

Commit

Permalink
Fix some tests to *only* test their main issue and not have secondary…
Browse files Browse the repository at this point in the history
… failures
  • Loading branch information
oli-obk committed Jul 5, 2023
1 parent 97d831d commit 9cacfae
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// FIXME This should compile, but it currently doesn't

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

pub fn foo() -> Foo {
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`
--> $DIR/auto-trait-leakage3.rs:7:16
--> $DIR/auto-trait-leakage3.rs:7:20
|
LL | type Foo = impl std::fmt::Debug;
| ^^^^^^^^^^^^^^^^^^^^
LL | pub type Foo = impl std::fmt::Debug;
| ^^^^^^^^^^^^^^^^^^^^
|
note: ...which requires type-checking `m::bar`...
--> $DIR/auto-trait-leakage3.rs:15:9
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/type-alias-impl-trait/inference-cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#![allow(dead_code)]

mod m {
type Foo = impl std::fmt::Debug;
pub type Foo = impl std::fmt::Debug;
//~^ ERROR cycle detected

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

fn baz() {
let f: Foo = 22_u32;
let f: Foo = ();
}

fn is_send<T: Send>(_: T) {}
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/type-alias-impl-trait/inference-cycle.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`
--> $DIR/inference-cycle.rs:5:16
--> $DIR/inference-cycle.rs:5:20
|
LL | type Foo = impl std::fmt::Debug;
| ^^^^^^^^^^^^^^^^^^^^
LL | pub type Foo = impl std::fmt::Debug;
| ^^^^^^^^^^^^^^^^^^^^
|
note: ...which requires type-checking `m::bar`...
--> $DIR/inference-cycle.rs:15:9
Expand Down

0 comments on commit 9cacfae

Please sign in to comment.