From 3f4ad44082abe7256825f6fc692c1455a1eb28bb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 14 Jun 2021 22:55:05 +0300 Subject: internal: document that we don't #[ignore] tests --- crates/hir_ty/src/tests/coercion.rs | 35 ++++++++++++++++++++++++++--------- crates/hir_ty/src/tests/traits.rs | 1 - 2 files changed, 26 insertions(+), 10 deletions(-) (limited to 'crates/hir_ty') diff --git a/crates/hir_ty/src/tests/coercion.rs b/crates/hir_ty/src/tests/coercion.rs index 71047703d..4f859fc85 100644 --- a/crates/hir_ty/src/tests/coercion.rs +++ b/crates/hir_ty/src/tests/coercion.rs @@ -741,10 +741,24 @@ fn coerce_unsize_trait_object_simple() { } #[test] -// The rust reference says this should be possible, but rustc doesn't implement -// it. We used to support it, but Chalk doesn't. -#[ignore] fn coerce_unsize_trait_object_to_trait_object() { + // FIXME: The rust reference says this should be possible, but rustc doesn't + // implement it. We used to support it, but Chalk doesn't. Here's the + // correct expect: + // + // 424..609 '{ ...bj2; }': () + // 434..437 'obj': &dyn Baz + // 459..461 '&S': &S + // 460..461 'S': S + // 471..474 'obj': &dyn Bar + // 496..499 'obj': &dyn Baz + // 509..512 'obj': &dyn Foo + // 531..534 'obj': &dyn Bar + // 544..548 'obj2': &dyn Baz + // 570..572 '&S': &S + // 571..572 'S': S + // 582..583 '_': &dyn Foo + // 602..606 'obj2': &dyn Baz check_infer_with_mismatches( r#" #[lang = "sized"] @@ -773,21 +787,24 @@ fn coerce_unsize_trait_object_to_trait_object() { let _: &dyn Foo<_, _> = obj2; } "#, - expect![[r" + expect![[r#" 424..609 '{ ...bj2; }': () 434..437 'obj': &dyn Baz 459..461 '&S': &S 460..461 'S': S - 471..474 'obj': &dyn Bar + 471..474 'obj': &dyn Bar<{unknown}, {unknown}, {unknown}> 496..499 'obj': &dyn Baz - 509..512 'obj': &dyn Foo - 531..534 'obj': &dyn Bar + 509..512 'obj': &dyn Foo<{unknown}, {unknown}> + 531..534 'obj': &dyn Bar<{unknown}, {unknown}, {unknown}> 544..548 'obj2': &dyn Baz 570..572 '&S': &S 571..572 'S': S - 582..583 '_': &dyn Foo + 582..583 '_': &dyn Foo<{unknown}, {unknown}> 602..606 'obj2': &dyn Baz - "]], + 496..499: expected &dyn Bar<{unknown}, {unknown}, {unknown}>, got &dyn Baz + 531..534: expected &dyn Foo<{unknown}, {unknown}>, got &dyn Bar<{unknown}, {unknown}, {unknown}> + 602..606: expected &dyn Foo<{unknown}, {unknown}>, got &dyn Baz + "#]], ); } diff --git a/crates/hir_ty/src/tests/traits.rs b/crates/hir_ty/src/tests/traits.rs index 6bcede4c4..c830e576e 100644 --- a/crates/hir_ty/src/tests/traits.rs +++ b/crates/hir_ty/src/tests/traits.rs @@ -1475,7 +1475,6 @@ fn test( } #[test] -#[ignore] fn error_bound_chalk() { check_types( r#" -- cgit v1.2.3