Skip to content

Commit

Permalink
Fix test compilation with Rust 1.62.0
Browse files Browse the repository at this point in the history
Rust 1.62.0 now tries to build and run examples for non-exported macros,
as it has been doing with non-public functions. Ignore the tests, as
there is not currently a way to invoke the macros from these examples.

See rust-lang/rust#97030.
  • Loading branch information
rtzoeller committed Jul 7, 2022
1 parent f1a1e2d commit b60ca5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#![recursion_limit = "500"]
#![deny(unused)]
#![allow(unused_macros)]
#![allow(unused_macro_rules)]
#![cfg_attr(not(feature = "default"), allow(unused_imports))]
#![deny(unstable_features)]
#![deny(missing_copy_implementations)]
Expand Down
6 changes: 3 additions & 3 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ macro_rules! feature {
/// The `libc` crate must be in scope with the name `libc`.
///
/// # Example
/// ```
/// ```rust,ignore
/// libc_bitflags!{
/// pub struct ProtFlags: libc::c_int {
/// PROT_NONE;
Expand All @@ -39,7 +39,7 @@ macro_rules! feature {
/// various flags have different types, so we cast the broken ones to the right
/// type.
///
/// ```
/// ```rust,ignore
/// libc_bitflags!{
/// pub struct SaFlags: libc::c_ulong {
/// SA_NOCLDSTOP as libc::c_ulong;
Expand Down Expand Up @@ -80,7 +80,7 @@ macro_rules! libc_bitflags {
/// The `libc` crate must be in scope with the name `libc`.
///
/// # Example
/// ```
/// ```rust,ignore
/// libc_enum!{
/// pub enum ProtFlags {
/// PROT_NONE,
Expand Down

0 comments on commit b60ca5b

Please sign in to comment.