File tree Expand file tree Collapse file tree 4 files changed +5
-7
lines changed Expand file tree Collapse file tree 4 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ use rustc_span::symbol::Symbol;
13
13
pub mod codegen_fn_attrs;
14
14
pub mod cstore;
15
15
pub mod dependency_format;
16
+ pub mod limits;
16
17
17
18
#[ derive( HashStable_Generic ) ]
18
19
pub struct LibFeatures {
Original file line number Diff line number Diff line change 5
5
//! this via an attribute on the crate like `#![recursion_limit="22"]`. This pass
6
6
//! just peeks and looks for that attribute.
7
7
8
- use crate :: bug;
9
8
use rustc_ast as ast;
10
9
use rustc_data_structures:: sync:: OnceCell ;
11
10
use rustc_session:: { Limit , Session } ;
@@ -52,10 +51,10 @@ fn update_limit(
52
51
IntErrorKind :: Empty => "`limit` must be a non-negative integer" ,
53
52
IntErrorKind :: InvalidDigit => "not a valid integer" ,
54
53
IntErrorKind :: NegOverflow => {
55
- bug ! ( "`limit` should never negatively overflow" )
54
+ panic ! ( "`limit` should never negatively overflow" )
56
55
}
57
- IntErrorKind :: Zero => bug ! ( "zero is a valid `limit`" ) ,
58
- kind => bug ! ( "unimplemented IntErrorKind variant: {:?}" , kind) ,
56
+ IntErrorKind :: Zero => panic ! ( "zero is a valid `limit`" ) ,
57
+ kind => panic ! ( "unimplemented IntErrorKind variant: {:?}" , kind) ,
59
58
} ;
60
59
61
60
err. span_label ( value_span, error_str) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ use rustc_hir::Crate;
19
19
use rustc_lint:: LintStore ;
20
20
use rustc_middle:: arena:: Arena ;
21
21
use rustc_middle:: dep_graph:: DepGraph ;
22
- use rustc_middle:: middle;
23
22
use rustc_middle:: ty:: query:: Providers ;
24
23
use rustc_middle:: ty:: { self , GlobalCtxt , ResolverOutputs , TyCtxt } ;
25
24
use rustc_mir as mir;
@@ -186,7 +185,7 @@ pub fn register_plugins<'a>(
186
185
}
187
186
188
187
sess. time ( "recursion_limit" , || {
189
- middle :: limits:: update_limits ( sess, & krate) ;
188
+ rustc_crate :: limits:: update_limits ( sess, & krate) ;
190
189
} ) ;
191
190
192
191
let mut lint_store = rustc_lint:: new_lint_store (
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ use rustc_span::def_id::{CrateNum, LOCAL_CRATE};
4
4
5
5
pub mod exported_symbols;
6
6
pub mod lang_items;
7
- pub mod limits;
8
7
pub mod privacy;
9
8
pub mod region;
10
9
pub mod resolve_lifetime;
You can’t perform that action at this time.
0 commit comments