File tree 1 file changed +7
-7
lines changed
compiler/rustc_middle/src/middle
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
//! 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
5
6
//!
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.
10
9
11
10
use std:: num:: IntErrorKind ;
12
11
@@ -41,6 +40,7 @@ pub fn provide(providers: &mut Providers) {
41
40
}
42
41
}
43
42
43
+ // This one is separate because it must be read prior to macro expansion.
44
44
pub fn get_recursion_limit ( krate_attrs : & [ impl AttributeExt ] , sess : & Session ) -> Limit {
45
45
get_limit ( krate_attrs, sess, sym:: recursion_limit, Limit :: new ( 128 ) )
46
46
}
You can’t perform that action at this time.
0 commit comments