Skip to content
Open
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
8 changes: 6 additions & 2 deletions core/type-checker/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,9 @@ pub enum TypeCheckError {
///
/// This occurs when `Type::method()` syntax is used for a method that requires `self`.
/// Use `instance.method()` instead.
#[error("{location}: instance method `{type_name}::{method_name}` requires a receiver, use `instance.{method_name}()` instead")]
#[error(
"{location}: instance method `{type_name}::{method_name}` requires a receiver, use `instance.{method_name}()` instead"
)]
InstanceMethodCalledAsAssociated {
type_name: String,
method_name: String,
Expand All @@ -410,7 +412,9 @@ pub enum TypeCheckError {
///
/// This occurs when `instance.function()` syntax is used for an associated function
/// that doesn't take `self`. Use `Type::function()` instead.
#[error("{location}: associated function `{type_name}::{method_name}` cannot be called on an instance, use `{type_name}::{method_name}()` instead")]
#[error(
"{location}: associated function `{type_name}::{method_name}` cannot be called on an instance, use `{type_name}::{method_name}()` instead"
)]
AssociatedFunctionCalledAsMethod {
type_name: String,
method_name: String,
Expand Down
Loading