-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix accidentally not emitting overflowing literals lints anymore in patterns #136393
Conversation
r? @chenyukang rustbot has assigned @chenyukang. Use |
This comment has been minimized.
This comment has been minimized.
tests/ui/type/pattern_types/overflowing_literals_in_patterns.rs
Outdated
Show resolved
Hide resolved
60f4875
to
663191d
Compare
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
r? compiler-errors @bors r+ rollup=never |
@bors r- |
@bors try @rust-timer queue Let's run perf and rollup if clean |
This comment has been minimized.
This comment has been minimized.
…, r=<try> 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
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (812f026): comparison URL. Overall result: no relevant changes - no action neededBenchmarking 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 Instruction countThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 779.014s -> 777.526s (-0.19%) |
…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
…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
type TooBig = pattern_type!(u8 is 500..); | ||
type TooSmall = pattern_type!(i8 is -500..); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like these now also emit error messages
Failed in #136570 (comment):
@bors r- |
663191d
to
9a2073d
Compare
@bors r=compiler-errors |
…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
…kingjubilee Rollup of 9 pull requests Successful merges: - rust-lang#135439 (Make `-O` mean `OptLevel::Aggressive`) - rust-lang#136193 (Implement pattern type ffi checks) - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern) - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types) - rust-lang#136315 (Use short ty string for binop and unop errors) - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns) - rust-lang#136530 (Implement `x perf` directly in bootstrap) - rust-lang#136580 (Couple of changes to run rustc in miri) - rust-lang#136589 (Enable "jump to def" feature on rustc docs) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors) - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern) - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types) - rust-lang#136315 (Use short ty string for binop and unop errors) - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns) - rust-lang#136435 (Simplify some code for lowering THIR patterns) - rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 7 pull requests Successful merges: - rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors) - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern) - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types) - rust-lang#136315 (Use short ty string for binop and unop errors) - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns) - rust-lang#136435 (Simplify some code for lowering THIR patterns) - rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-gnu-debug
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors) - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern) - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types) - rust-lang#136315 (Use short ty string for binop and unop errors) - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns) - rust-lang#136435 (Simplify some code for lowering THIR patterns) - rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-gnu-debug
…kingjubilee Rollup of 9 pull requests Successful merges: - rust-lang#135439 (Make `-O` mean `OptLevel::Aggressive`) - rust-lang#136193 (Implement pattern type ffi checks) - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern) - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types) - rust-lang#136315 (Use short ty string for binop and unop errors) - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns) - rust-lang#136530 (Implement `x perf` directly in bootstrap) - rust-lang#136580 (Couple of changes to run rustc in miri) - rust-lang#136589 (Enable "jump to def" feature on rustc docs) r? `@ghost` `@rustbot` modify labels: rollup
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
This was regressed in #134228 (not in beta yet).
The issue was that previously we nested
hir::Expr
insidehir::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