Skip to content

E0623 not working for below examples #43875

Closed
@gaurikholkar-zz

Description

@gaurikholkar-zz

Example 1

struct Foo;

impl Foo {
    fn foo(&self, v: &mut Vec<&u32>, x: &u32) {
        v.push(x);
    }
}

Example 2

fn foo(v: &mut Vec<&u32>, x: &u32) {
    v.push(x);
}

Example 3

struct Foo;

impl Foo {
    fn foo(&self, x: &u32) -> &u32 {
        x
    }
}

cc @nikomatsakis

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions