]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_feature/builtin_attrs.rs
Rollup merge of #69740 - mark-i-m:describe-it-3, r=eddyb
[rust.git] / src / librustc_feature / builtin_attrs.rs
index 83830b9d78ad4d9f66460c7959dbd74995a72b7f..eaebdd9fb95a25f77f299cafc586ca463c415905 100644 (file)
@@ -85,19 +85,13 @@ fn is_deprecated(&self) -> bool {
 
 /// A template that the attribute input must match.
 /// Only top-level shape (`#[attr]` vs `#[attr(...)]` vs `#[attr = ...]`) is considered now.
-#[derive(Clone, Copy)]
+#[derive(Clone, Copy, Default)]
 pub struct AttributeTemplate {
     pub word: bool,
     pub list: Option<&'static str>,
     pub name_value_str: Option<&'static str>,
 }
 
-impl AttributeTemplate {
-    pub fn only_word() -> Self {
-        Self { word: true, list: None, name_value_str: None }
-    }
-}
-
 /// A convenience macro for constructing attribute templates.
 /// E.g., `template!(Word, List: "description")` means that the attribute
 /// supports forms `#[attr]` and `#[attr(description)]`.