about summary refs log tree commit diff
path: root/library/std/src/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-12 08:18:41 +0000
committerbors <bors@rust-lang.org>2025-09-12 08:18:41 +0000
commitac4495a10db552483c0c0a0049962850ca4123c2 (patch)
treeeb2f73ed41dc327c2ae834e1514caf0ee1ea33b4 /library/std/src/lib.rs
parent8e2ed71effd5f81bff319c0c7adaca42084e2a71 (diff)
parent4c992199598b4fddc25d52f40fa3642c9e065e60 (diff)
downloadrust-ac4495a10db552483c0c0a0049962850ca4123c2.tar.gz
rust-ac4495a10db552483c0c0a0049962850ca4123c2.zip
Auto merge of #146019 - joboet:better-dlsym, r=tgross35
std: optimize `dlsym!` macro and add a test for it

The `dlsym!` macro always ensures that the name string is nul-terminated, so there is no need to perform the check at runtime. Also, acquire loads are generally faster than a load and a barrier, so use them. This is only false in the case where the symbol is missing, but that shouldn't matter too much.
Diffstat (limited to 'library/std/src/lib.rs')
-rw-r--r--library/std/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index 97db0d6ab75..5725816c600 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -350,6 +350,7 @@
 #![feature(float_gamma)]
 #![feature(float_minimum_maximum)]
 #![feature(fmt_internals)]
+#![feature(fn_ptr_trait)]
 #![feature(generic_atomic)]
 #![feature(hasher_prefixfree_extras)]
 #![feature(hashmap_internals)]