-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
ice: mir_const_qualif: MIR had errors
#121103
Labels
A-mir
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Test is from cleaned up a bit use std::mem;
macro_rules! define_reify_functions {
($(
fn $name:ident $(<$($param:ident),*>)?
for $(extern $abi:tt)? fn($($arg:ident: $arg_ty:ty),*) -> $ret_ty:ty;
)+) => {
$(pub const fn $name<
$($($param,)*)?
F: Fn($($arg_ty),*) -> $ret_ty + Copy
>(f: F) -> $(extern $abi)? fn($($arg_ty),*) -> $ret_ty {
assert!(mem::size_of::<F>() == 0, );
$(extern $abi)? fn wrapper<
$($($param,)*)?
F: Fn($($arg_ty),*) -> $ret_ty + Copy
>($($arg: $arg_ty),*) -> $ret_ty {
let f = unsafe {
mem::MaybeUninit::<F>::uninit().assume_init()
};
f($($arg),*)
}
let _f_proof = f;
wrapper::<
$($($param,)*)?
F
>
})+
}
}
define_reify_functions! {
fn _reify_to_extern_c_fn_unary<A, R> for extern "C" fn(arg: A) -> R;
fn reify_to_extern_c_fn_hrt_bridge<R> for extern "C" fn(bridge: super::BridgeConfig<'_>) -> R;
} |
Regression in #121071 cc @nnethercote |
Another smaller example :3 fn main(_: <lib2::GenericType<42> as lib2::TypeFn>::Output) {} |
@rustbot label +A-mir -needs-triage |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 15, 2024
…li-obk Reinstate some delayed bugs. These were changed to `has_errors` assertions in rust-lang#121071 because that seemed reasonable, but evidently not. Fixes rust-lang#121103. Fixes rust-lang#121108.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 15, 2024
Rollup merge of rust-lang#121116 - nnethercote:fix-121103-121108, r=oli-obk Reinstate some delayed bugs. These were changed to `has_errors` assertions in rust-lang#121071 because that seemed reasonable, but evidently not. Fixes rust-lang#121103. Fixes rust-lang#121108.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-mir
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
auto-reduced (treereduce-rust):
original code
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc --crate-type=lib
Program output
The text was updated successfully, but these errors were encountered: