Skip to content

Commit

Permalink
Remove nightly cfg from impl crate
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
JelteF committed Aug 6, 2024
1 parent 330e425 commit 99af35c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
2 changes: 1 addition & 1 deletion impl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ features = ["full"]
rustdoc-args = ["--cfg", "docsrs"]

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

[features]
default = []
Expand Down
15 changes: 0 additions & 15 deletions impl/build.rs

This file was deleted.

6 changes: 3 additions & 3 deletions impl/doc/error.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ Backtraces don't work though, because the `Backtrace` type is only available in
## Example usage

```rust
# #![cfg_attr(nightly, feature(error_generic_member_access))]
# #![rustversion::attr(nightly, feature(error_generic_member_access))]
// Nightly requires enabling this feature:
// #![feature(error_generic_member_access)]
# #[cfg(not(nightly))] fn main() {}
# #[cfg(nightly)] fn main() {
# #[rustversion::not(nightly)] fn main() {}
# #[rustversion::nightly] fn main() {
# use core::error::{request_ref, request_value, Error as __};
# use std::backtrace::Backtrace;
#
Expand Down
1 change: 0 additions & 1 deletion tests/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ struct WrappedDouble<T: Clone, U: Clone>(T, U);
#[from(forward)]
struct WrappedDouble2<T: Clone, U: Clone>(T, U);

#[cfg(nightly)]
#[derive(
From,
FromStr,
Expand Down

0 comments on commit 99af35c

Please sign in to comment.