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>
13 lines
483 B
Plaintext
13 lines
483 B
Plaintext
LL| |#![feature(rustc_attrs)]
|
|
LL| |//@ edition: 2024
|
|
LL| |
|
|
LL| |// Check that instrumenting a crate with a comptime function doesn't ICE.
|
|
LL| |// (The function itself doesn't need to be instrumented, and probably shouldn't be.)
|
|
LL| |// Regression test for <https://github.com/rust-lang/rust/pull/161808>.
|
|
LL| |
|
|
LL| |#[rustc_comptime]
|
|
LL| |fn comptime_fn() {}
|
|
LL| |
|
|
LL| 1|fn main() {}
|
|
|