Skip to content

Commit 7856647

Browse files
borsgitbot
authored and
gitbot
committed
Auto merge of rust-lang#133369 - Zalathar:profiler-builtins-no-core, r=jieyouxu
Allow injecting a profiler runtime into `#![no_core]` crates An alternative to rust-lang#133300, allowing `-Cinstrument-coverage` to be used with `-Zbuild-std`. The incompatibility between `profiler_builtins` and `#![no_core]` crates appears to have been caused by profiler_builtins depending on core, and therefore conflicting with core (or minicore). But that's a false dependency, because the profiler doesn't contain any actual Rust code. So we can just mark the profiler itself as `#![no_core]`, and remove the incompatibility error. --- For context, the error was originally added by rust-lang#79958.
2 parents 4534664 + 657db5f commit 7856647

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Cargo.lock

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

profiler_builtins/Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ bench = false
99
doc = false
1010

1111
[dependencies]
12-
core = { path = "../core" }
13-
compiler_builtins = { version = "0.1.0", features = ['rustc-dep-of-std'] }
1412

1513
[build-dependencies]
1614
cc = "1.2"

profiler_builtins/src/lib.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
#![no_std]
1+
// tidy-alphabetical-start
2+
#![allow(internal_features)]
3+
#![feature(no_core)]
24
#![feature(profiler_runtime)]
5+
#![feature(staged_api)]
6+
// tidy-alphabetical-end
7+
8+
// Other attributes:
9+
#![no_core]
310
#![profiler_runtime]
411
#![unstable(
512
feature = "profiler_runtime_lib",
613
reason = "internal implementation detail of rustc right now",
714
issue = "none"
815
)]
9-
#![allow(unused_features)]
10-
#![allow(internal_features)]
11-
#![feature(staged_api)]

0 commit comments

Comments
 (0)