diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-11-23 18:05:39 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-11-24 21:12:40 +1100 |
| commit | 6798ecaf1000c223378151023b8eb37f3464af29 (patch) | |
| tree | a8a9a7b83d71bbd18260e1deee9f1d379dabaf17 /tests/coverage/no-core.rs | |
| parent | 972663d8ec0ee88b8a0abee4054757ad10223450 (diff) | |
| download | rust-6798ecaf1000c223378151023b8eb37f3464af29.tar.gz rust-6798ecaf1000c223378151023b8eb37f3464af29.zip | |
Coverage test for allowing coverage in a `#![no_core]` crate
Diffstat (limited to 'tests/coverage/no-core.rs')
| -rw-r--r-- | tests/coverage/no-core.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/coverage/no-core.rs b/tests/coverage/no-core.rs new file mode 100644 index 00000000000..206222902fc --- /dev/null +++ b/tests/coverage/no-core.rs @@ -0,0 +1,12 @@ +#![feature(no_core)] +#![no_core] +//@ edition: 2021 + +// Test that coverage instrumentation works for `#![no_core]` crates. + +// For this test, we pull in std anyway, to avoid having to set up our own +// no-core or no-std environment. What's important is that the compiler allows +// coverage for a crate with the `#![no_core]` annotation. +extern crate std; + +fn main() {} |
