We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e30b7a commit 5ecfd1dCopy full SHA for 5ecfd1d
crates/ty_python_semantic/src/types/newtype.rs
@@ -22,6 +22,10 @@ use ruff_python_ast as ast;
22
/// - `typing.NewType`: `Type::ClassLiteral(ClassLiteral)` with `KnownClass::NewType`.
23
/// - `Foo`: `Type::KnownInstance(KnownInstanceType::NewType(NewType { .. }))`
24
/// - `x`: `Type::NewTypeInstance(NewType { .. })`
25
+///
26
+/// # Ordering
27
+/// Ordering is based on the newtype's salsa-assigned id and not on its values.
28
+/// The id may change between runs, or when the newtype was garbage collected and recreated.
29
#[salsa::interned(debug, heap_size=ruff_memory_usage::heap_size)]
30
#[derive(PartialOrd, Ord)]
31
pub struct NewType<'db> {
0 commit comments