about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/debug.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-05-07 00:38:40 +0200
committerGitHub <noreply@github.com>2021-05-07 00:38:40 +0200
commitaaf23892ab95b9d4cc15a308bd4cff4be3d08de3 (patch)
treed23630ead011afb478d7eff1e59975d33ecb762c /compiler/rustc_mir/src/transform/coverage/debug.rs
parent7835c7802d7473c961e9d9d91467286a7f437948 (diff)
parent3584c1dd0cb501916c8bc6fd452864b261068beb (diff)
downloadrust-aaf23892ab95b9d4cc15a308bd4cff4be3d08de3.tar.gz
rust-aaf23892ab95b9d4cc15a308bd4cff4be3d08de3.zip
Rollup merge of #84871 - richkadel:no-coverage-unstable-only, r=nagisa
Disallows `#![feature(no_coverage)]` on stable and beta (using standard crate-level gating)

Fixes: #84836

Removes the function-level feature gating solution originally implemented, and solves the same problem using `allow_internal_unstable`, so normal crate-level feature gating mechanism can still be used (which disallows the feature on stable and beta).

I tested this, building the compiler with and without `CFG_DISABLE_UNSTABLE_FEATURES=1`

With unstable features disabled, I get the expected result as shown here:

```shell
$ ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc     src/test/run-make-fulldeps/coverage/no_cov_crate.rs
error[E0554]: `#![feature]` may not be used on the dev release channel
 --> src/test/run-make-fulldeps/coverage/no_cov_crate.rs:2:1
  |
2 | #![feature(no_coverage)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0554`.
```

r? ````@Mark-Simulacrum````
cc: ````@tmandry```` ````@wesleywiser````
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions