Skip to content

Commit 65f48f3

Browse files
committed
Fix compilation on docs.rs (hopefully)
Use a feature instead of a cfg flag.. Release v0.1.5
1 parent cfd84aa commit 65f48f3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Cargo.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "static-reflect"
3-
version = "0.1.4"
3+
version = "0.1.5"
44
edition = "2018"
55
description = "Static type information, giving a form of compile-time reflection"
66
license = "MIT"
@@ -21,9 +21,14 @@ never = []
2121
# Support the 'builtin' alternative to stdlib types
2222
builtins = []
2323

24+
# Workaround for outdated nightly
25+
docs-rs = []
26+
27+
2428
[workspace]
2529
members = ["lib/*"]
2630

2731
# Workaround for outdated nightly
2832
[package.metadata.docs.rs]
29-
rustc-args = ["--cfg", "docs_rs"]
33+
features = ["docs-rs"]
34+

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* However it breaks on the version that docs.rs is using (as of this writing).
2525
* Therefore, we have to turn it off there.
2626
*/
27-
#![cfg_attr(not(docs_rs), feature(const_fn_trait_bound))]
27+
#![cfg_attr(not(feature="docs-rs"), feature(const_fn_trait_bound))]
2828
#![cfg_attr(feature = "never", feature(never_type))]
2929

3030
mod macros;

0 commit comments

Comments
 (0)