Skip to content

Add big disclaimer to the description of lint explicit_outlives_requirements#157998

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
fmease:lint-explicit-outlives-bounds-disclaimer
Jun 17, 2026
Merged

Add big disclaimer to the description of lint explicit_outlives_requirements#157998
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
fmease:lint-explicit-outlives-bounds-disclaimer

Conversation

@fmease

@fmease fmease commented Jun 16, 2026

Copy link
Copy Markdown
Member

No description provided.

@rustbot rustbot added 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. labels Jun 16, 2026
@rustbot

rustbot commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

r? @mu001999

rustbot has assigned @mu001999.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 20 candidates

@mu001999

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0cca8c4 has been approved by mu001999

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 17, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 17, 2026
Rollup of 7 pull requests

Successful merges:

 - #157681 (Add instrument_fn attribute)
 - #149219 (Allow shortening lifetime in CoerceUnsized for &mut)
 - #157539 (Rename `RandomSource` -> `Rng`, `DefaultRandomSource` -> `SystemRng`)
 - #157980 (Some minor cleanups around hir ty/pat/expr)
 - #157988 (Fix incremental-finalize-fail proc macro test on AIX)
 - #157989 (run-make: handle AIX symbol cdylib export test)
 - #157998 (Add big disclaimer to the description of lint `explicit_outlives_requirements`)
@rust-bors
rust-bors Bot merged commit 5083378 into rust-lang:main Jun 17, 2026
13 checks passed
rust-timer added a commit that referenced this pull request Jun 17, 2026
Rollup merge of #157998 - fmease:lint-explicit-outlives-bounds-disclaimer, r=mu001999

Add big disclaimer to the description of lint `explicit_outlives_requirements`
@rustbot rustbot added this to the 1.98.0 milestone Jun 17, 2026
@fmease
fmease deleted the lint-explicit-outlives-bounds-disclaimer branch June 17, 2026 07:07
Albab-Hasan added a commit to Albab-Hasan/rust that referenced this pull request Jul 1, 2026
…uard

Replace the HIR-level BoundPolarity::Maybe check with a tcx-level
is_sized() query (Ty::new_param + is_sized(cx.tcx, cx.typing_env())).
This correctly handles:

- T: ?Sized + Sized / T: Clone → is_sized returns true → lint fires
- T: MetaSized / T: PointeeSized (sized_hierarchy) → is_sized false → suppressed
- for<'x> T: 'r (higher-ranked) → predicate.bound_generic_params.is_empty()
  guard lets lint fire; RFC 599 excludes higher-ranked predicates from
  object lifetime defaulting

Also remove the lint description disclaimer added in
rust-lang#157998 since the lint now
correctly handles the object lifetime default case for unsized type params.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants