@@ -105,6 +105,7 @@ pub struct Options {
105
105
pub prints : Vec < PrintRequest > ,
106
106
pub cg : CodegenOptions ,
107
107
pub color : ColorConfig ,
108
+ pub show_span : Option < String > ,
108
109
pub externs : HashMap < String , Vec < String > > ,
109
110
pub crate_name : Option < String > ,
110
111
/// An optional name to use as the crate for std during std injection,
@@ -211,6 +212,7 @@ pub fn basic_options() -> Options {
211
212
prints : Vec :: new ( ) ,
212
213
cg : basic_codegen_options ( ) ,
213
214
color : Auto ,
215
+ show_span : None ,
214
216
externs : HashMap :: new ( ) ,
215
217
crate_name : None ,
216
218
alt_std_name : None ,
@@ -259,7 +261,6 @@ debugging_opts! {
259
261
BORROWCK_STATS ,
260
262
NO_LANDING_PADS ,
261
263
DEBUG_LLVM ,
262
- SHOW_SPAN ,
263
264
COUNT_TYPE_SIZES ,
264
265
META_STATS ,
265
266
GC ,
@@ -298,7 +299,6 @@ pub fn debugging_opts_map() -> Vec<(&'static str, &'static str, u64)> {
298
299
( "no-landing-pads" , "omit landing pads for unwinding" ,
299
300
NO_LANDING_PADS ) ,
300
301
( "debug-llvm" , "enable debug output from LLVM" , DEBUG_LLVM ) ,
301
- ( "show-span" , "show spans for compiler debugging" , SHOW_SPAN ) ,
302
302
( "count-type-sizes" , "count the sizes of aggregate types" ,
303
303
COUNT_TYPE_SIZES ) ,
304
304
( "meta-stats" , "gather metadata statistics" , META_STATS ) ,
@@ -820,6 +820,7 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
820
820
`flowgraph=<nodeid>` (graphviz formatted flowgraph for node), or
821
821
`everybody_loops` (all function bodies replaced with `loop {}`)." ,
822
822
"TYPE" ) ,
823
+ opt:: opt_u ( "" , "show-span" , "Show spans for compiler debugging" , "expr|pat|ty" ) ,
823
824
opt:: flagopt ( "" , "dep-info" ,
824
825
"Output dependency info to <filename> after compiling, \
825
826
in a format suitable for use by Makefiles", "FILENAME" ) ,
@@ -1122,6 +1123,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
1122
1123
prints : prints,
1123
1124
cg : cg,
1124
1125
color : color,
1126
+ show_span : None ,
1125
1127
externs : externs,
1126
1128
crate_name : crate_name,
1127
1129
alt_std_name : None ,
0 commit comments