about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2024-01-27 17:37:53 +0100
committerUrgau <urgau@numericable.fr>2024-02-17 13:59:46 +0100
commit1b733558bf7ac425a2b56726e7229cc298982536 (patch)
treeaca66b3a290af4b5d81e0b318827a2be292cced1 /library/core/src
parent01bcc60ecd8aa4bf7d43dd13694e003c84ad19ee (diff)
downloadrust-1b733558bf7ac425a2b56726e7229cc298982536.tar.gz
rust-1b733558bf7ac425a2b56726e7229cc298982536.zip
Allow newly added non_local_definitions in std
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/convert/mod.rs1
-rw-r--r--library/core/src/hash/mod.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/convert/mod.rs b/library/core/src/convert/mod.rs
index 45f6e375e89..85740dce866 100644
--- a/library/core/src/convert/mod.rs
+++ b/library/core/src/convert/mod.rs
@@ -396,6 +396,7 @@ pub trait AsMut<T: ?Sized> {
 /// For example, take this code:
 ///
 /// ```
+/// # #![cfg_attr(not(bootstrap), allow(non_local_definitions))]
 /// struct Wrapper<T>(Vec<T>);
 /// impl<T> From<Wrapper<T>> for Vec<T> {
 ///     fn from(w: Wrapper<T>) -> Vec<T> {
diff --git a/library/core/src/hash/mod.rs b/library/core/src/hash/mod.rs
index 153971a59c5..bfdd28a7399 100644
--- a/library/core/src/hash/mod.rs
+++ b/library/core/src/hash/mod.rs
@@ -454,6 +454,7 @@ pub trait Hasher {
     /// ```
     /// #![feature(hasher_prefixfree_extras)]
     /// # // Stubs to make the `impl` below pass the compiler
+    /// # #![cfg_attr(not(bootstrap), allow(non_local_definitions))]
     /// # struct MyCollection<T>(Option<T>);
     /// # impl<T> MyCollection<T> {
     /// #     fn len(&self) -> usize { todo!() }