Skip to content

E0211 can be triggered for different reasons #29248

@Manishearth

Description

@Manishearth

Both

#![feature(intrinsics)]

extern "rust-intrinsic" {
    fn size_of<T>(); // error: intrinsic has wrong type
}

and

use std::rc::Rc;
struct Foo;

impl Foo {
    fn x(self: Rc<Foo>) {} // (Only Box<Self>, &Self, Self, or &mut Self work as explicit self params)
}

trigger E0211. The error index only handles the first (https://doc.rust-lang.org/error-index.html#E0211)

We should expand the help text to mention all cases that can trigger this error.

cc @GuillaumeGomez @AlisdairO

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions