summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-eval/issue-114994.rs
blob: a4cb2e61e5f6fd7afbc213e5cebfb1ba2960d696 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// This checks that function pointer signatures containing &mut T types
// work in a constant context: see issue #114994.
//
// check-pass

const fn use_const_fn(_f: fn(&mut String)) {
    ()
}

const fn get_some_fn() -> fn(&mut String) {
    String::clear
}

const fn some_const_fn() {
    let _f: fn(&mut String) = String::clear;
}

fn main() {}