E4039

E4039#

There is no method with the specified name in this trait.

Erroneous Example#

let a : String = Show::to_str(42)

The example above tries to call the method to_str on the Show trait, but the method is not defined in the trait, giving the following error on line 1:

There is no method to_str in trait Show

Suggestion#

Make sure that the method name is spelled correctly and that it is defined in the trait:

let a : String = Show::to_string(42)