-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[mir-opt] Fix Inline
pass to handle inlining into box
expressions
#67333
Conversation
Would |
I tried this #[inline]
fn bar() -> i32 {
3
}
fn main() {
let mut foo = (1, 2);
foo.1 = bar();
} and it doesn't trigger the issue because we assign the return of |
So... |
|
@bors r+ |
📌 Commit b50cee3 has been approved by |
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
…ce, r=oli-obk [mir-opt] Fix `Inline` pass to handle inlining into `box` expressions r? @oli-obk Before, the test case just ICE'd here: https://github.com/rust-lang/rust/blob/a605441e049f0b6d5f7715b94b8ac4662fd7fcf6/src/librustc_mir/transform/inline.rs#L668
Rollup of 9 pull requests Successful merges: - #67321 (make htons const fn) - #67328 (Remove now-redundant range check on u128 -> f32 casts) - #67333 ([mir-opt] Fix `Inline` pass to handle inlining into `box` expressions) - #67354 (Fix pointing at arg when cause is outside of call) - #67363 (Fix handling of wasm import modules and names) - #67382 (Remove some unnecessary `ATTR_*` constants.) - #67389 (Remove `SO_NOSIGPIPE` dummy variable on platforms that don't use it.) - #67393 (Enable opting out of specific default LLVM arguments.) - #67394 (Remove outdated references to @t from comments) Failed merges: r? @ghost
…ce, r=oli-obk [mir-opt] Fix `Inline` pass to handle inlining into `box` expressions r? @oli-obk Before, the test case just ICE'd here: https://github.com/rust-lang/rust/blob/a605441e049f0b6d5f7715b94b8ac4662fd7fcf6/src/librustc_mir/transform/inline.rs#L668
Failed in #67448 (comment), @bors r- |
b50cee3
to
f1325a7
Compare
Rebased and modified new test to skip wasm which aborts instead of unwinding. @bors r=oli-obk |
📌 Commit f1325a7 has been approved by |
🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened |
…ce, r=oli-obk [mir-opt] Fix `Inline` pass to handle inlining into `box` expressions r? @oli-obk Before, the test case just ICE'd here: https://github.com/rust-lang/rust/blob/a605441e049f0b6d5f7715b94b8ac4662fd7fcf6/src/librustc_mir/transform/inline.rs#L668
…ce, r=oli-obk [mir-opt] Fix `Inline` pass to handle inlining into `box` expressions r? @oli-obk Before, the test case just ICE'd here: https://github.com/rust-lang/rust/blob/a605441e049f0b6d5f7715b94b8ac4662fd7fcf6/src/librustc_mir/transform/inline.rs#L668
Rollup of 7 pull requests Successful merges: - #67160 (Make GATs less ICE-prone.) - #67333 ([mir-opt] Fix `Inline` pass to handle inlining into `box` expressions) - #67420 (use _val to ignore parameter of any::type_name_of_val) - #67469 (Remove rustc-dev from the default nightly components) - #67489 (Drop petgraph dependency from bootstrap) - #67490 (Document privacy of RangeInclusive fields) - #67491 (use Result::map_or for bootstrap) Failed merges: r? @ghost
r? @oli-obk
Before, the test case just ICE'd here:
rust/src/librustc_mir/transform/inline.rs
Line 668 in a605441