@@ -14,13 +14,12 @@ use toml::Value;
14
14
/// ```text
15
15
/// [package]
16
16
/// name = "test"
17
- ///
17
+ ///
18
18
/// [package.metadata.docs.rs]
19
19
/// features = [ "feature1", "feature2" ]
20
20
/// all-features = true
21
21
/// no-default-features = true
22
22
/// default-target = "x86_64-unknown-linux-gnu"
23
- /// rustc-args = [ "--example-rustc-arg" ]
24
23
/// rustdoc-args = [ "--example-rustdoc-arg" ]
25
24
/// dependencies = [ "example-system-dependency" ]
26
25
/// ```
@@ -44,9 +43,6 @@ pub struct Metadata {
44
43
/// is always built on this target. You can change default target by setting this.
45
44
pub default_target : Option < String > ,
46
45
47
- /// List of command line arguments for `rustc`.
48
- pub rustc_args : Option < Vec < String > > ,
49
-
50
46
/// List of command line arguments for `rustdoc`.
51
47
pub rustdoc_args : Option < Vec < String > > ,
52
48
@@ -85,7 +81,6 @@ impl Metadata {
85
81
all_features : false ,
86
82
no_default_features : false ,
87
83
default_target : None ,
88
- rustc_args : None ,
89
84
rustdoc_args : None ,
90
85
dependencies : None ,
91
86
}
@@ -112,8 +107,6 @@ impl Metadata {
112
107
. and_then ( |v| v. as_bool ( ) ) . unwrap_or ( metadata. all_features ) ;
113
108
metadata. default_target = table. get ( "default-target" )
114
109
. and_then ( |v| v. as_str ( ) ) . map ( |v| v. to_owned ( ) ) ;
115
- metadata. rustc_args = table. get ( "rustc-args" ) . and_then ( |f| f. as_array ( ) )
116
- . and_then ( |f| f. iter ( ) . map ( |v| v. as_str ( ) . map ( |v| v. to_owned ( ) ) ) . collect ( ) ) ;
117
110
metadata. rustdoc_args = table. get ( "rustdoc-args" ) . and_then ( |f| f. as_array ( ) )
118
111
. and_then ( |f| f. iter ( ) . map ( |v| v. as_str ( ) . map ( |v| v. to_owned ( ) ) ) . collect ( ) ) ;
119
112
metadata. dependencies = table. get ( "dependencies" ) . and_then ( |f| f. as_array ( ) )
@@ -154,7 +147,6 @@ mod test {
154
147
assert ! ( metadata. all_features == true ) ;
155
148
assert ! ( metadata. no_default_features == true ) ;
156
149
assert ! ( metadata. default_target. is_some( ) ) ;
157
- assert ! ( metadata. rustc_args. is_some( ) ) ;
158
150
assert ! ( metadata. rustdoc_args. is_some( ) ) ;
159
151
160
152
let features = metadata. features . unwrap ( ) ;
@@ -164,10 +156,6 @@ mod test {
164
156
165
157
assert_eq ! ( metadata. default_target. unwrap( ) , "x86_64-unknown-linux-gnu" . to_owned( ) ) ;
166
158
167
- let rustc_args = metadata. rustc_args . unwrap ( ) ;
168
- assert_eq ! ( rustc_args. len( ) , 1 ) ;
169
- assert_eq ! ( rustc_args[ 0 ] , "--example-rustc-arg" . to_owned( ) ) ;
170
-
171
159
let rustdoc_args = metadata. rustdoc_args . unwrap ( ) ;
172
160
assert_eq ! ( rustdoc_args. len( ) , 1 ) ;
173
161
assert_eq ! ( rustdoc_args[ 0 ] , "--example-rustdoc-arg" . to_owned( ) ) ;
0 commit comments