New error message

This commit is contained in:
Adam
2025-11-20 18:13:15 -08:00
parent 548e0df1a1
commit 8376f2d40d
2 changed files with 51 additions and 46 deletions

View File

@@ -369,7 +369,7 @@ impl std::fmt::Debug for Type {
Self::Concrete(ty) => format!("Concrete<{}, {:?}>", ty.name, ty.id),
#[cfg(not(feature = "type_id_logging"))]
Self::Concrete(ty) => format_type(&ty.name),
Self::Fn(call_arg, return_value) => format!("{return_value:?} called with {call_arg:?}"),
Self::Fn(_, return_value) => format!("{return_value:?}"),
Self::Future(ty) => format!("{ty:?}"),
};
let result = result.replace("Option<Arc<OwnedContextImpl>>", "Context");
@@ -382,7 +382,7 @@ impl std::fmt::Display for Type {
let result = match self {
Type::Generic(name) => name.to_string(),
Type::Concrete(ty) => format_type(&ty.name),
Type::Fn(call_arg, return_value) => format!("{return_value} called with {call_arg}"),
Type::Fn(_, return_value) => format!("{return_value}"),
Type::Future(ty) => ty.to_string(),
};
let result = result.replace("Option<Arc<OwnedContextImpl>>", "Context");