]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/clean/types.rs
Rollup merge of #103709 - cuviper:netbsd-9, r=pietroalbini
[rust.git] / src / librustdoc / clean / types.rs
index 7ffb380913796591da531c9745955836315c0fc0..3d13f7463cbb09d5428251cf416e01ac1c1c3e3b 100644 (file)
@@ -1437,6 +1437,10 @@ pub(crate) struct GenericParamDef {
 }
 
 impl GenericParamDef {
+    pub(crate) fn lifetime(name: Symbol) -> Self {
+        Self { name, kind: GenericParamDefKind::Lifetime { outlives: Vec::new() } }
+    }
+
     pub(crate) fn is_synthetic_type_param(&self) -> bool {
         match self.kind {
             GenericParamDefKind::Lifetime { .. } | GenericParamDefKind::Const { .. } => false,