-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
For the following example
fn foo<'a>(x: &'a i32, y: Vec<&i32>) {
- consider changing the type of `y` to `std::vec::Vec<&'a i32>`
y.push(x);
^ this reference must have lifetime 'a
}
can be refined to
fn foo<'a>(x: &'a i32, y: Vec<&i32>) {
---- consider changing this type to `&'a i32`
y.push(x);
^ this reference must have lifetime 'a
}
Underline &i32
instead of the whole type.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
gaurikholkar-zz commentedon Aug 13, 2017
working on this.
gaurikholkar-zz commentedon Aug 13, 2017
#43851
gaurikholkar-zz commentedon Aug 13, 2017
#43700
estebank commentedon Jun 29, 2023
Current output: