diff options
Diffstat (limited to 'crates/ra_hir_ty/src/tests')
-rw-r--r-- | crates/ra_hir_ty/src/tests/traits.rs | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/crates/ra_hir_ty/src/tests/traits.rs b/crates/ra_hir_ty/src/tests/traits.rs index bae5eae07..134cea8d8 100644 --- a/crates/ra_hir_ty/src/tests/traits.rs +++ b/crates/ra_hir_ty/src/tests/traits.rs | |||
@@ -1,7 +1,6 @@ | |||
1 | use insta::assert_snapshot; | 1 | use insta::assert_snapshot; |
2 | 2 | ||
3 | use ra_db::fixture::WithFixture; | 3 | use ra_db::fixture::WithFixture; |
4 | use test_utils::covers; | ||
5 | 4 | ||
6 | use super::{infer, infer_with_mismatches, type_at, type_at_pos}; | 5 | use super::{infer, infer_with_mismatches, type_at, type_at_pos}; |
7 | use crate::test_db::TestDB; | 6 | use crate::test_db::TestDB; |
@@ -1650,7 +1649,6 @@ fn test<T, U>() where T: Trait<U::Item>, U: Trait<T::Item> { | |||
1650 | 1649 | ||
1651 | #[test] | 1650 | #[test] |
1652 | fn unify_impl_trait() { | 1651 | fn unify_impl_trait() { |
1653 | covers!(insert_vars_for_impl_trait); | ||
1654 | assert_snapshot!( | 1652 | assert_snapshot!( |
1655 | infer_with_mismatches(r#" | 1653 | infer_with_mismatches(r#" |
1656 | trait Trait<T> {} | 1654 | trait Trait<T> {} |
@@ -1682,26 +1680,26 @@ fn test() -> impl Trait<i32> { | |||
1682 | [172; 183) '{ loop {} }': T | 1680 | [172; 183) '{ loop {} }': T |
1683 | [174; 181) 'loop {}': ! | 1681 | [174; 181) 'loop {}': ! |
1684 | [179; 181) '{}': () | 1682 | [179; 181) '{}': () |
1685 | [214; 310) '{ ...t()) }': S<i32> | 1683 | [214; 310) '{ ...t()) }': S<{unknown}> |
1686 | [224; 226) 's1': S<u32> | 1684 | [224; 226) 's1': S<u32> |
1687 | [229; 230) 'S': S<u32>(T) -> S<T> | 1685 | [229; 230) 'S': S<u32>(u32) -> S<u32> |
1688 | [229; 241) 'S(default())': S<u32> | 1686 | [229; 241) 'S(default())': S<u32> |
1689 | [231; 238) 'default': fn default<u32>() -> T | 1687 | [231; 238) 'default': fn default<u32>() -> u32 |
1690 | [231; 240) 'default()': u32 | 1688 | [231; 240) 'default()': u32 |
1691 | [247; 250) 'foo': fn foo(impl Trait<u32>) -> () | 1689 | [247; 250) 'foo': fn foo<S<u32>>(S<u32>) -> () |
1692 | [247; 254) 'foo(s1)': () | 1690 | [247; 254) 'foo(s1)': () |
1693 | [251; 253) 's1': S<u32> | 1691 | [251; 253) 's1': S<u32> |
1694 | [264; 265) 'x': i32 | 1692 | [264; 265) 'x': i32 |
1695 | [273; 276) 'bar': fn bar<i32>(impl Trait<T>) -> T | 1693 | [273; 276) 'bar': fn bar<i32, S<i32>>(S<i32>) -> i32 |
1696 | [273; 290) 'bar(S(...lt()))': i32 | 1694 | [273; 290) 'bar(S(...lt()))': i32 |
1697 | [277; 278) 'S': S<i32>(T) -> S<T> | 1695 | [277; 278) 'S': S<i32>(i32) -> S<i32> |
1698 | [277; 289) 'S(default())': S<i32> | 1696 | [277; 289) 'S(default())': S<i32> |
1699 | [279; 286) 'default': fn default<i32>() -> T | 1697 | [279; 286) 'default': fn default<i32>() -> i32 |
1700 | [279; 288) 'default()': i32 | 1698 | [279; 288) 'default()': i32 |
1701 | [296; 297) 'S': S<i32>(T) -> S<T> | 1699 | [296; 297) 'S': S<{unknown}>({unknown}) -> S<{unknown}> |
1702 | [296; 308) 'S(default())': S<i32> | 1700 | [296; 308) 'S(default())': S<{unknown}> |
1703 | [298; 305) 'default': fn default<i32>() -> T | 1701 | [298; 305) 'default': fn default<{unknown}>() -> {unknown} |
1704 | [298; 307) 'default()': i32 | 1702 | [298; 307) 'default()': {unknown} |
1705 | "### | 1703 | "### |
1706 | ); | 1704 | ); |
1707 | } | 1705 | } |