Skip to content

fix(resolve): Warn on Self-Type Lifetime Elision for Non-Self Types#153692

Open
TKanX wants to merge 4 commits into
rust-lang:mainfrom
TKanX:bugfix/140611-self-lifetime-elision-name-match
Open

fix(resolve): Warn on Self-Type Lifetime Elision for Non-Self Types#153692
TKanX wants to merge 4 commits into
rust-lang:mainfrom
TKanX:bugfix/140611-self-lifetime-elision-name-match

Conversation

@TKanX
Copy link
Copy Markdown
Contributor

@TKanX TKanX commented Mar 11, 2026

View all comments

Summary

FCW lint self_lifetime_elision_not_applicable: fires when a self parameter contains & but does not syntactically contain Self.

Tracking: #140611

Context

Self-type lifetime elision in rustc_resolve relies on a name-matching hack (is_self_ty) that shallow-compares Res values between the self parameter type and the impl self type. As @compiler-errors identified in #140611, this hack cannot see through type aliases (different Res) and only fires for Struct|Union|Enum|PrimTy impls (excludes TyAlias). When it misses, find_lifetime_for_self returns Empty, self-elision silently fails, and a later parameter's lifetime may leak into the return type.

@lcnr proposed restricting self-elision to genuine Self and FCW'ing everything else. This PR implements that.

Behavior

pub struct W<'a>(&'a ());
pub type Alias<'a> = W<'a>;
Case Code Before After
f1 impl Alias { fn f(self: &W) -> &() } silent wrong '_ FCW
f2 impl Alias { fn f(self: &Alias) -> &() } silent wrong '_ FCW
f3 impl Alias { fn f(&self) -> &() } correct unchanged
f4 impl W { fn f(self: &W) -> &() } correct (hack fires) FCW
f5 impl W { fn f(self: &Alias) -> &() } silent wrong '_ FCW
f6 impl W { fn f(&self) -> &() } correct unchanged

A follow-up PR will remove the hack after a warning period.

r? @lcnr
cc @compiler-errors @traviscross

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 11, 2026
@TKanX TKanX force-pushed the bugfix/140611-self-lifetime-elision-name-match branch from 7f7909c to 9922812 Compare March 11, 2026 05:35
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Mar 11, 2026
@rust-log-analyzer

This comment has been minimized.

@TKanX TKanX force-pushed the bugfix/140611-self-lifetime-elision-name-match branch from ea23a3d to 7e85048 Compare March 11, 2026 07:18
@rust-log-analyzer

This comment has been minimized.

@TKanX TKanX force-pushed the bugfix/140611-self-lifetime-elision-name-match branch from 7e85048 to 7a90db6 Compare March 11, 2026 08:14
@TKanX TKanX marked this pull request as ready for review March 11, 2026 09:50
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 11, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 11, 2026

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann, @JonathanBrouwer

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 11, 2026
@traviscross traviscross added I-lang-nominated Nominated for discussion during a lang team meeting. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. labels Mar 11, 2026
@lcnr
Copy link
Copy Markdown
Contributor

lcnr commented Mar 12, 2026

before discussing this in a lang meeting, can you extend the PR description a bit to summarize the reasoning and discussion behind this?

@TKanX TKanX marked this pull request as draft March 12, 2026 19:02
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 12, 2026
@TKanX TKanX force-pushed the bugfix/140611-self-lifetime-elision-name-match branch 3 times, most recently from dfcd644 to 805f449 Compare March 12, 2026 20:38
@TKanX TKanX marked this pull request as ready for review March 12, 2026 20:39
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 12, 2026
@jackh726 jackh726 added T-types Relevant to the types team, which will review and decide on the PR/issue. T-lang Relevant to the language team labels Mar 18, 2026
@TKanX
Copy link
Copy Markdown
Contributor Author

TKanX commented Mar 27, 2026

my crate ptagger showed up on the affected crates list, even though i did not use type aliases in the project.

See case f4.

