-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Open
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)Area: Source-based code coverage (-Cinstrument-coverage)C-bugCategory: This is a bug.Category: This is a bug.S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
bug
llvm-cov warning mismatched data when impl const fn
reproduce
https://github.com/loynoir/reproduce-rust-130139
pub use bar::Bar;
mod bar {
pub struct Bar<T>(T);
impl Bar<i32> {
pub const unsafe fn from_unchecked(value: i32) -> Self {
Bar(value)
}
pub const fn get(&self) -> i32 {
self.0
}
}
}workaround
pub use bar::{Bar, bar_get_i32};
mod bar {
pub struct Bar<T>(T);
impl Bar<i32> {
pub const unsafe fn from_unchecked(value: i32) -> Self {
Bar(value)
}
pub fn get(&self) -> i32 {
self.0
}
}
pub fn bar_get_i32(bar: &Bar<i32>) -> i32 {
bar.0
}
}related
llvm-cov warning mismatched data when double slash comment above use
llvm-cov warning mismatched data when triple slash safety comment above unsafe fn
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)Area: Source-based code coverage (-Cinstrument-coverage)C-bugCategory: This is a bug.Category: This is a bug.S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.