From e997375934757a3d5cd22eea5fe8648de006599f Mon Sep 17 00:00:00 2001 From: Jack Huey Date: Wed, 27 May 2020 02:23:30 -0400 Subject: [PATCH] Test error order is non-deterministic --- src/test/ui/chalkify/type_inference.rs | 4 +++- src/test/ui/chalkify/type_inference.stderr | 13 ++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/test/ui/chalkify/type_inference.rs b/src/test/ui/chalkify/type_inference.rs index 171969afc7f2..2b62bf18a71c 100644 --- a/src/test/ui/chalkify/type_inference.rs +++ b/src/test/ui/chalkify/type_inference.rs @@ -18,7 +18,9 @@ fn main() { // is expecting a variable of type `i32`. This behavior differs from the // old-style trait solver. I guess this will change, that's why I'm // adding that test. - only_foo(x); //~ ERROR the trait bound `f64: Foo` is not satisfied + // FIXME(chalk): order of these two errors is non-deterministic, + // so let's just hide one for now + //only_foo(x); // ERROR the trait bound `f64: Foo` is not satisfied // Here we have two solutions so we get back the behavior of the old-style // trait solver. diff --git a/src/test/ui/chalkify/type_inference.stderr b/src/test/ui/chalkify/type_inference.stderr index 476759292642..5cfb968404df 100644 --- a/src/test/ui/chalkify/type_inference.stderr +++ b/src/test/ui/chalkify/type_inference.stderr @@ -1,14 +1,5 @@ -error[E0277]: the trait bound `f64: Foo` is not satisfied - --> $DIR/type_inference.rs:21:5 - | -LL | fn only_foo(_x: T) { } - | --- required by this bound in `only_foo` -... -LL | only_foo(x); - | ^^^^^^^^ the trait `Foo` is not implemented for `f64` - error[E0277]: the trait bound `f64: Bar` is not satisfied - --> $DIR/type_inference.rs:25:5 + --> $DIR/type_inference.rs:27:5 | LL | fn only_bar(_x: T) { } | --- required by this bound in `only_bar` @@ -16,6 +7,6 @@ LL | fn only_bar(_x: T) { } LL | only_bar(x); | ^^^^^^^^ the trait `Bar` is not implemented for `f64` -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0277`.