Skip to content

Commit b8f357c

Browse files
committed
Make it compile, at least.
Since last commit, Rust changed the behavior of `extern static`; see rust-lang/rust#35112 In the future, this should be change to an unsafe block, but now it suffices to turn off the error by the `#[allow(...)]` switch.
1 parent 10025d3 commit b8f357c

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

libhdf5-sys/src/h5e.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ extern {
7171

7272
pub use self::globals::*;
7373

74+
#[allow(safe_extern_statics)]
7475
#[cfg(not(target_env = "msvc"))]
7576
mod globals {
7677
pub use h5i::hid_t as id_t;

libhdf5-sys/src/h5g.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ impl Default for H5G_info_t {
4242
fn default() -> H5G_info_t { unsafe { ::std::mem::zeroed() } }
4343
}
4444

45+
#[allow(safe_extern_statics)]
4546
extern {
4647
pub fn H5Gcreate2(loc_id: hid_t, name: *const c_char, lcpl_id: hid_t, gcpl_id: hid_t, gapl_id:
4748
hid_t) -> hid_t;

libhdf5-sys/src/h5p.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ mod globals {
154154
pub static H5P_LST_LINK_ACCESS: &'static id_t = &H5P_LST_LINK_ACCESS_g;
155155
}
156156

157+
#[allow(safe_extern_statics)]
157158
#[cfg(all(hdf5_1_8_14, not(target_env = "msvc")))]
158159
mod globals {
159160
pub use h5i::hid_t as id_t;

libhdf5-sys/src/h5t.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ extern {
301301

302302
pub use self::globals::*;
303303

304+
#[allow(safe_extern_statics)]
304305
#[cfg(not(target_env = "msvc"))]
305306
mod globals {
306307
pub use h5i::hid_t as id_t;

0 commit comments

Comments
 (0)