mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-15 14:43:58 +00:00
make all traits non-enumerable
As discussed on Zulip, this actually matches the present behavior of rustc.
This commit is contained in:
parent
7258523a51
commit
65582933cf
1 changed files with 1 additions and 9 deletions
|
@ -356,14 +356,6 @@ fn make_binders<T>(value: T, num_vars: usize) -> chalk_ir::Binders<T> {
|
|||
}
|
||||
}
|
||||
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue