File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ use crate::mem::transmute;
5858#[ unstable( feature = "ascii_char" , issue = "110998" ) ]
5959#[ repr( u8 ) ]
6060pub enum AsciiChar {
61- /// U+0000
61+ /// U+0000 (The default variant)
6262 #[ unstable( feature = "ascii_char_variants" , issue = "110998" ) ]
6363 Null = 0 ,
6464 /// U+0001
Original file line number Diff line number Diff line change 22
33#![ stable( feature = "rust1" , since = "1.0.0" ) ]
44
5+ use crate :: ascii:: Char as AsciiChar ;
6+
57/// A trait for giving a type a useful default value.
68///
79/// Sometimes, you want to fall back to some kind of default value, and
@@ -158,6 +160,7 @@ macro_rules! default_impl {
158160default_impl ! { ( ) , ( ) , "Returns the default value of `()`" }
159161default_impl ! { bool , false , "Returns the default value of `false`" }
160162default_impl ! { char , '\x00' , "Returns the default value of `\\ x00`" }
163+ default_impl ! { AsciiChar , AsciiChar :: Null , "Returns the default value of `Null`" }
161164
162165default_impl ! { usize , 0 , "Returns the default value of `0`" }
163166default_impl ! { u8 , 0 , "Returns the default value of `0`" }
You can’t perform that action at this time.
0 commit comments