about summary refs log tree commit diff
path: root/library/alloc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-20 07:16:42 +0000
committerbors <bors@rust-lang.org>2022-11-20 07:16:42 +0000
commite07425d55b77fde99af2092a92109a0da0860692 (patch)
treee7ade368e6c2c2980fbde38df0bff50ff3da7702 /library/alloc
parent2ed65da15279d25e8b8b91d60162930ab48f16f6 (diff)
parentbc51f8783cdbee5a1ed121f017ec7360d9be9124 (diff)
downloadrust-e07425d55b77fde99af2092a92109a0da0860692.tar.gz
rust-e07425d55b77fde99af2092a92109a0da0860692.zip
Auto merge of #98914 - fee1-dead-contrib:min-deref-patterns, r=compiler-errors
Minimal implementation of implicit deref patterns for Strings

cc `@compiler-errors` `@BoxyUwU` https://github.com/rust-lang/lang-team/issues/88 #87121

~~I forgot to add a feature gate, will do so in a minute~~ Done
Diffstat (limited to 'library/alloc')
-rw-r--r--library/alloc/src/string.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs
index c9ba8921f6e..7a8e6f088f3 100644
--- a/library/alloc/src/string.rs
+++ b/library/alloc/src/string.rs
@@ -362,8 +362,8 @@ use crate::vec::Vec;
 /// [`Deref`]: core::ops::Deref "ops::Deref"
 /// [`as_str()`]: String::as_str
 #[derive(PartialOrd, Eq, Ord)]
-#[cfg_attr(not(test), rustc_diagnostic_item = "String")]
 #[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(all(not(bootstrap), not(test)), lang = "String")]
 pub struct String {
     vec: Vec<u8>,
 }