Skip to content

Commit c8964db

Browse files
committed
Disallows #![feature(no_coverage)] on stable and beta
using allow_internal_unstable (as recommended) Fixes: rust-lang#84836 ```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`. ```
1 parent 31bbc3b commit c8964db

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/src/cmp.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,7 @@ pub trait Eq: PartialEq<Self> {
274274
//
275275
// This should never be implemented by hand.
276276
#[doc(hidden)]
277-
#[cfg_attr(not(bootstrap), feature(no_coverage))]
278-
#[cfg_attr(not(bootstrap), no_coverage)]
277+
#[cfg_attr(not(bootstrap), no_coverage)] // rust-lang/rust#84605
279278
#[inline]
280279
#[stable(feature = "rust1", since = "1.0.0")]
281280
fn assert_receiver_is_total_eq(&self) {}
@@ -284,7 +283,7 @@ pub trait Eq: PartialEq<Self> {
284283
/// Derive macro generating an impl of the trait `Eq`.
285284
#[rustc_builtin_macro]
286285
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
287-
#[allow_internal_unstable(core_intrinsics, derive_eq, structural_match)]
286+
#[allow_internal_unstable(core_intrinsics, derive_eq, structural_match, no_coverage)]
288287
pub macro Eq($item:item) {
289288
/* compiler built-in */
290289
}

core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
#![feature(const_caller_location)]
167167
#![feature(slice_ptr_get)]
168168
#![feature(no_niche)] // rust-lang/rust#68303
169+
#![cfg_attr(not(bootstrap), feature(no_coverage))] // rust-lang/rust#84605
169170
#![feature(int_error_matching)]
170171
#![deny(unsafe_op_in_unsafe_fn)]
171172

0 commit comments

Comments
 (0)