Skip to content

Broken LLVM function when pushing dyn* item to Vec. #102141

Closed
@mejrs

Description

@mejrs

Playground

Code

#![feature(dyn_star)]
#![allow(incomplete_features)]

use core::fmt::Debug;

fn main() {
    let mut v = vec![];
    let i = 42_u8 as dyn* Debug;
    v.push(i);
}

Result:

Call parameter type does not match function signature!
i8 42
 i64  invoke void @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h57979dab0e1643c2E"(ptr align 8 %3, i8 42, ptr align 8 @6)
          to label %14 unwind label %8, !dbg !2675
in function _ZN10playground4main17h68903ee09fbec9bcE
LLVM ERROR: Broken function found, compilation aborted!

Meta

1.66.0-nightly (2022-09-21 9062b780b32d2eab060b)

@rustbot label: +F-dyn_star +requires-nightly +A-LLVM

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.F-dyn_star`#![feature(dyn_star)]`requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions