@@ -320,7 +320,7 @@ impl FormattingOptions {
320320 /// always be printed.
321321 /// - `-`: Currently not used
322322 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
323- pub const fn sign ( & mut self , sign : Option < Sign > ) -> & mut Self {
323+ pub fn sign ( & mut self , sign : Option < Sign > ) -> & mut Self {
324324 self . flags =
325325 self . flags & !( 1 << rt:: Flag :: SignMinus as u32 | 1 << rt:: Flag :: SignPlus as u32 ) ;
326326 match sign {
@@ -334,7 +334,7 @@ impl FormattingOptions {
334334 ///
335335 /// This is used to indicate for integer formats that the padding to width should both be done with a 0 character as well as be sign-aware
336336 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
337- pub const fn sign_aware_zero_pad ( & mut self , sign_aware_zero_pad : bool ) -> & mut Self {
337+ pub fn sign_aware_zero_pad ( & mut self , sign_aware_zero_pad : bool ) -> & mut Self {
338338 if sign_aware_zero_pad {
339339 self . flags |= 1 << rt:: Flag :: SignAwareZeroPad as u32
340340 } else {
@@ -351,7 +351,7 @@ impl FormattingOptions {
351351 /// - [`Octal`] - precedes the argument with a `0b`
352352 /// - [`Binary`] - precedes the argument with a `0o`
353353 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
354- pub const fn alternate ( & mut self , alternate : bool ) -> & mut Self {
354+ pub fn alternate ( & mut self , alternate : bool ) -> & mut Self {
355355 if alternate {
356356 self . flags |= 1 << rt:: Flag :: Alternate as u32
357357 } else {
@@ -366,7 +366,7 @@ impl FormattingOptions {
366366 /// being formatted is smaller than width some extra characters will be
367367 /// printed around it.
368368 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
369- pub const fn fill ( & mut self , fill : char ) -> & mut Self {
369+ pub fn fill ( & mut self , fill : char ) -> & mut Self {
370370 self . fill = fill;
371371 self
372372 }
@@ -375,7 +375,7 @@ impl FormattingOptions {
375375 /// The alignment specifies how the value being formatted should be
376376 /// positioned if it is smaller than the width of the formatter.
377377 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
378- pub const fn align ( & mut self , align : Option < Alignment > ) -> & mut Self {
378+ pub fn align ( & mut self , align : Option < Alignment > ) -> & mut Self {
379379 self . align = align;
380380 self
381381 }
@@ -386,7 +386,7 @@ impl FormattingOptions {
386386 /// the padding specified by [`FormattingOptions::fill`]/[`FormattingOptions::align`]
387387 /// will be used to take up the required space.
388388 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
389- pub const fn width ( & mut self , width : Option < usize > ) -> & mut Self {
389+ pub fn width ( & mut self , width : Option < usize > ) -> & mut Self {
390390 self . width = width;
391391 self
392392 }
@@ -400,14 +400,14 @@ impl FormattingOptions {
400400 /// - For floating-point types, this indicates how many digits after the
401401 /// decimal point should be printed.
402402 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
403- pub const fn precision ( & mut self , precision : Option < usize > ) -> & mut Self {
403+ pub fn precision ( & mut self , precision : Option < usize > ) -> & mut Self {
404404 self . precision = precision;
405405 self
406406 }
407407 /// Specifies whether the [`Debug`] trait should use lower-/upper-case
408408 /// hexadecimal or normal integers
409409 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
410- pub const fn debug_as_hex ( & mut self , debug_as_hex : Option < DebugAsHex > ) -> & mut Self {
410+ pub fn debug_as_hex ( & mut self , debug_as_hex : Option < DebugAsHex > ) -> & mut Self {
411411 self . flags = self . flags
412412 & !( 1 << rt:: Flag :: DebugUpperHex as u32 | 1 << rt:: Flag :: DebugLowerHex as u32 ) ;
413413 match debug_as_hex {
@@ -479,7 +479,7 @@ impl FormattingOptions {
479479 ///
480480 /// You may alternatively use [`Formatter::new()`].
481481 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
482- pub const fn create_formatter < ' a > ( self , write : & ' a mut ( dyn Write + ' a ) ) -> Formatter < ' a > {
482+ pub fn create_formatter < ' a > ( self , write : & ' a mut ( dyn Write + ' a ) ) -> Formatter < ' a > {
483483 Formatter { options : self , buf : write }
484484 }
485485
@@ -532,13 +532,13 @@ impl<'a> Formatter<'a> {
532532 ///
533533 /// You may alternatively use [`FormattingOptions::create_formatter()`].
534534 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
535- pub const fn new ( write : & ' a mut ( dyn Write + ' a ) , options : FormattingOptions ) -> Self {
535+ pub fn new ( write : & ' a mut ( dyn Write + ' a ) , options : FormattingOptions ) -> Self {
536536 Formatter { options, buf : write }
537537 }
538538
539539 /// Creates a new formatter based on this one with given [`FormattingOptions`].
540540 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
541- pub const fn with_options < ' b > ( & ' b mut self , options : FormattingOptions ) -> Formatter < ' b > {
541+ pub fn with_options < ' b > ( & ' b mut self , options : FormattingOptions ) -> Formatter < ' b > {
542542 Formatter { options, buf : self . buf }
543543 }
544544}
0 commit comments