We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc0b02d commit c896321Copy full SHA for c896321
core/src/fmt/rt.rs
@@ -152,6 +152,21 @@ impl<'a> Argument<'a> {
152
None
153
}
154
155
+
156
+ /// Used by `format_args` when all arguments are gone after inlining,
157
+ /// when using `&[]` would incorrectly allow for a bigger lifetime.
158
+ ///
159
+ /// This fails without format argument inlining, and that shouldn't be different
160
+ /// when the argument is inlined:
161
162
+ /// ```compile_fail,E0716
163
+ /// let f = format_args!("{}", "a");
164
+ /// println!("{f}");
165
+ /// ```
166
+ #[inline(always)]
167
+ pub fn none() -> [Self; 0] {
168
+ []
169
+ }
170
171
172
/// This struct represents the unsafety of constructing an `Arguments`.
0 commit comments