File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
compiler/rustc_middle/src/middle Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 11//! Registering limits:
2- //! * recursion_limit,
3- //! * move_size_limit, and
4- //! * type_length_limit
2+ //! - recursion_limit
3+ //! - move_size_limit
4+ //! - type_length_limit
5+ //! - pattern_complexity_limit
56//!
6- //! There are various parts of the compiler that must impose arbitrary limits
7- //! on how deeply they recurse to prevent stack overflow. Users can override
8- //! this via an attribute on the crate like `#![recursion_limit="22"]`. This pass
9- //! just peeks and looks for that attribute.
7+ //! Users can override these limits via an attribute on the crate like
8+ //! `#![recursion_limit="22"]`. This pass just looks for that attribute.
109
1110use std:: num:: IntErrorKind ;
1211
@@ -41,6 +40,7 @@ pub fn provide(providers: &mut Providers) {
4140 }
4241}
4342
43+ // This one is separate because it must be read prior to macro expansion.
4444pub fn get_recursion_limit ( krate_attrs : & [ impl AttributeExt ] , sess : & Session ) -> Limit {
4545 get_limit ( krate_attrs, sess, sym:: recursion_limit, Limit :: new ( 128 ) )
4646}
You can’t perform that action at this time.
0 commit comments