@@ -122,7 +122,7 @@ fn default_handler(
122
122
source_map : Lrc < SourceMap > ,
123
123
ignore_path_set : Lrc < IgnorePathSet > ,
124
124
can_reset : Lrc < AtomicBool > ,
125
- hide_parse_errors : bool ,
125
+ show_parse_errors : bool ,
126
126
color : Color ,
127
127
) -> Handler {
128
128
let supports_color = term:: stderr ( ) . map_or ( false , |term| term. supports_color ( ) ) ;
@@ -132,7 +132,7 @@ fn default_handler(
132
132
ColorConfig :: Never
133
133
} ;
134
134
135
- let emitter = if hide_parse_errors {
135
+ let emitter = if !show_parse_errors {
136
136
silent_emitter ( )
137
137
} else {
138
138
let fallback_bundle = rustc_errors:: fallback_fluent_bundle (
@@ -159,11 +159,21 @@ impl ParseSess {
159
159
let source_map = Lrc :: new ( SourceMap :: new ( FilePathMapping :: empty ( ) ) ) ;
160
160
let can_reset_errors = Lrc :: new ( AtomicBool :: new ( false ) ) ;
161
161
162
+ let show_parse_errors = if config. was_set ( ) . hide_parse_errors ( ) {
163
+ eprintln ! (
164
+ "Warning: the `hide_parse_errors` option is deprecated. \
165
+ Use `show_parse_errors` instead"
166
+ ) ;
167
+ config. hide_parse_errors ( )
168
+ } else {
169
+ config. show_parse_errors ( )
170
+ } ;
171
+
162
172
let handler = default_handler (
163
173
Lrc :: clone ( & source_map) ,
164
174
Lrc :: clone ( & ignore_path_set) ,
165
175
Lrc :: clone ( & can_reset_errors) ,
166
- config . hide_parse_errors ( ) ,
176
+ show_parse_errors ,
167
177
config. color ( ) ,
168
178
) ;
169
179
let parse_sess = RawParseSess :: with_span_handler ( handler, source_map) ;
0 commit comments