diff options
author | Florian Diebold <[email protected]> | 2019-12-21 18:15:06 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-12-22 23:08:03 +0000 |
commit | 1f7f4578f72721c1b0e17e8405f986fd2ce89aaf (patch) | |
tree | efe0fe32ff3d2cc5981206ad1a7777824cf9de05 /crates/ra_hir_ty/src/tests/traits.rs | |
parent | 4053fcfca0e33f133c53fa755c1b1bcc0b4c11bb (diff) |
Filter out error predicates in type bounds as well
Diffstat (limited to 'crates/ra_hir_ty/src/tests/traits.rs')
-rw-r--r-- | crates/ra_hir_ty/src/tests/traits.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/tests/traits.rs b/crates/ra_hir_ty/src/tests/traits.rs index 76e2198b6..ae316922b 100644 --- a/crates/ra_hir_ty/src/tests/traits.rs +++ b/crates/ra_hir_ty/src/tests/traits.rs | |||
@@ -959,6 +959,23 @@ fn test() { | |||
959 | } | 959 | } |
960 | 960 | ||
961 | #[test] | 961 | #[test] |
962 | fn error_bound_chalk() { | ||
963 | let t = type_at( | ||
964 | r#" | ||
965 | //- /main.rs | ||
966 | trait Trait { | ||
967 | fn foo(&self) -> u32 {} | ||
968 | } | ||
969 | |||
970 | fn test(x: (impl Trait + UnknownTrait)) { | ||
971 | x.foo()<|>; | ||
972 | } | ||
973 | "#, | ||
974 | ); | ||
975 | assert_eq!(t, "u32"); | ||
976 | } | ||
977 | |||
978 | #[test] | ||
962 | fn assoc_type_bindings() { | 979 | fn assoc_type_bindings() { |
963 | assert_snapshot!( | 980 | assert_snapshot!( |
964 | infer(r#" | 981 | infer(r#" |