tracking issue for debug_non_exhaustive feature · Issue #67364 · rust-lang/rust (original) (raw)

Feature gate: #![feature(debug_non_exhaustive)]

This is a tracking issue for adding the ability to add an ellipsis to the end of the Debug representation of a struct, to indicate that the struct has more fields, but that these fields are not displayable. This involves adding the finish_non_exhaustive method to DebugStruct, that produces output like

Name { field1: value1, .. }

where the .. indicate that there are more hidden fields.

Public API

// core::fmt

impl<'a, 'b: 'a> DebugStruct<'a, 'b> { pub fn finish_non_exhaustive(&mut self) -> fmt::Result; }

Steps / History

Unresolved Questions