Open
Description
Code
./src/test/ui/issues/issue-27901.rs
// run-pass
trait Stream { type Item; }
impl<'a> Stream for &'a str { type Item = u8; }
fn f<'s>(s: &'s str) -> (&'s str, <&'s str as Stream>::Item) {
(s, 42)
}
fn main() {
let fx = f as for<'t> fn(&'t str) -> (&'t str, <&'t str as Stream>::Item);
assert_eq!(fx("hi"), ("hi", 42));
}
Meta
rustc --version --verbose
:
rustc 1.65.0-nightly (0b79f758c 2022-08-18)
binary: rustc
commit-hash: 0b79f758c9aa6646606662a6d623a0752286cd17
commit-date: 2022-08-18
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 15.0.0
Error output
rustc ./issue-27901.rs -Cdebuginfo=2 -Zsanitizer=cfi -Clto
inlinable function call in a function with debug info must have a !dbg location
call void @_ZN11issue_279011f17h923e371f4763f6b8E.cfi(ptr sret({ { ptr, i64 }, i8, [7 x i8] }) %6, ptr align 1 @3, i64 2)
inlinable function call in a function with debug info must have a !dbg location
call void @_ZN11issue_279011f17h923e371f4763f6b8E.cfi(ptr sret({ { ptr, i64 }, i8, [7 x i8] }) %6, ptr align 1 @3, i64 2)
LLVM ERROR: Broken module found, compilation aborted!
Backtrace
same
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Control Flow Integrity (CFI) security mitigationArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Sanitizers for correctness and code qualityCategory: This is a bug.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Project group: Exploit mitigationsRelevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.