google/flatbuffers

Rust: various unsafe traits/functions meant for gencode in public API

Open

#6,627 创建于 2021年5月10日

在 GitHub 查看
 (28 评论) (2 反应) (0 负责人)C++ (25,952 star) (3,564 fork)batch import
help wantedpr-requestedrust

描述

The following safe code will segfault:

fn main() {
    let ptr: &&u8 = flatbuffers::follow_cast_ref(&[1, 2, 3, 4, 5, 6, 7, 8], 0);
    println!("{}", **ptr);
}

贡献者指南

Rust: various unsafe traits/functions meant for gencode in public API · google/flatbuffers#6627 | Good First Issue