Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/ty_python_semantic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pub mod pull_types;

type FxOrderSet<V> = ordermap::set::OrderSet<V, BuildHasherDefault<FxHasher>>;
type FxIndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<FxHasher>>;
type FxIndexSet<V> = indexmap::IndexSet<V, BuildHasherDefault<FxHasher>>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if some of our existing uses of FxOrderSet should actually be FxIndexSet, if we don't need the stronger equality and order-maintenance guarantees provided by the ordermap wrapper crate? Not something for this PR, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think an FxIndexSet is hashable, so I think we do need to use FxOrderSet for the fields on IntersectionType, for example. But yeah, it does look like a bunch of places are using an OrderSet right now when they probably only really need an IndexSet.


/// Returns the default registry with all known semantic lints.
pub fn default_lint_registry() -> &'static LintRegistry {
Expand Down
Loading
Loading