File: alloca.rs

package info (click to toggle)
rust-static-alloc 0.2.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 284 kB
  • sloc: makefile: 4
file content (10 lines) | stat: -rw-r--r-- 194 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
use static_alloc::leaked::Alloca;

#[test]
fn alloca_small() {
    let alloc = Alloca::<usize>::new(16)
        .unwrap();
    alloc.run(|slice| {
        assert_eq!(slice.len(), 16);
    });
}