Logs
[INFO] cloning repository https://github.com/Paladynee/ptagger
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Paladynee/ptagger" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPaladynee%2Fptagger", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPaladynee%2Fptagger'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] 9c95a5631d419e64c5725971bfe89102a729b1ec
[INFO] checking Paladynee/ptagger against try#39605810efb1a0d52f955bfba9e4eec7a01d5deb for pr-153692
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPaladynee%2Fptagger" "/workspace/builds/worker-7-tc2/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc2/source'...
[INFO] [stderr] done.
[INFO] started tweaking git repo https://github.com/Paladynee/ptagger
[INFO] finished tweaking git repo https://github.com/Paladynee/ptagger
[INFO] tweaked toml for git repo https://github.com/Paladynee/ptagger written to /workspace/builds/worker-7-tc2/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/Paladynee/ptagger on toolchain 39605810efb1a0d52f955bfba9e4eec7a01d5deb
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+39605810efb1a0d52f955bfba9e4eec7a01d5deb" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/Paladynee/ptagger already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+39605810efb1a0d52f955bfba9e4eec7a01d5deb" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+39605810efb1a0d52f955bfba9e4eec7a01d5deb" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] 94c4d4501534a86d5da79ca00f5a941d0ac2606921b8158b39e414293d42963c
[INFO] running `Command { std: "docker" "start" "-a" "94c4d4501534a86d5da79ca00f5a941d0ac2606921b8158b39e414293d42963c", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "94c4d4501534a86d5da79ca00f5a941d0ac2606921b8158b39e414293d42963c", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "94c4d4501534a86d5da79ca00f5a941d0ac2606921b8158b39e414293d42963c", kill_on_drop: false }`
[INFO] [stdout] 94c4d4501534a86d5da79ca00f5a941d0ac2606921b8158b39e414293d42963c
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+39605810efb1a0d52f955bfba9e4eec7a01d5deb" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] 6ddf651ad52ef0d3c479726084ea28e900564b0c0e0557a054af7b0ae8300310
[INFO] running `Command { std: "docker" "start" "-a" "6ddf651ad52ef0d3c479726084ea28e900564b0c0e0557a054af7b0ae8300310", kill_on_drop: false }`
[INFO] [stderr]     Checking ptagger v0.1.0 (/opt/rustwide/workdir)
[INFO] [stdout] warning: unused import: `core::marker::PhantomData`
[INFO] [stdout]  --> src/hightagged.rs:3:5
[INFO] [stdout]   |
[INFO] [stdout] 3 | use core::marker::PhantomData;
[INFO] [stdout]   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unused imports: `DerefMut` and `Deref`
[INFO] [stdout]  --> src/hightagged.rs:5:17
[INFO] [stdout]   |
[INFO] [stdout] 5 | use core::ops::{Deref, DerefMut, Range};
[INFO] [stdout]   |                 ^^^^^  ^^^^^^^^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: `self` parameter type does not contain `Self`
[INFO] [stdout]    --> src/lowtagged.rs:129:29
[INFO] [stdout]     |
[INFO] [stdout] 129 |     pub fn write_data(self: &mut TaggedRefLow<'a, T>, data: usize) {
[INFO] [stdout]     |                             ^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: use `&self`, `&mut self`, or `self: &Self` for correct lifetime elision
[INFO] [stdout]     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[INFO] [stdout]     = note: for more information, see issue #140611 <https://github.com/rust-lang/rust/issues/140611>
[INFO] [stdout]     = note: `#[deny(self_lifetime_elision_not_applicable)]` (part of `#[deny(future_incompatible)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: `self` parameter type does not contain `Self`
[INFO] [stdout]    --> src/lowtagged.rs:176:31
[INFO] [stdout]     |
[INFO] [stdout] 176 |     pub fn extract_data(self: &TaggedMutRefLow<'a, T>) -> usize {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: use `&self`, `&mut self`, or `self: &Self` for correct lifetime elision
[INFO] [stdout]     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[INFO] [stdout]     = note: for more information, see issue #140611 <https://github.com/rust-lang/rust/issues/140611>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: `self` parameter type does not contain `Self`
[INFO] [stdout]    --> src/lowtagged.rs:181:29
[INFO] [stdout]     |
[INFO] [stdout] 181 |     pub fn write_data(self: &mut TaggedMutRefLow<'a, T>, data: usize) {
[INFO] [stdout]     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: use `&self`, `&mut self`, or `self: &Self` for correct lifetime elision
[INFO] [stdout]     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[INFO] [stdout]     = note: for more information, see issue #140611 <https://github.com/rust-lang/rust/issues/140611>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unused import: `core::marker::PhantomData`
[INFO] [stdout]  --> src/hightagged.rs:3:5
[INFO] [stdout]   |
[INFO] [stdout] 3 | use core::marker::PhantomData;
[INFO] [stdout]   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unused imports: `DerefMut` and `Deref`
[INFO] [stdout]  --> src/hightagged.rs:5:17
[INFO] [stdout]   |
[INFO] [stdout] 5 | use core::ops::{Deref, DerefMut, Range};
[INFO] [stdout]   |                 ^^^^^  ^^^^^^^^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: `self` parameter type does not contain `Self`
[INFO] [stdout]    --> src/lowtagged.rs:129:29
[INFO] [stdout]     |
[INFO] [stdout] 129 |     pub fn write_data(self: &mut TaggedRefLow<'a, T>, data: usize) {
[INFO] [stdout]     |                             ^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: use `&self`, `&mut self`, or `self: &Self` for correct lifetime elision
[INFO] [stdout]     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[INFO] [stdout]     = note: for more information, see issue #140611 <https://github.com/rust-lang/rust/issues/140611>
[INFO] [stdout]     = note: `#[deny(self_lifetime_elision_not_applicable)]` (part of `#[deny(future_incompatible)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: `self` parameter type does not contain `Self`
[INFO] [stdout]    --> src/lowtagged.rs:176:31
[INFO] [stdout]     |
[INFO] [stdout] 176 |     pub fn extract_data(self: &TaggedMutRefLow<'a, T>) -> usize {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: use `&self`, `&mut self`, or `self: &Self` for correct lifetime elision
[INFO] [stdout]     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[INFO] [stdout]     = note: for more information, see issue #140611 <https://github.com/rust-lang/rust/issues/140611>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: `self` parameter type does not contain `Self`
[INFO] [stdout]    --> src/lowtagged.rs:181:29
[INFO] [stdout]     |
[INFO] [stdout] 181 |     pub fn write_data(self: &mut TaggedMutRefLow<'a, T>, data: usize) {
[INFO] [stdout]     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: use `&self`, `&mut self`, or `self: &Self` for correct lifetime elision
[INFO] [stdout]     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[INFO] [stdout]     = note: for more information, see issue #140611 <https://github.com/rust-lang/rust/issues/140611>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: associated function `sign_extend_47` is never used
[INFO] [stdout]   --> src/hightagged.rs:95:8
[INFO] [stdout]    |
[INFO] [stdout] 43 | impl<T> TaggedPtrHigh48<T> {
[INFO] [stdout]    | -------------------------- associated function in this implementation
[INFO] [stdout] ...
[INFO] [stdout] 95 |     fn sign_extend_47(val: usize) -> usize {
[INFO] [stdout]    |        ^^^^^^^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `ptagger` (lib) due to 3 previous errors; 3 warnings emitted
[INFO] [stdout] warning: associated function `sign_extend_47` is never used
[INFO] [stdout]   --> src/hightagged.rs:95:8
[INFO] [stdout]    |
[INFO] [stdout] 43 | impl<T> TaggedPtrHigh48<T> {
[INFO] [stdout]    | -------------------------- associated function in this implementation
[INFO] [stdout] ...
[INFO] [stdout] 95 |     fn sign_extend_47(val: usize) -> usize {
[INFO] [stdout]    |        ^^^^^^^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stderr] error: could not compile `ptagger` (lib test) due to 3 previous errors; 3 warnings emitted
[INFO] running `Command { std: "docker" "inspect" "6ddf651ad52ef0d3c479726084ea28e900564b0c0e0557a054af7b0ae8300310", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "6ddf651ad52ef0d3c479726084ea28e900564b0c0e0557a054af7b0ae8300310", kill_on_drop: false }`
[INFO] [stdout] 6ddf651ad52ef0d3c479726084ea28e900564b0c0e0557a054af7b0ae8300310

@Paladynee

@TKanX
Copy link
Copy Markdown
Contributor Author

TKanX commented Mar 28, 2026

@lcnr what should we do next?

@scottmcm
Copy link
Copy Markdown
Member

scottmcm commented Apr 1, 2026

We chatted a bunch in the lang meeting today about the errors like this one:

[INFO] [stdout] error: `self` parameter type does not contain `Self`
[INFO] [stdout]    --> src/lowtagged.rs:176:31
[INFO] [stdout]     |
[INFO] [stdout] 176 |     pub fn extract_data(self: &TaggedMutRefLow<'a, T>) -> usize {
[INFO] [stdout]     |                               ^^^^^^^^^^^^^^^^^^^^^^^

Notably, that case just has usize as a return type, which contains no lifetimes, and similarly a bunch of the other errors have () as the return type, which of course also contains no lifetimes.

So there's two reasons that it seems like that shouldn't actually be FCWing:

  • There's no lifetime elision going on, in a sense, because with no output lifetimes there's nothing being tied together, and thus there's no reason that this would be an issue.
  • Or if you do think of this as lifetime elision, it's the kind that doesn't care about the self rule because if it was an associated function instead of a method, this would do exactly the same thing.

Thus it feels like there's no reason we'd need to change this case, at least in the context of a PR titled involving "lifetime elision". (There was as aside about maybe linting "that's not your self type?" anyway as a stylistic thing, but that didn't reach team consensus and probably isn't this issue anyway.)

We were thinking thus that

  • This should exempt those cases without lifetimes in the return type.
  • Then we can re-run crater on just the things that failed, which should be a quick run, to hopefully reduce the total impact here.

Does that make sense? @lcnr, would that impact the original goal of doing this? It seemed to us like if there are only input '_ lifetimes, they should just be fresh ones, and it didn't seem like we'd have to break those cases.

@lcnr
Copy link
Copy Markdown
Contributor

lcnr commented Apr 3, 2026

Does that make sense? @lcnr, would that impact the original goal of doing this?

I haven't been following this too closely, so I can't tell. I think this change seems fine

The issue is that trying to decide whether types are equal on the HIR does not work, so trying to distinguish between "reference to self type" vs "reference in self type" and so on is just incredibly hard.

I could definitely imagine us supporting self: &TaggedMutRefLow<'a, T> and only emitting a FCW if there is actually any lifetime elision which may depend on the self type.

My vibe is:

  • i don't have a good sense of what would be a good end state here
  • it's certainly safer to have less elision for now and force things to ambig
  • explicitly telling users when lifetime elision does something surprising is very desirable to me, i.e. linting on f1, f2, and f5

@traviscross
Copy link
Copy Markdown
Contributor

traviscross commented Apr 8, 2026

This makes sense to me. Thanks @TKanX for putting this forward. I'll file a concern for what @scottmcm mentioned:

This should exempt those cases without lifetimes in the return type.

As a clarification that we discussed in the meeting, our intended direction here is not to remove these cases from the language, but simply to move people off of them so that we can later change the behavior to be the one we believe to be correct (of course, we may first bump this lint to deny-by-default in order to get there).

@rfcbot fcp merge lang

@rust-rfcbot
Copy link
Copy Markdown
Collaborator

rust-rfcbot commented Apr 8, 2026

Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members:

Concerns:

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Apr 8, 2026
@traviscross
Copy link
Copy Markdown
Contributor

@rfcbot fcp concern should-example-cases-without-lifetimes

@nikomatsakis
Copy link
Copy Markdown
Contributor

@rfcbot reviewed

TKanX and others added 4 commits May 19, 2026 06:07
Co-authored-by: lcnr <rust@lcnr.de>
Co-authored-by: Michael Goulet <michael@errs.io>
…deny for crater run (WILL BE REVERTED)

Co-authored-by: Travis Cross <tc@traviscross.com>
@TKanX TKanX force-pushed the bugfix/140611-self-lifetime-elision-name-match branch from e46d6c7 to 1d914f5 Compare May 19, 2026 13:26
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 19, 2026

This PR modifies tests/ui/issues/. If this PR is adding new tests to tests/ui/issues/,
please refrain from doing so, and instead add it to more descriptive subdirectories.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 19, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@TKanX
Copy link
Copy Markdown
Contributor Author

TKanX commented May 19, 2026

@rfcbot fcp concern should-example-cases-without-lifetimes

d1ab06e

@traviscross @scottmcm

@traviscross
Copy link
Copy Markdown
Contributor

@bors try

TODO: @craterbot run mode=check-only crates=https://crater-reports.s3.amazonaws.com/pr-153692/retry-regressed-list.txt p=1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 20, 2026
…e-match, r=<try>

fix(resolve): Warn on Self-Type Lifetime Elision for Non-`Self` Types
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 20, 2026

☀️ Try build successful (CI)
Build commit: 48c9d93 (48c9d93cf65d550d124c40108859fd993778c157, parent: 4b9792692fbb675174d4d2082e7c37b2bc930e71)

@traviscross
Copy link
Copy Markdown
Contributor

@craterbot
Copy link
Copy Markdown
Collaborator

👌 Experiment pr-153692-1 created and queued.
🤖 Automatically detected try build 48c9d93
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 20, 2026
@craterbot
Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-153692-1 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-153692-1 is completed!
📊 151 regressed and 0 fixed (7183 total)
📊 887 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-153692-1/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. I-lang-nominated Nominated for discussion during a lang team meeting. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team T-types Relevant to the types team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.