Skip to content

Commit 1b73355

Browse files
committed
Allow newly added non_local_definitions in std
1 parent 01bcc60 commit 1b73355

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

library/core/src/convert/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ pub trait AsMut<T: ?Sized> {
396396
/// For example, take this code:
397397
///
398398
/// ```
399+
/// # #![cfg_attr(not(bootstrap), allow(non_local_definitions))]
399400
/// struct Wrapper<T>(Vec<T>);
400401
/// impl<T> From<Wrapper<T>> for Vec<T> {
401402
/// fn from(w: Wrapper<T>) -> Vec<T> {

library/core/src/hash/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ pub trait Hasher {
454454
/// ```
455455
/// #![feature(hasher_prefixfree_extras)]
456456
/// # // Stubs to make the `impl` below pass the compiler
457+
/// # #![cfg_attr(not(bootstrap), allow(non_local_definitions))]
457458
/// # struct MyCollection<T>(Option<T>);
458459
/// # impl<T> MyCollection<T> {
459460
/// # fn len(&self) -> usize { todo!() }

library/core/tests/iter/adapters/step_by.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ fn test_iterator_step_by_nth() {
4949
}
5050

5151
#[test]
52+
#[cfg_attr(not(bootstrap), allow(non_local_definitions))]
5253
fn test_iterator_step_by_nth_overflow() {
5354
#[cfg(target_pointer_width = "16")]
5455
type Bigger = u32;

library/core/tests/result.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ pub fn test_unwrap_or_default() {
195195
}
196196

197197
#[test]
198+
#[cfg_attr(not(bootstrap), allow(non_local_definitions))]
198199
pub fn test_into_ok() {
199200
fn infallible_op() -> Result<isize, !> {
200201
Ok(666)
@@ -217,6 +218,7 @@ pub fn test_into_ok() {
217218
}
218219

219220
#[test]
221+
#[cfg_attr(not(bootstrap), allow(non_local_definitions))]
220222
pub fn test_into_err() {
221223
fn until_error_op() -> Result<!, isize> {
222224
Err(666)

0 commit comments

Comments
 (0)