diff --git a/crates/red_knot_python_semantic/src/types.rs b/crates/red_knot_python_semantic/src/types.rs index e24d2bdc96558..92921eaa11af7 100644 --- a/crates/red_knot_python_semantic/src/types.rs +++ b/crates/red_knot_python_semantic/src/types.rs @@ -737,7 +737,7 @@ impl<'db> Type<'db> { Type::IntLiteral(_) | Type::BooleanLiteral(_) => self.repr(db), Type::StringLiteral(_) | Type::LiteralString => *self, // TODO: handle more complex types - _ => builtins_symbol_ty(db, "str").to_instance(db), + _ => Type::builtin_str(db).to_instance(db), } } @@ -760,7 +760,7 @@ impl<'db> Type<'db> { })), Type::LiteralString => Type::LiteralString, // TODO: handle more complex types - _ => builtins_symbol_ty(db, "str").to_instance(db), + _ => Type::builtin_str(db).to_instance(db), } } } diff --git a/crates/red_knot_python_semantic/src/types/display.rs b/crates/red_knot_python_semantic/src/types/display.rs index a2ee5da454a1a..3d037fe658106 100644 --- a/crates/red_knot_python_semantic/src/types/display.rs +++ b/crates/red_knot_python_semantic/src/types/display.rs @@ -54,7 +54,7 @@ impl fmt::Debug for DisplayType<'_> { /// Writes the string representation of a type, which is the value displayed either as /// `Literal[]` or `Literal[, ]` for literal types or as `` for /// non literals -pub(super) struct DisplayRepresentation<'db> { +struct DisplayRepresentation<'db> { ty: Type<'db>, db: &'db dyn Db, }