Skip to content

Be more informative with object-unsafe supertraits #19538

Closed
@emberian

Description

@emberian

Currently, we say:

foo.rs:14:22: 14:32 error: cannot convert to a trait object because trait `Foo` is not object-safe [E0038]
foo.rs:14     let test: &Bar = &mut thing;
                               ^~~~~~~~~~
note: cannot call a generic method (`foo`) through a trait object

But we should include the information that it's Bar that is not object-safe, because Foo is not and it inherits from Foo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions