We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
_oibit_remover
1 parent 787f9f4 commit dc7de37Copy full SHA for dc7de37
src/libcore/fmt/mod.rs
@@ -261,6 +261,13 @@ pub struct Formatter<'a> {
261
262
struct Void {
263
_priv: (),
264
+ /// Erases all oibits, because `Void` erases the type of the object that
265
+ /// will be used to produce formatted output. Since we do not know what
266
+ /// oibits the real types have (and they can have any or none), we need to
267
+ /// take the most conservative approach and forbid all oibits.
268
+ ///
269
+ /// It was added after #45197 showed that one could share a `!Sync`
270
+ /// object across threads by passing it into `format_args!`.
271
_oibit_remover: PhantomData<*mut Fn()>,
272
}
273
0 commit comments