summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/large_vec.rs
blob: 34d5bf399544dc85df45491b65f07802f6d22ba4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// See #1470.

impl Environment {
    pub fn new_root() -> Rc<RefCell<Environment>> {
        let mut env = Environment::new();
        let builtin_functions = &[("println",
                                   Function::NativeVoid(CallSign {
                                                            num_params: 0,
                                                            variadic: true,
                                                            param_types: vec![],
                                                        },
                                                        native_println)),
                                  ("run_http_server",
                                   Function::NativeVoid(CallSign {
                                                            num_params: 1,
                                                            variadic: false,
                                                            param_types:
                                                                vec![Some(ConstraintType::Function)],
                                                        },
                                                        native_run_http_server)),
                                  ("len",
                                   Function::NativeReturning(CallSign {
                                                                 num_params: 1,
                                                                 variadic: false,
                                                                 param_types: vec![None],
                                                             },
                                                             native_len))];
    }
}