From 1f7f4578f72721c1b0e17e8405f986fd2ce89aaf Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 21 Dec 2019 19:15:06 +0100 Subject: Filter out error predicates in type bounds as well --- crates/ra_hir_ty/src/tests/traits.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crates/ra_hir_ty/src/tests') 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 @@ -958,6 +958,23 @@ fn test() { ); } +#[test] +fn error_bound_chalk() { + let t = type_at( + r#" +//- /main.rs +trait Trait { + fn foo(&self) -> u32 {} +} + +fn test(x: (impl Trait + UnknownTrait)) { + x.foo()<|>; +} +"#, + ); + assert_eq!(t, "u32"); +} + #[test] fn assoc_type_bindings() { assert_snapshot!( -- cgit v1.2.3