Skip to content

Commit 2cc8c0f

Browse files
committed
Improve comments about limits.
1 parent b043aa6 commit 2cc8c0f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: compiler/rustc_middle/src/middle/limits.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
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
1110
use 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.
4444
pub fn get_recursion_limit(krate_attrs: &[impl AttributeExt], sess: &Session) -> Limit {
4545
get_limit(krate_attrs, sess, sym::recursion_limit, Limit::new(128))
4646
}

0 commit comments

Comments
 (0)