mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
More symbol usage
This commit is contained in:
parent
c30bdfcc84
commit
df5f1777b8
50 changed files with 388 additions and 303 deletions
|
@ -12,7 +12,7 @@ use crate::{
|
|||
};
|
||||
|
||||
macro_rules! define_symbols {
|
||||
(@WITH_NAME: $($alias:ident = $value:literal),* $(,)? @PLAIN: $($name:ident),* $(,)?) => {
|
||||
(@WITH_NAME: $($alias:ident = $value:literal,)* @PLAIN: $($name:ident,)*) => {
|
||||
// Ideally we would be emitting `const` here, but then we no longer have stable addresses
|
||||
// which is what we are relying on for equality! In the future if consts can refer to
|
||||
// statics we should swap these for `const`s and have the the string literal being pointed
|
||||
|
@ -56,15 +56,6 @@ macro_rules! define_symbols {
|
|||
define_symbols! {
|
||||
@WITH_NAME:
|
||||
|
||||
__empty = "",
|
||||
unsafe_ = "unsafe",
|
||||
in_ = "in",
|
||||
super_ = "super",
|
||||
self_ = "self",
|
||||
Self_ = "Self",
|
||||
tick_static = "'static",
|
||||
dollar_crate = "$crate",
|
||||
MISSING_NAME = "[missing name]",
|
||||
INTEGER_0 = "0",
|
||||
INTEGER_1 = "1",
|
||||
INTEGER_2 = "2",
|
||||
|
@ -81,6 +72,15 @@ define_symbols! {
|
|||
INTEGER_13 = "13",
|
||||
INTEGER_14 = "14",
|
||||
INTEGER_15 = "15",
|
||||
__empty = "",
|
||||
unsafe_ = "unsafe",
|
||||
in_ = "in",
|
||||
super_ = "super",
|
||||
self_ = "self",
|
||||
Self_ = "Self",
|
||||
tick_static = "'static",
|
||||
dollar_crate = "$crate",
|
||||
MISSING_NAME = "[missing name]",
|
||||
fn_ = "fn",
|
||||
crate_ = "crate",
|
||||
underscore = "_",
|
||||
|
@ -88,16 +88,43 @@ define_symbols! {
|
|||
false_ = "false",
|
||||
let_ = "let",
|
||||
const_ = "const",
|
||||
proc_dash_macro = "proc-macro",
|
||||
aapcs_dash_unwind = "aapcs-unwind",
|
||||
avr_dash_interrupt = "avr-interrupt",
|
||||
avr_dash_non_dash_blocking_dash_interrupt = "avr-non-blocking-interrupt",
|
||||
C_dash_cmse_dash_nonsecure_dash_call = "C-cmse-nonsecure-call",
|
||||
C_dash_unwind = "C-unwind",
|
||||
cdecl_dash_unwind = "cdecl-unwind",
|
||||
fastcall_dash_unwind = "fastcall-unwind",
|
||||
msp430_dash_interrupt = "msp430-interrupt",
|
||||
platform_dash_intrinsic = "platform-intrinsic",
|
||||
ptx_dash_kernel = "ptx-kernel",
|
||||
riscv_dash_interrupt_dash_m = "riscv-interrupt-m",
|
||||
riscv_dash_interrupt_dash_s = "riscv-interrupt-s",
|
||||
rust_dash_call = "rust-call",
|
||||
rust_dash_cold = "rust-cold",
|
||||
rust_dash_intrinsic = "rust-intrinsic",
|
||||
stdcall_dash_unwind = "stdcall-unwind",
|
||||
system_dash_unwind = "system-unwind",
|
||||
sysv64_dash_unwind = "sysv64-unwind",
|
||||
thiscall_dash_unwind = "thiscall-unwind",
|
||||
vectorcall_dash_unwind = "vectorcall-unwind",
|
||||
win64_dash_unwind = "win64-unwind",
|
||||
x86_dash_interrupt = "x86-interrupt",
|
||||
|
||||
@PLAIN:
|
||||
__ra_fixup,
|
||||
aapcs,
|
||||
add_assign,
|
||||
add,
|
||||
alias,
|
||||
align_offset,
|
||||
align,
|
||||
all,
|
||||
alloc_layout,
|
||||
alloc,
|
||||
allow_internal_unsafe,
|
||||
allow,
|
||||
any,
|
||||
as_str,
|
||||
asm,
|
||||
|
@ -122,6 +149,7 @@ define_symbols! {
|
|||
call_mut,
|
||||
call_once,
|
||||
call,
|
||||
cdecl,
|
||||
Center,
|
||||
cfg_accessible,
|
||||
cfg_attr,
|
||||
|
@ -154,6 +182,7 @@ define_symbols! {
|
|||
Debug,
|
||||
default,
|
||||
Default,
|
||||
deprecated,
|
||||
deref_mut,
|
||||
deref_target,
|
||||
deref,
|
||||
|
@ -168,6 +197,7 @@ define_symbols! {
|
|||
drop_in_place,
|
||||
drop,
|
||||
dyn_metadata,
|
||||
efiapi,
|
||||
eh_catch_typeinfo,
|
||||
eh_personality,
|
||||
env,
|
||||
|
@ -176,10 +206,12 @@ define_symbols! {
|
|||
Err,
|
||||
exchange_malloc,
|
||||
exhaustive_patterns,
|
||||
export_name,
|
||||
f128,
|
||||
f16,
|
||||
f32,
|
||||
f64,
|
||||
fastcall,
|
||||
feature,
|
||||
file,
|
||||
filter_map,
|
||||
|
@ -203,6 +235,7 @@ define_symbols! {
|
|||
from_residual,
|
||||
from_usize,
|
||||
from_yeet,
|
||||
fundamental,
|
||||
future_trait,
|
||||
future,
|
||||
Future,
|
||||
|
@ -213,6 +246,7 @@ define_symbols! {
|
|||
gt,
|
||||
Hash,
|
||||
hidden,
|
||||
html_root_url,
|
||||
i128,
|
||||
i16,
|
||||
i32,
|
||||
|
@ -238,6 +272,8 @@ define_symbols! {
|
|||
iter_mut,
|
||||
iter,
|
||||
Iterator,
|
||||
keyword,
|
||||
lang,
|
||||
le,
|
||||
Left,
|
||||
len,
|
||||
|
@ -246,8 +282,12 @@ define_symbols! {
|
|||
local_inner_macros,
|
||||
log_syntax,
|
||||
lt,
|
||||
macro_export,
|
||||
macro_rules,
|
||||
macro_use,
|
||||
main,
|
||||
manually_drop,
|
||||
may_dangle,
|
||||
maybe_uninit,
|
||||
metadata_type,
|
||||
min_exhaustive_patterns,
|
||||
|
@ -273,7 +313,9 @@ define_symbols! {
|
|||
new,
|
||||
next,
|
||||
no_core,
|
||||
no_mangle,
|
||||
no_std,
|
||||
non_exhaustive,
|
||||
none,
|
||||
None,
|
||||
not,
|
||||
|
@ -305,6 +347,7 @@ define_symbols! {
|
|||
partial_ord,
|
||||
PartialEq,
|
||||
PartialOrd,
|
||||
path,
|
||||
Pending,
|
||||
phantom_data,
|
||||
pieces,
|
||||
|
@ -313,7 +356,11 @@ define_symbols! {
|
|||
pointer_like,
|
||||
poll,
|
||||
Poll,
|
||||
prelude_import,
|
||||
prelude,
|
||||
proc_macro_attribute,
|
||||
proc_macro_derive,
|
||||
proc_macro,
|
||||
quote,
|
||||
range_inclusive_new,
|
||||
Range,
|
||||
|
@ -329,6 +376,7 @@ define_symbols! {
|
|||
register_tool,
|
||||
rem_assign,
|
||||
rem,
|
||||
repr,
|
||||
result,
|
||||
Result,
|
||||
ResumeTy,
|
||||
|
@ -338,8 +386,20 @@ define_symbols! {
|
|||
rust_2021,
|
||||
rust_2024,
|
||||
rust_analyzer,
|
||||
Rust,
|
||||
rustc_allow_incoherent_impl,
|
||||
rustc_builtin_macro,
|
||||
rustc_coherence_is_core,
|
||||
rustc_const_panic_str,
|
||||
rustc_deprecated_safe_2024,
|
||||
rustc_has_incoherent_inherent_impls,
|
||||
rustc_layout_scalar_valid_range_end,
|
||||
rustc_layout_scalar_valid_range_start,
|
||||
rustc_legacy_const_generics,
|
||||
rustc_macro_transparency,
|
||||
rustc_reservation_impl,
|
||||
rustc_safe_intrinsic,
|
||||
rustc_skip_array_during_method_dispatch,
|
||||
semitransparent,
|
||||
shl_assign,
|
||||
shl,
|
||||
|
@ -352,6 +412,7 @@ define_symbols! {
|
|||
start,
|
||||
std_panic,
|
||||
std,
|
||||
stdcall,
|
||||
str,
|
||||
string,
|
||||
String,
|
||||
|
@ -361,10 +422,13 @@ define_symbols! {
|
|||
sub_assign,
|
||||
sub,
|
||||
sync,
|
||||
system,
|
||||
sysv64,
|
||||
Target,
|
||||
termination,
|
||||
test_case,
|
||||
test,
|
||||
thiscall,
|
||||
trace_macros,
|
||||
transmute_opts,
|
||||
transmute_trait,
|
||||
|
@ -376,6 +440,7 @@ define_symbols! {
|
|||
u32,
|
||||
u64,
|
||||
u8,
|
||||
unadjusted,
|
||||
Unknown,
|
||||
unpin,
|
||||
unreachable_2015,
|
||||
|
@ -383,7 +448,11 @@ define_symbols! {
|
|||
unreachable,
|
||||
unsafe_cell,
|
||||
unsize,
|
||||
unstable,
|
||||
usize,
|
||||
v1,
|
||||
va_list
|
||||
va_list,
|
||||
vectorcall,
|
||||
wasm,
|
||||
win64,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue