about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2024-12-11 11:49:08 +0200
committerLaurențiu Nicola <lnicola@dend.ro>2024-12-11 11:49:08 +0200
commit5db2aa865cdc4bf0634fdcbdd8d201253938f02a (patch)
tree6ba3b87d4ac3b10b67159211a493f785c76ee0fa /src/tools/rust-analyzer
parent1649eb6dd74507bbd9513464609fcd5a9bcc655b (diff)
parent5a6036a1802262f8cf02192b02026688d396f1d7 (diff)
downloadrust-5db2aa865cdc4bf0634fdcbdd8d201253938f02a.tar.gz
rust-5db2aa865cdc4bf0634fdcbdd8d201253938f02a.zip
Merge from rust-lang/rust
Diffstat (limited to 'src/tools/rust-analyzer')
-rw-r--r--src/tools/rust-analyzer/crates/hir-expand/src/inert_attr_macro.rs1
-rw-r--r--src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs13
-rw-r--r--src/tools/rust-analyzer/crates/profile/src/memory_usage.rs4
3 files changed, 3 insertions, 15 deletions
diff --git a/src/tools/rust-analyzer/crates/hir-expand/src/inert_attr_macro.rs b/src/tools/rust-analyzer/crates/hir-expand/src/inert_attr_macro.rs
index 95dfe56ff54..9a7a1a01a09 100644
--- a/src/tools/rust-analyzer/crates/hir-expand/src/inert_attr_macro.rs
+++ b/src/tools/rust-analyzer/crates/hir-expand/src/inert_attr_macro.rs
@@ -695,7 +695,6 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
         template!(List: r#"cfg = "...", module = "...", kind = "...""#), DuplicatesOk,
     ),
     rustc_attr!(TEST, rustc_symbol_name, Normal, template!(Word), WarnFollowing),
-    rustc_attr!(TEST, rustc_polymorphize_error, Normal, template!(Word), WarnFollowing),
     rustc_attr!(TEST, rustc_def_path, Normal, template!(Word), WarnFollowing),
     rustc_attr!(TEST, rustc_mir, Normal, template!(List: "arg1, arg2, ..."), DuplicatesOk),
     gated!(
diff --git a/src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs b/src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs
index 266109765ab..b97dfb3b8ef 100644
--- a/src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs
+++ b/src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs
@@ -3936,17 +3936,8 @@ The tracking issue for this feature is: [#117693]
 "##,
     },
     Lint {
-        label: "core_pattern_type",
-        description: r##"# `core_pattern_type`
-
-This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
-
-------------------------
-"##,
-    },
-    Lint {
-        label: "core_pattern_types",
-        description: r##"# `core_pattern_types`
+        label: "pattern_type_macro",
+        description: r##"# `pattern_type_macro`
 
 This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use.
 
diff --git a/src/tools/rust-analyzer/crates/profile/src/memory_usage.rs b/src/tools/rust-analyzer/crates/profile/src/memory_usage.rs
index 660afff3dca..006748ddb08 100644
--- a/src/tools/rust-analyzer/crates/profile/src/memory_usage.rs
+++ b/src/tools/rust-analyzer/crates/profile/src/memory_usage.rs
@@ -62,15 +62,13 @@ fn memusage_linux() -> MemoryUsage {
     // mallinfo2 is very recent, so its presence needs to be detected at runtime.
     // Both are abysmally slow.
 
-    use std::ffi::CStr;
     use std::sync::atomic::{AtomicUsize, Ordering};
 
     static MALLINFO2: AtomicUsize = AtomicUsize::new(1);
 
     let mut mallinfo2 = MALLINFO2.load(Ordering::Relaxed);
     if mallinfo2 == 1 {
-        let cstr = CStr::from_bytes_with_nul(b"mallinfo2\0").unwrap();
-        mallinfo2 = unsafe { libc::dlsym(libc::RTLD_DEFAULT, cstr.as_ptr()) } as usize;
+        mallinfo2 = unsafe { libc::dlsym(libc::RTLD_DEFAULT, c"mallinfo2".as_ptr()) } as usize;
         // NB: races don't matter here, since they'll always store the same value
         MALLINFO2.store(mallinfo2, Ordering::Relaxed);
     }