Uh oh!
There was an error while loading. Please reload this page.
Make lit_to_mir_constant and lit_to_const infallible - #135195
Conversation
rustbot
commented
Jan 7, 2025
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
lit_to_mir_constant infalliblelit_to_mir_constant and lit_to_const infalliblerustbot
commented
Jan 7, 2025
Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri, @rust-lang/wg-const-eval Some changes occurred in match checking cc @Nadrieril HIR ty lowering was modified cc @fmease Some changes occurred in cc @BoxyUwU |
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
2256627 to
f6146ffCompare
This comment has been minimized.
This comment has been minimized.
f6146ff to
eb63fd6CompareUh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
| trunc(if neg { (n.get() as i128).overflowing_neg().0 as u128 } else { n.get() }) | ||
| } | ||
| (ast::LitKind::Float(n, _), ty::Float(fty)) => { | ||
| parse_float_into_constval(*n, *fty, neg).unwrap() |
There was a problem hiding this comment.
delayed_bug to bug, it's unreachable I guess? 😁 though given we've got no tests for that, I don't mind merging this and reacting to a fuzzer ICE if it's reachable
There was a problem hiding this comment.
yea, I looked into this before the holidays and if memory serves right the parser ensures we don't get anything that could fail here.
eb63fd6 to
5d0405dCompare
This comment has been minimized.
This comment has been minimized.
5d0405d to
c92ed62Compareoli-obk
commented
Jan 8, 2025
@bors r=lcnr |
bors
commented
Jan 8, 2025
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#134228 (Exhaustively handle expressions in patterns) - rust-lang#135194 (triagebot: mark tidy changes with a more specific `A-tidy` label) - rust-lang#135222 (Ensure that we don't try to access fields on a non-struct pattern type) - rust-lang#135250 (A couple simple borrowck cleanups) - rust-lang#135252 (Fix release notes link) - rust-lang#135253 (Revert rust-lang#131365) Failed merges: - rust-lang#135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible) r? `@ghost` `@rustbot` modify labels: rollup
Make `lit_to_mir_constant` and `lit_to_const` infallible My motivation for this change is just that it's annoying to check everywhere, especially since all but one call site was just ICEing on errors anyway right there. They can still fail, but now just return an error constant instead of having the caller handle the error. fixesrust-lang#114317fixesrust-lang#126182
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#134228 (Exhaustively handle expressions in patterns) - rust-lang#135194 (triagebot: mark tidy changes with a more specific `A-tidy` label) - rust-lang#135222 (Ensure that we don't try to access fields on a non-struct pattern type) - rust-lang#135250 (A couple simple borrowck cleanups) - rust-lang#135252 (Fix release notes link) - rust-lang#135253 (Revert rust-lang#131365) Failed merges: - rust-lang#135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#128110 (Suggest Replacing Comma with Semicolon in Incorrect Repeat Expressions) - rust-lang#134609 (Add new `{x86_64,i686}-win7-windows-gnu` targets) - rust-lang#134875 (Implement `const Destruct` in old solver) - rust-lang#135221 (Include rustc and rustdoc book in replace-version-placeholder) - rust-lang#135231 (bootstrap: Add more comments to some of the test steps) - rust-lang#135256 (Move `mod cargo` below the import statements) Failed merges: - rust-lang#135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible) r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
commented
Jan 9, 2025
@bors r- |
c92ed62 to
84c8d4fCompareoli-obk
commented
Jan 9, 2025
@bors r=lcnr |
bors
commented
Jan 9, 2025
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#134898 (Make it easier to run CI jobs locally) - rust-lang#135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible) - rust-lang#135261 (Account for identity substituted items in symbol mangling) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#134898 (Make it easier to run CI jobs locally) - rust-lang#135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible) - rust-lang#135261 (Account for identity substituted items in symbol mangling) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#135195 - oli-obk:push-toyoyrupruko, r=lcnr Make `lit_to_mir_constant` and `lit_to_const` infallible My motivation for this change is just that it's annoying to check everywhere, especially since all but one call site was just ICEing on errors anyway right there. They can still fail, but now just return an error constant instead of having the caller handle the error. fixesrust-lang#114317fixesrust-lang#126182
My motivation for this change is just that it's annoying to check everywhere, especially since all but one call site was just ICEing on errors anyway right there.
They can still fail, but now just return an error constant instead of having the caller handle the error.
fixes#114317
fixes#126182