11//! Contains `ParseSess` which holds state living beyond what one `Parser` might.
22//! It also serves as an input to the parser itself.
33
4- use crate :: ast :: { CrateConfig , NodeId } ;
5- use crate :: early_buffered_lints :: BufferedEarlyLint ;
4+ use crate :: node_id :: NodeId ;
5+ use crate :: lint :: BufferedEarlyLint ;
66
7- use errors :: { Applicability , emitter:: SilentEmitter , Handler , ColorConfig , DiagnosticBuilder } ;
7+ use rustc_errors :: { Applicability , emitter:: SilentEmitter , Handler , ColorConfig , DiagnosticBuilder } ;
88use rustc_data_structures:: fx:: { FxHashSet , FxHashMap } ;
99use rustc_data_structures:: sync:: { Lrc , Lock , Once } ;
1010use rustc_feature:: UnstableFeatures ;
@@ -16,6 +16,9 @@ use syntax_pos::source_map::{SourceMap, FilePathMapping};
1616use std:: path:: PathBuf ;
1717use std:: str;
1818
19+ // Duplicated from syntax::ast for now
20+ type CrateConfig = FxHashSet < ( Symbol , Option < Symbol > ) > ;
21+
1922/// Collected spans during parsing for places where a certain feature was
2023/// used and should be feature gated accordingly in `check_crate`.
2124#[ derive( Default ) ]
@@ -137,7 +140,7 @@ impl ParseSess {
137140
138141 pub fn buffer_lint (
139142 & self ,
140- lint_id : & ' static rustc_session :: lint:: Lint ,
143+ lint_id : & ' static crate :: lint:: Lint ,
141144 span : impl Into < MultiSpan > ,
142145 id : NodeId ,
143146 msg : & str ,
0 commit comments