]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_save_analysis/src/sig.rs
Rollup merge of #80805 - camelid:iter-by_ref-example, r=steveklabnik
[rust.git] / compiler / rustc_save_analysis / src / sig.rs
index 53150a9266434907b69d2224b56b5bfb9cc8965e..c3bc1c191ff09bdcdd6a4912560427153bd68959 100644 (file)
@@ -614,11 +614,12 @@ fn make(&self, offset: usize, _parent_id: Option<hir::HirId>, scx: &SaveContext<
                 start: offset + text.len(),
                 end: offset + text.len() + param_text.as_str().len(),
             });
-            if let hir::GenericParamKind::Const { ref ty, ref default } = param.kind {
+            if let hir::GenericParamKind::Const { ref ty, default } = param.kind {
                 param_text.push_str(": ");
                 param_text.push_str(&ty_to_string(&ty));
-                if let Some(ref _default) = default {
-                    // FIXME(const_generics_defaults): push the `default` value here
+                if let Some(default) = default {
+                    param_text.push_str(" = ");
+                    param_text.push_str(&id_to_string(&scx.tcx.hir(), default.hir_id));
                 }
             }
             if !param.bounds.is_empty() {