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