mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
fix: Check stack depth to prevent stack overflows in create_memory_map
This commit is contained in:
parent
7c1be82cd9
commit
142ef764ee
2 changed files with 48 additions and 16 deletions
|
@ -2828,7 +2828,7 @@ fn unsized_local() {
|
|||
|
||||
#[test]
|
||||
fn recursive_adt() {
|
||||
check_answer(
|
||||
check_fail(
|
||||
r#"
|
||||
//- minicore: coerce_unsized, index, slice
|
||||
pub enum TagTree {
|
||||
|
@ -2849,6 +2849,6 @@ fn recursive_adt() {
|
|||
TAG_TREE
|
||||
};
|
||||
"#,
|
||||
|b, _| assert_eq!(b[0] % 8, 0),
|
||||
|e| matches!(e, ConstEvalError::MirEvalError(MirEvalError::StackOverflow)),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue