aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-15 09:48:15 +0100
committerGitHub <[email protected]>2021-06-15 09:48:15 +0100
commitfa4c851619f245b2fdd2bf9b135d5ecf5efb4bc7 (patch)
tree6543766c6134b5cbca4b0da48a2e09c32714a340 /crates/hir_ty/src
parent7d363755a27f3bc89a5c7f5d15c8664299436bb4 (diff)
parent3f4ad44082abe7256825f6fc692c1455a1eb28bb (diff)
Merge #9278
9278: internal: document that we don't #[ignore] tests r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/hir_ty/src')
-rw-r--r--crates/hir_ty/src/tests/coercion.rs35
-rw-r--r--crates/hir_ty/src/tests/traits.rs1
2 files changed, 26 insertions, 10 deletions
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() {
741} 741}
742 742
743#[test] 743#[test]
744// The rust reference says this should be possible, but rustc doesn't implement
745// it. We used to support it, but Chalk doesn't.
746#[ignore]
747fn coerce_unsize_trait_object_to_trait_object() { 744fn coerce_unsize_trait_object_to_trait_object() {
745 // FIXME: The rust reference says this should be possible, but rustc doesn't
746 // implement it. We used to support it, but Chalk doesn't. Here's the
747 // correct expect:
748 //
749 // 424..609 '{ ...bj2; }': ()
750 // 434..437 'obj': &dyn Baz<i8, i16>
751 // 459..461 '&S': &S<i8, i16>
752 // 460..461 'S': S<i8, i16>
753 // 471..474 'obj': &dyn Bar<usize, i8, i16>
754 // 496..499 'obj': &dyn Baz<i8, i16>
755 // 509..512 'obj': &dyn Foo<i8, usize>
756 // 531..534 'obj': &dyn Bar<usize, i8, i16>
757 // 544..548 'obj2': &dyn Baz<i8, i16>
758 // 570..572 '&S': &S<i8, i16>
759 // 571..572 'S': S<i8, i16>
760 // 582..583 '_': &dyn Foo<i8, usize>
761 // 602..606 'obj2': &dyn Baz<i8, i16>
748 check_infer_with_mismatches( 762 check_infer_with_mismatches(
749 r#" 763 r#"
750 #[lang = "sized"] 764 #[lang = "sized"]
@@ -773,21 +787,24 @@ fn coerce_unsize_trait_object_to_trait_object() {
773 let _: &dyn Foo<_, _> = obj2; 787 let _: &dyn Foo<_, _> = obj2;
774 } 788 }
775 "#, 789 "#,
776 expect![[r" 790 expect![[r#"
777 424..609 '{ ...bj2; }': () 791 424..609 '{ ...bj2; }': ()
778 434..437 'obj': &dyn Baz<i8, i16> 792 434..437 'obj': &dyn Baz<i8, i16>
779 459..461 '&S': &S<i8, i16> 793 459..461 '&S': &S<i8, i16>
780 460..461 'S': S<i8, i16> 794 460..461 'S': S<i8, i16>
781 471..474 'obj': &dyn Bar<usize, i8, i16> 795 471..474 'obj': &dyn Bar<{unknown}, {unknown}, {unknown}>
782 496..499 'obj': &dyn Baz<i8, i16> 796 496..499 'obj': &dyn Baz<i8, i16>
783 509..512 'obj': &dyn Foo<i8, usize> 797 509..512 'obj': &dyn Foo<{unknown}, {unknown}>
784 531..534 'obj': &dyn Bar<usize, i8, i16> 798 531..534 'obj': &dyn Bar<{unknown}, {unknown}, {unknown}>
785 544..548 'obj2': &dyn Baz<i8, i16> 799 544..548 'obj2': &dyn Baz<i8, i16>
786 570..572 '&S': &S<i8, i16> 800 570..572 '&S': &S<i8, i16>
787 571..572 'S': S<i8, i16> 801 571..572 'S': S<i8, i16>
788 582..583 '_': &dyn Foo<i8, usize> 802 582..583 '_': &dyn Foo<{unknown}, {unknown}>
789 602..606 'obj2': &dyn Baz<i8, i16> 803 602..606 'obj2': &dyn Baz<i8, i16>
790 "]], 804 496..499: expected &dyn Bar<{unknown}, {unknown}, {unknown}>, got &dyn Baz<i8, i16>
805 531..534: expected &dyn Foo<{unknown}, {unknown}>, got &dyn Bar<{unknown}, {unknown}, {unknown}>
806 602..606: expected &dyn Foo<{unknown}, {unknown}>, got &dyn Baz<i8, i16>
807 "#]],
791 ); 808 );
792} 809}
793 810
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(
1475} 1475}
1476 1476
1477#[test] 1477#[test]
1478#[ignore]
1479fn error_bound_chalk() { 1478fn error_bound_chalk() {
1480 check_types( 1479 check_types(
1481 r#" 1480 r#"