@@ -64,6 +64,8 @@ macro_rules! create_config {
64
64
// if a license_template_path has been specified, successfully read, parsed and compiled
65
65
// into a regex, it will be stored here
66
66
pub license_template: Option <Regex >,
67
+ // Unstable Options specified on the stable channel
68
+ configured_unstable_options: Option <Vec <String >>,
67
69
// For each config item, we store a bool indicating whether it has
68
70
// been accessed and the value, and a bool whether the option was
69
71
// manually initialised, or taken from the default,
@@ -146,6 +148,7 @@ macro_rules! create_config {
146
148
}
147
149
148
150
fn fill_from_parsed_config( mut self , parsed: PartialConfig , dir: & Path ) -> Config {
151
+ let mut unstable_options = vec![ ] ;
149
152
$(
150
153
if let Some ( val) = parsed. $i {
151
154
if self . $i. 3 {
@@ -158,10 +161,21 @@ macro_rules! create_config {
158
161
} else {
159
162
eprintln!( "Warning: can't set `{} = {:?}`, unstable features are only \
160
163
available in nightly channel.", stringify!( $i) , val) ;
164
+ // only set abort_on_unrecognised_options, and store all other
165
+ // nightly only options
166
+ if stringify!( $i) != "abort_on_unrecognised_options" {
167
+ unstable_options. push( format!( "{} = {:?}" , stringify!( $i) , val) ) ;
168
+ } else {
169
+ self . $i. 1 = true ;
170
+ self . $i. 2 = val;
171
+ }
161
172
}
162
173
}
163
174
}
164
175
) +
176
+ if unstable_options. len( ) > 0 {
177
+ self . configured_unstable_options = Some ( unstable_options) ;
178
+ }
165
179
self . set_heuristics( ) ;
166
180
self . set_license_template( ) ;
167
181
self . set_ignore( dir) ;
@@ -438,6 +452,7 @@ macro_rules! create_config {
438
452
fn default ( ) -> Config {
439
453
Config {
440
454
license_template: None ,
455
+ configured_unstable_options: None ,
441
456
$(
442
457
$i: ( Cell :: new( false ) , false , $def, $stb) ,
443
458
) +
0 commit comments