mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 11:05:36 +00:00
Compile-time-only functions don't generate code, so instrumenting them for coverage is useless. This also avoids an ICE when trying to get the function's symbol name for an unused-function record, which can occur when instrumenting `core`. Co-Authored-By: Rachel Barker <rachel.barker@ferrous-systems.com>
12 lines
328 B
Rust
12 lines
328 B
Rust
#![feature(rustc_attrs)]
|
|
//@ edition: 2024
|
|
|
|
// Check that instrumenting a crate with a comptime function doesn't ICE.
|
|
// (The function itself doesn't need to be instrumented, and probably shouldn't be.)
|
|
// Regression test for <https://github.com/rust-lang/rust/pull/161808>.
|
|
|
|
#[rustc_comptime]
|
|
fn comptime_fn() {}
|
|
|
|
fn main() {}
|