Skip to content

Commit

Permalink
tests: update tests/ui/issues/issue-2190-1.rs
Browse files Browse the repository at this point in the history
- Convert `run-pass` to `check-pass`, the test is about closure
  inference based on expected type, does not need to run-pass.
- Dropped unnecessary ignores.
  • Loading branch information
jieyouxu committed Jan 23, 2025
1 parent e00e10c commit a11227b
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions tests/ui/issues/issue-2190-1.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
//@ run-pass
#![allow(unused_must_use)]
#![allow(non_upper_case_globals)]

//@ ignore-emscripten no threads
//@ check-pass

use std::thread::Builder;

static generations: usize = 1024+256+128+49;
static GENERATIONS: usize = 1024+256+128+49;

fn spawn(mut f: Box<dyn FnMut() + 'static + Send>) {
Builder::new().stack_size(32 * 1024).spawn(move|| f());
Builder::new().stack_size(32 * 1024).spawn(move || f());
}

fn child_no(x: usize) -> Box<dyn FnMut() + 'static + Send> {
Box::new(move|| {
if x < generations {
Box::new(move || {
if x < GENERATIONS {
spawn(child_no(x+1));
}
})
Expand Down

0 comments on commit a11227b

Please sign in to comment.