@@ -21,11 +21,10 @@ use errors::emitter::{Emitter, EmitterWriter};
21
21
use errors:: emitter:: HumanReadableErrorType ;
22
22
use errors:: annotate_snippet_emitter_writer:: { AnnotateSnippetEmitterWriter } ;
23
23
use syntax:: edition:: Edition ;
24
- use syntax:: feature_gate:: { self , AttributeType } ;
24
+ use syntax:: feature_gate;
25
25
use errors:: json:: JsonEmitter ;
26
26
use syntax:: source_map;
27
27
use syntax:: sess:: { ParseSess , ProcessCfgMod } ;
28
- use syntax:: symbol:: Symbol ;
29
28
use syntax_pos:: { MultiSpan , Span } ;
30
29
31
30
use rustc_target:: spec:: { PanicStrategy , RelroLevel , Target , TargetTriple } ;
@@ -79,7 +78,6 @@ pub struct Session {
79
78
/// in order to avoid redundantly verbose output (Issue #24690, #44953).
80
79
pub one_time_diagnostics : Lock < FxHashSet < ( DiagnosticMessageId , Option < Span > , String ) > > ,
81
80
pub plugin_llvm_passes : OneThread < RefCell < Vec < String > > > ,
82
- pub plugin_attributes : Lock < Vec < ( Symbol , AttributeType ) > > ,
83
81
pub crate_types : Once < Vec < config:: CrateType > > ,
84
82
/// The `crate_disambiguator` is constructed out of all the `-C metadata`
85
83
/// arguments passed to the compiler. Its value together with the crate-name
@@ -1039,12 +1037,11 @@ pub fn build_session_with_source_map(
1039
1037
1040
1038
let external_macro_backtrace = sopts. debugging_opts . external_macro_backtrace ;
1041
1039
1042
- let emitter = match diagnostics_output {
1043
- DiagnosticOutput :: Default => default_emitter ( & sopts, registry, & source_map, None ) ,
1044
- DiagnosticOutput :: Raw ( write) => {
1045
- default_emitter ( & sopts, registry, & source_map, Some ( write) )
1046
- }
1040
+ let write_dest = match diagnostics_output {
1041
+ DiagnosticOutput :: Default => None ,
1042
+ DiagnosticOutput :: Raw ( write) => Some ( write) ,
1047
1043
} ;
1044
+ let emitter = default_emitter ( & sopts, registry, & source_map, write_dest) ;
1048
1045
1049
1046
let diagnostic_handler = errors:: Handler :: with_emitter_and_flags (
1050
1047
emitter,
@@ -1166,7 +1163,6 @@ fn build_session_(
1166
1163
working_dir,
1167
1164
one_time_diagnostics : Default :: default ( ) ,
1168
1165
plugin_llvm_passes : OneThread :: new ( RefCell :: new ( Vec :: new ( ) ) ) ,
1169
- plugin_attributes : Lock :: new ( Vec :: new ( ) ) ,
1170
1166
crate_types : Once :: new ( ) ,
1171
1167
crate_disambiguator : Once :: new ( ) ,
1172
1168
features : Once :: new ( ) ,
0 commit comments