5
5
6
6
use super :: * ;
7
7
8
+ #[ allow( unnameable_types) ]
9
+ //~^ reachable at visibility `pub`, but can only be named at visibility `pub(fmt)`
8
10
#[ lang = "format_placeholder" ]
9
11
#[ derive( Copy , Clone ) ]
10
12
pub struct Placeholder {
@@ -30,6 +32,8 @@ impl Placeholder {
30
32
}
31
33
}
32
34
35
+ #[ allow( unnameable_types) ]
36
+ //~^ reachable at visibility `pub`, but can only be named at visibility `pub(fmt)`
33
37
#[ lang = "format_alignment" ]
34
38
#[ derive( Copy , Clone , PartialEq , Eq ) ]
35
39
pub enum Alignment {
@@ -41,6 +45,8 @@ pub enum Alignment {
41
45
42
46
/// Used by [width](https://doc.rust-lang.org/std/fmt/#width)
43
47
/// 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)`
44
50
#[ lang = "format_count" ]
45
51
#[ derive( Copy , Clone ) ]
46
52
pub enum Count {
@@ -70,6 +76,8 @@ pub(super) enum Flag {
70
76
///
71
77
/// Argument is essentially an optimized partially applied formatting function,
72
78
/// 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)`
73
81
#[ lang = "format_argument" ]
74
82
#[ derive( Copy , Clone ) ]
75
83
pub struct Argument < ' a > {
@@ -172,6 +180,8 @@ impl<'a> Argument<'a> {
172
180
/// This struct represents the unsafety of constructing an `Arguments`.
173
181
/// It exists, rather than an unsafe function, in order to simplify the expansion
174
182
/// 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)`
175
185
#[ lang = "format_unsafe_arg" ]
176
186
pub struct UnsafeArg {
177
187
_private : ( ) ,
0 commit comments