Skip to content

E0283 error without location information #105131

Closed
@jorendorff

Description

@jorendorff

Given the following code: (playground)

pub trait Gen<'source> {
    type Output;

    fn gen<T>(&self) -> T
    where
        Self: for<'s> Gen<'s, Output = T>;
}

The current output is:

error[[E0283]](https://doc.rust-lang.org/nightly/error-index.html#E0283): type annotations needed: cannot satisfy `Self: Gen<'source>`
  |
  = note: cannot satisfy `Self: Gen<'source>`

For more information about this error, try `rustc --explain E0283`.
error: could not compile `playground` due to previous error

The error doesn't contain any location information (filename, line number, spans). The location of fn gen or the bad Self: bound should be included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions