Skip to content

Commit 99af35c

Browse files
committed
Remove nightly cfg from impl crate
We can use `rustversion` for this. For some of the tests its still needed because of this error: ``` error[E0658]: non-inline modules in proc macro input are unstable --> tests/error/mod.rs:53:1 | 53 | mod nightly; | ^^^^^^^^^^^^ | = note: see issue #54727 <rust-lang/rust#54727> for more information ```
1 parent 330e425 commit 99af35c

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

impl/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ features = ["full"]
4444
rustdoc-args = ["--cfg", "docsrs"]
4545

4646
[lints.rust]
47-
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(ci)", "cfg(nightly)"] }
47+
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(ci)"] }
4848

4949
[features]
5050
default = []

impl/build.rs

-15
This file was deleted.

impl/doc/error.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ Backtraces don't work though, because the `Backtrace` type is only available in
5757
## Example usage
5858

5959
```rust
60-
# #![cfg_attr(nightly, feature(error_generic_member_access))]
60+
# #![rustversion::attr(nightly, feature(error_generic_member_access))]
6161
// Nightly requires enabling this feature:
6262
// #![feature(error_generic_member_access)]
63-
# #[cfg(not(nightly))] fn main() {}
64-
# #[cfg(nightly)] fn main() {
63+
# #[rustversion::not(nightly)] fn main() {}
64+
# #[rustversion::nightly] fn main() {
6565
# use core::error::{request_ref, request_value, Error as __};
6666
# use std::backtrace::Backtrace;
6767
#

tests/generics.rs

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ struct WrappedDouble<T: Clone, U: Clone>(T, U);
3838
#[from(forward)]
3939
struct WrappedDouble2<T: Clone, U: Clone>(T, U);
4040

41-
#[cfg(nightly)]
4241
#[derive(
4342
From,
4443
FromStr,

0 commit comments

Comments
 (0)