Skip to content

Commit

Permalink
Merge pull request #18662 from lnicola/sync-from-rust
Browse files Browse the repository at this point in the history
internal: Sync from downstream
  • Loading branch information
lnicola authored Dec 11, 2024
2 parents 41f3319 + c1433e9 commit b248e53
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 34 deletions.
25 changes: 12 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ tt = { path = "./crates/tt", version = "0.0.0" }
vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
vfs = { path = "./crates/vfs", version = "0.0.0" }

ra-ap-rustc_lexer = { version = "0.80", default-features = false }
ra-ap-rustc_parse_format = { version = "0.80", default-features = false }
ra-ap-rustc_index = { version = "0.80", default-features = false }
ra-ap-rustc_abi = { version = "0.80", default-features = false }
ra-ap-rustc_pattern_analysis = { version = "0.80", default-features = false }
ra-ap-rustc_lexer = { version = "0.85", default-features = false }
ra-ap-rustc_parse_format = { version = "0.85", default-features = false }
ra-ap-rustc_index = { version = "0.85", default-features = false }
ra-ap-rustc_abi = { version = "0.85", default-features = false }
ra-ap-rustc_pattern_analysis = { version = "0.85", default-features = false }

# local crates that aren't published to crates.io. These should not have versions.
test-fixture = { path = "./crates/test-fixture" }
Expand Down
1 change: 0 additions & 1 deletion crates/hir-expand/src/inert_attr_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down
13 changes: 2 additions & 11 deletions crates/ide-db/src/generated/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 1 addition & 3 deletions crates/profile/src/memory_usage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9b4d7c6a40b328d212095c28670c629facf1557d
5a6036a1802262f8cf02192b02026688d396f1d7

0 comments on commit b248e53

Please sign in to comment.