From 65582933cff313f131c71515a4dd98237c9a73b8 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 9 Sep 2019 15:24:24 -0400 Subject: make all traits non-enumerable As discussed on Zulip, this actually matches the present behavior of rustc. --- crates/ra_hir/src/ty/traits/chalk.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/ty/traits/chalk.rs b/crates/ra_hir/src/ty/traits/chalk.rs index 8a127efa1..e3fc362e1 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, @@ -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, -- cgit v1.2.3