@@ -743,23 +743,6 @@ impl<'a> Arguments<'a> {
743743 }
744744}
745745
746- impl < ' a > Arguments < ' a > {
747- /// Create a `fmt::Arguments` object for a single static string.
748- ///
749- /// Formatting this `fmt::Arguments` will just produce the string as-is.
750- #[ inline]
751- #[ unstable( feature = "fmt_arguments_from_str" , issue = "148905" ) ]
752- pub const fn from_str ( s : & ' static str ) -> Arguments < ' a > {
753- // SAFETY: This is the "static str" representation of fmt::Arguments; see above.
754- unsafe {
755- Arguments {
756- template : mem:: transmute ( s. as_ptr ( ) ) ,
757- args : mem:: transmute ( s. len ( ) << 1 | 1 ) ,
758- }
759- }
760- }
761- }
762-
763746#[ doc( hidden) ]
764747#[ unstable( feature = "fmt_internals" , issue = "none" ) ]
765748impl < ' a > Arguments < ' a > {
@@ -824,6 +807,21 @@ impl<'a> Arguments<'a> {
824807}
825808
826809impl < ' a > Arguments < ' a > {
810+ /// Create a `fmt::Arguments` object for a single static string.
811+ ///
812+ /// Formatting this `fmt::Arguments` will just produce the string as-is.
813+ #[ inline]
814+ #[ unstable( feature = "fmt_arguments_from_str" , issue = "148905" ) ]
815+ pub const fn from_str ( s : & ' static str ) -> Arguments < ' a > {
816+ // SAFETY: This is the "static str" representation of fmt::Arguments; see above.
817+ unsafe {
818+ Arguments {
819+ template : mem:: transmute ( s. as_ptr ( ) ) ,
820+ args : mem:: transmute ( s. len ( ) << 1 | 1 ) ,
821+ }
822+ }
823+ }
824+
827825 /// Gets the formatted string, if it has no arguments to be formatted at runtime.
828826 ///
829827 /// This can be used to avoid allocations in some cases.
0 commit comments