mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
[rust] fix some miri errors #1937
`cargo +nightly miri test --no-fail-fast -- --test-threads 1 --nocapture`
This commit is contained in:
parent
8c1fd5b16d
commit
6e85a3c7ea
@ -17,6 +17,8 @@ fn main() {
|
||||
// The bindgen::Builder is the main entry point to bindgen, and lets you
|
||||
// build up options for the resulting bindings.
|
||||
//
|
||||
// https://docs.rs/bindgen/*/bindgen/struct.Builder.html
|
||||
//
|
||||
// allow .blacklist_function instead of .blocklist_function for now,
|
||||
// until we update bindgen to >= 0.58.
|
||||
#[allow(deprecated)]
|
||||
@ -48,6 +50,9 @@ fn main() {
|
||||
.blacklist_item("MSG_.*")
|
||||
.blacklist_item("N[^C].*")
|
||||
.blacklist_type("_bindgen.*")
|
||||
// https://github.com/dankamongmen/notcurses/pull/1937
|
||||
// https://github.com/rust-lang/rust-bindgen/issues/1651
|
||||
.layout_tests(false)
|
||||
// Don't derive the Copy trait on types with destructors.
|
||||
.no_copy("ncdirect")
|
||||
.no_copy("ncdplot")
|
||||
|
@ -21,6 +21,7 @@
|
||||
//! ```rust
|
||||
//! use libnotcurses_sys::*;
|
||||
//!
|
||||
//! # #[cfg(not(miri))]
|
||||
//! fn main() -> NcResult<()> {
|
||||
//! let mut nc = Nc::with_flags(NCOPTION_NO_ALTERNATE_SCREEN)?;
|
||||
//! let plane = nc.stdplane();
|
||||
@ -29,6 +30,8 @@
|
||||
//! nc.stop()?;
|
||||
//! Ok(())
|
||||
//! }
|
||||
//! # #[cfg(miri)]
|
||||
//! # fn main() {}
|
||||
//! ```
|
||||
//!
|
||||
//! Although you still have to manually call the `stop()` method for [`Nc`] and
|
||||
@ -66,6 +69,7 @@
|
||||
//!
|
||||
//! use libnotcurses_sys::*;
|
||||
//!
|
||||
//! # #[cfg(not(miri))]
|
||||
//! fn main() {
|
||||
//! let options = ffi::notcurses_options {
|
||||
//! termtype: null(),
|
||||
@ -93,7 +97,8 @@
|
||||
//! }
|
||||
//! }
|
||||
//! }
|
||||
//!
|
||||
//! # #[cfg(miri)]
|
||||
//! # fn main() {}
|
||||
//! ```
|
||||
//!
|
||||
//! ### The `notcurses` C API docs
|
||||
|
Loading…
Reference in New Issue
Block a user