mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: extract declarations of builtin types
This commit is contained in:
8
rust/tools/builtins/BUILD.bazel
Normal file
8
rust/tools/builtins/BUILD.bazel
Normal file
@@ -0,0 +1,8 @@
|
||||
load("//misc/bazel:pkg.bzl", "codeql_pkg_files")
|
||||
|
||||
codeql_pkg_files(
|
||||
name = "builtins",
|
||||
srcs = glob(["*.rs"]),
|
||||
prefix = "builtins",
|
||||
visibility = ["//rust:__subpackages__"],
|
||||
)
|
||||
25
rust/tools/builtins/types.rs
Normal file
25
rust/tools/builtins/types.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
// The Language Prelude: https://doc.rust-lang.org/reference/names/preludes.html#language-prelude
|
||||
|
||||
// Type namespace
|
||||
// Boolean type
|
||||
pub struct bool;
|
||||
// Textual types
|
||||
pub struct char;
|
||||
pub struct str;
|
||||
// Integer types
|
||||
pub struct i8;
|
||||
pub struct i16;
|
||||
pub struct i32;
|
||||
pub struct i64;
|
||||
pub struct i128;
|
||||
pub struct u8;
|
||||
pub struct u16;
|
||||
pub struct u32;
|
||||
pub struct u64;
|
||||
pub struct u128;
|
||||
// Machine-dependent integer types
|
||||
pub struct usize;
|
||||
pub struct isize;
|
||||
// floating-point types
|
||||
pub struct f32;
|
||||
pub struct f64;
|
||||
Reference in New Issue
Block a user