Skip to content

Commit e647fbc

Browse files
committed
tests: conditionally enable feature(lint_reasons)
Required for CI on Rust 1.78. Signed-off-by: Benno Lossin <benno.lossin@proton.me>
1 parent 8a8bb52 commit e647fbc

7 files changed

Lines changed: 11 additions & 0 deletions

File tree

tests/alloc_fail.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![cfg_attr(feature = "alloc", feature(allocator_api))]
2+
#![cfg_attr(not(RUSTC_LINT_REASONS_IS_STABLE), feature(lint_reasons))]
23

34
#[cfg(all(
45
feature = "alloc",

tests/const-generic-default.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(not(RUSTC_LINT_REASONS_IS_STABLE), feature(lint_reasons))]
2+
13
use pin_init::*;
24

35
#[pin_data]

tests/many_generics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(not(RUSTC_LINT_REASONS_IS_STABLE), feature(lint_reasons))]
2+
13
use core::{marker::PhantomPinned, pin::Pin};
24
use pin_init::*;
35

tests/ring_buf.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![allow(clippy::undocumented_unsafe_blocks)]
2+
#![cfg_attr(not(RUSTC_LINT_REASONS_IS_STABLE), feature(lint_reasons))]
23
#![cfg_attr(feature = "alloc", feature(allocator_api))]
34

45
use core::{

tests/ui.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(not(RUSTC_LINT_REASONS_IS_STABLE), feature(lint_reasons))]
2+
13
#[cfg(not(any(miri, NO_UI_TESTS)))]
24
#[test]
35
fn compile_fail() {

tests/ui/expand/many_generics.expanded.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![feature(lint_reasons)]
12
use core::{marker::PhantomPinned, pin::Pin};
23
use pin_init::*;
34
trait Bar<'a, const ID: usize = 0> {

tests/zeroing.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(not(RUSTC_LINT_REASONS_IS_STABLE), feature(lint_reasons))]
2+
13
use std::{marker::PhantomPinned, ptr::addr_of_mut};
24

35
use pin_init::*;

0 commit comments

Comments
 (0)