]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-fn-feature-flags.rs
Rollup merge of #64603 - gilescope:unused-lifetime-warning, r=matthewjasper
[rust.git] / src / test / ui / consts / const-fn-feature-flags.rs
1 // run-pass
2 // Test use of stabilized const fns in std formerly using individual feature gates.
3
4 use std::cell::Cell;
5
6 const CELL: Cell<i32> = Cell::new(42);
7
8 fn main() {
9     let v = CELL.get();
10     CELL.set(v+1);
11
12     assert_eq!(CELL.get(), v);
13 }