55
66use super :: * ;
77
8+ #[ allow( unnameable_types) ]
9+ //~^ reachable at visibility `pub`, but can only be named at visibility `pub(fmt)`
810#[ lang = "format_placeholder" ]
911#[ derive( Copy , Clone ) ]
1012pub struct Placeholder {
@@ -30,6 +32,8 @@ impl Placeholder {
3032 }
3133}
3234
35+ #[ allow( unnameable_types) ]
36+ //~^ reachable at visibility `pub`, but can only be named at visibility `pub(fmt)`
3337#[ lang = "format_alignment" ]
3438#[ derive( Copy , Clone , PartialEq , Eq ) ]
3539pub enum Alignment {
@@ -41,6 +45,8 @@ pub enum Alignment {
4145
4246/// Used by [width](https://doc.rust-lang.org/std/fmt/#width)
4347/// and [precision](https://doc.rust-lang.org/std/fmt/#precision) specifiers.
48+ #[ allow( unnameable_types) ]
49+ //~^ reachable at visibility `pub`, but can only be named at visibility `pub(fmt)`
4450#[ lang = "format_count" ]
4551#[ derive( Copy , Clone ) ]
4652pub enum Count {
@@ -70,6 +76,8 @@ pub(super) enum Flag {
7076///
7177/// Argument is essentially an optimized partially applied formatting function,
7278/// equivalent to `exists T.(&T, fn(&T, &mut Formatter<'_>) -> Result`.
79+ #[ allow( unnameable_types) ]
80+ //~^ reachable at visibility `pub`, but can only be named at visibility `pub(fmt)`
7381#[ lang = "format_argument" ]
7482#[ derive( Copy , Clone ) ]
7583pub struct Argument < ' a > {
@@ -172,6 +180,8 @@ impl<'a> Argument<'a> {
172180/// This struct represents the unsafety of constructing an `Arguments`.
173181/// It exists, rather than an unsafe function, in order to simplify the expansion
174182/// of `format_args!(..)` and reduce the scope of the `unsafe` block.
183+ #[ allow( unnameable_types) ]
184+ //~^ reachable at visibility `pub`, but can only be named at visibility `pub(fmt)`
175185#[ lang = "format_unsafe_arg" ]
176186pub struct UnsafeArg {
177187 _private : ( ) ,
0 commit comments