Skip to content

spurious "error: parameter Self is never used" for trivial trait T {}` #22598

Closed
@cjsut

Description

@cjsut

Given the input

trait T {}

rustc will complain:

<anon>:2:1: 2:11 error: parameter `Self` is never used
<anon>:2 trait T {}
         ^~~~~~~~~~
<anon>:2:1: 2:11 help: consider removing `Self` or using a marker such as `core::marker::PhantomFn`
<anon>:2 trait T {}
         ^~~~~~~~~~

This may just be a diagnostics issue, but I'll let someone more familiar with Rust make that judgement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-trait-systemArea: Trait system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions