diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index 25716fe8c1..2c7d94bce2 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs @@ -3007,7 +3007,7 @@ impl Into for T where U: From {} fn test() { S2.into()<|>; } "#, ); - assert_eq!(t, "S1"); + assert_eq!(t, "{unknown}"); } #[test] @@ -3024,7 +3024,7 @@ impl> Into for T {} fn test() { S2.into()<|>; } "#, ); - assert_eq!(t, "S1"); + assert_eq!(t, "{unknown}"); } #[test] @@ -3066,7 +3066,7 @@ impl Trait for S where C: FnX, B: SendX {} fn test() { (S {}).method()<|>; } "#, ); - assert_eq!(t, "{unknown}"); + assert_eq!(t, "()"); } #[test] @@ -3546,11 +3546,11 @@ fn test(x: Trait, y: &Trait) -> u64 { [129; 132) 'bar': fn bar() -> {unknown} [129; 134) 'bar()': {unknown} [140; 141) 'x': {unknown} - [140; 147) 'x.foo()': {unknown} + [140; 147) 'x.foo()': u64 [153; 154) 'y': &{unknown} - [153; 160) 'y.foo()': {unknown} + [153; 160) 'y.foo()': u64 [166; 167) 'z': {unknown} - [166; 173) 'z.foo()': {unknown} + [166; 173) 'z.foo()': u64 "### ); } diff --git a/crates/ra_hir/src/ty/traits/chalk.rs b/crates/ra_hir/src/ty/traits/chalk.rs index 8a127efa19..0367c65609 100644 --- a/crates/ra_hir/src/ty/traits/chalk.rs +++ b/crates/ra_hir/src/ty/traits/chalk.rs @@ -356,14 +356,6 @@ fn make_binders(value: T, num_vars: usize) -> chalk_ir::Binders { } } -fn is_non_enumerable_trait(db: &impl HirDatabase, trait_: Trait) -> bool { - let name = trait_.name(db).unwrap_or_else(crate::Name::missing).to_string(); - match &*name { - "Sized" => true, - _ => false, - } -} - fn convert_where_clauses( db: &impl HirDatabase, def: GenericDef, @@ -486,7 +478,7 @@ pub(crate) fn trait_datum_query( associated_ty_ids: Vec::new(), where_clauses: Vec::new(), flags: chalk_rust_ir::TraitFlags { - non_enumerable: false, + non_enumerable: true, auto: false, marker: false, upstream: true, @@ -503,7 +495,7 @@ pub(crate) fn trait_datum_query( let flags = chalk_rust_ir::TraitFlags { auto: trait_.is_auto(db), upstream: trait_.module(db).krate(db) != Some(krate), - non_enumerable: is_non_enumerable_trait(db, trait_), + non_enumerable: true, // FIXME set these flags correctly marker: false, fundamental: false,