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;
1313pub mod codegen_fn_attrs;
1414pub mod cstore;
1515pub mod dependency_format;
16+ pub mod limits;
1617
1718#[ derive( HashStable_Generic ) ]
1819pub struct LibFeatures {
Original file line number Diff line number Diff line change 55//! this via an attribute on the crate like `#![recursion_limit="22"]`. This pass
66//! just peeks and looks for that attribute.
77
8- use crate :: bug;
98use rustc_ast as ast;
109use rustc_data_structures:: sync:: OnceCell ;
1110use rustc_session:: { Limit , Session } ;
@@ -52,10 +51,10 @@ fn update_limit(
5251 IntErrorKind :: Empty => "`limit` must be a non-negative integer" ,
5352 IntErrorKind :: InvalidDigit => "not a valid integer" ,
5453 IntErrorKind :: NegOverflow => {
55- bug ! ( "`limit` should never negatively overflow" )
54+ panic ! ( "`limit` should never negatively overflow" )
5655 }
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) ,
5958 } ;
6059
6160 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;
1919use rustc_lint:: LintStore ;
2020use rustc_middle:: arena:: Arena ;
2121use rustc_middle:: dep_graph:: DepGraph ;
22- use rustc_middle:: middle;
2322use rustc_middle:: ty:: query:: Providers ;
2423use rustc_middle:: ty:: { self , GlobalCtxt , ResolverOutputs , TyCtxt } ;
2524use rustc_mir as mir;
@@ -186,7 +185,7 @@ pub fn register_plugins<'a>(
186185 }
187186
188187 sess. time ( "recursion_limit" , || {
189- middle :: limits:: update_limits ( sess, & krate) ;
188+ rustc_crate :: limits:: update_limits ( sess, & krate) ;
190189 } ) ;
191190
192191 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};
44
55pub mod exported_symbols;
66pub mod lang_items;
7- pub mod limits;
87pub mod privacy;
98pub mod region;
109pub mod resolve_lifetime;
You can’t perform that action at this time.
0 commit comments