custom_error icon indicating copy to clipboard operation
custom_error copied to clipboard

accept non-displayable parameters

Open lovasoa opened this issue 7 years ago • 0 comments

I am not sure whether this is possible to do with the current implementation, but it would be nice to implement Display for error types even when they contain parameters that are not displayable (as long as they are not used in error messages).

This should work:

struct NonDisplayable;
custom_error!(E X{a:NonDisplayable} = "error");
E::X { a: NonDisplayable }.to_string()

lovasoa avatar Nov 23 '18 13:11 lovasoa