Fix accidentally not emitting overflowing literals lints anymore in patterns by oli-obk · Pull Request #136393 · rust-lang/rust (original) (raw)

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation21 Commits3 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

oli-obk

This was regressed in #134228 (not in beta yet).

The issue was that previously we nested hir::Expr inside hir::PatKind::Lit, so it was linted by the expression code.

So now I've set it up for visitors to be able to directly visit literals and get all literals

@rustbot

r? @chenyukang

rustbot has assigned @chenyukang.
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

@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

Feb 1, 2025

@rust-log-analyzer

This comment has been minimized.

lqd

@rustbot

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

compiler-errors

@compiler-errors

r? compiler-errors @bors r+ rollup=never

@bors

📌 Commit 663191d has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors 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

Feb 2, 2025

@oli-obk

@bors bors 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-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Feb 3, 2025

@oli-obk

@rust-timer

This comment has been minimized.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 3, 2025

@bors

…, r=

Fix accidentally not emitting overflowing literals lints anymore in patterns

This was regressed in rust-lang#134228 (not in beta yet).

The issue was that previously we nested hir::Expr inside hir::PatKind::Lit, so it was linted by the expression code.

So now I've set it up for visitors to be able to directly visit literals and get all literals

@bors

@bors

☀️ Try build successful - checks-actions
Build commit: 812f026 (812f0268ec8fd8cf08b806b6e5343daa579f124e)

@rust-timer

This comment has been minimized.

@rust-timer

Finished benchmarking commit (812f026): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌ (primary) - - 0
Regressions ❌ (secondary) - - 0
Improvements ✅ (primary) -2.2% [-2.9%, -1.6%] 2
Improvements ✅ (secondary) - - 0
All ❌✅ (primary) -2.2% [-2.9%, -1.6%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 779.014s -> 777.526s (-0.19%)
Artifact size: 328.74 MiB -> 328.77 MiB (0.01%)

@oli-obk

@bors

📌 Commit 663191d has been approved by compiler-errors

It is now in the queue for this repository.

@oli-obk

@oli-obk

@oli-obk

@bors

📌 Commit 9a2073d has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors 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-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Feb 5, 2025

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Feb 6, 2025

@workingjubilee

…ks, r=compiler-errors

Fix accidentally not emitting overflowing literals lints anymore in patterns

This was regressed in rust-lang#134228 (not in beta yet).

The issue was that previously we nested hir::Expr inside hir::PatKind::Lit, so it was linted by the expression code.

So now I've set it up for visitors to be able to directly visit literals and get all literals

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 6, 2025

@bors

…kingjubilee

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 6, 2025

@bors

…iaskrgr

Rollup of 7 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 6, 2025

@bors

Rollup of 7 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

try-job: aarch64-gnu-debug

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 6, 2025

@bors

…iaskrgr

Rollup of 7 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

try-job: aarch64-gnu-debug

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 6, 2025

@bors

…kingjubilee

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Feb 6, 2025

@rust-timer

Rollup merge of rust-lang#136393 - oli-obk:pattern-type-lit-oflo-checks, r=compiler-errors

Fix accidentally not emitting overflowing literals lints anymore in patterns

This was regressed in rust-lang#134228 (not in beta yet).

The issue was that previously we nested hir::Expr inside hir::PatKind::Lit, so it was linted by the expression code.

So now I've set it up for visitors to be able to directly visit literals and get all literals

flip1995 pushed a commit to flip1995/rust that referenced this pull request

Feb 20, 2025

@matthiaskrgr

…ks, r=compiler-errors

Fix accidentally not emitting overflowing literals lints anymore in patterns

This was regressed in rust-lang#134228 (not in beta yet).

The issue was that previously we nested hir::Expr inside hir::PatKind::Lit, so it was linted by the expression code.

So now I've set it up for visitors to be able to directly visit literals and get all literals

flip1995 pushed a commit to flip1995/rust that referenced this pull request

Feb 20, 2025

@bors

…iaskrgr

Rollup of 7 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

try-job: aarch64-gnu-debug

@ehuss ehuss mentioned this pull request

Mar 2, 2025

@oli-obk oli-obk deleted the pattern-type-lit-oflo-checks branch

March 2, 2025 18:19

@apiraino

Given this has regressed in #137893 but seems to be an accepted change (comment), I'm going to mark this for the release notes, T-release will decide 🙂

@rustbot label relnotes

@rustbot rustbot added the relnotes

Marks issues that should be documented in the release notes of the next release.

label

Mar 19, 2025

wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request

Apr 9, 2025

@he32

Upstream changes relative to 1.85.1:

Version 1.86.0 (2025-04-03)

Language

Compiler

Platform Support

Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Rustdoc

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request

May 10, 2025

@tmeijn

This MR contains the following updates:

Package Update Change
rust minor 1.85.1 -> 1.86.0

MR created with the help of el-capitano/tools/renovate-bot.

Proposed changes to behavior should be submitted there as MRs.


Release Notes

rust-lang/rust (rust)

v1.86.0

Compare Source

==========================

Language

Compiler

Platform Support

Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Rustdoc

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.



This MR has been generated by Renovate Bot.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request

Jun 16, 2025

@he32

Pkgsrc changes:

Upstream changes:

Version 1.86.0 (2025-04-03)

Language

Compiler

Platform Support

Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Rustdoc

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Labels

relnotes

Marks issues that should be documented in the release notes of the next release.

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.