Skip to content

Commit 7706273

Browse files
authored
emit rustc-check-cfg info and fix doc_lazy_continuation clippy warning (#200)
This should resolve clippy warnings on master
1 parent fc83cb8 commit 7706273

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
/target
22
**/*.rs.bk
3-
tags

color-spantrace/build.rs

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ enum Toolchain {
2020

2121
impl Toolchain {
2222
fn set_feature(self) {
23+
println!("cargo:rustc-check-cfg=cfg(nightly)");
24+
println!("cargo:rustc-check-cfg=cfg(beta)");
25+
println!("cargo:rustc-check-cfg=cfg(stable)");
2326
match self {
2427
Toolchain::Nightly => println!("cargo:rustc-cfg=nightly"),
2528
Toolchain::Beta => println!("cargo:rustc-cfg=beta"),

eyre/build.rs

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ use std::{
55
};
66

77
fn main() {
8+
println!("cargo:rustc-check-cfg=cfg(nightly)");
9+
println!("cargo:rustc-check-cfg=cfg(track_caller)");
10+
println!("cargo:rustc-check-cfg=cfg(generic_member_access)");
11+
println!("cargo:rustc-check-cfg=cfg(eyre_no_fmt_args_capture)");
12+
println!("cargo:rustc-check-cfg=cfg(backtrace)");
13+
println!("cargo:rustc-check-cfg=cfg(eyre_no_fmt_arguments_as_str)");
14+
println!("cargo:rustc-check-cfg=cfg(doc_cfg)");
815
let ac = autocfg::new();
916

1017
// https://github.com/rust-lang/rust/issues/99301 [nightly]

eyre/src/lib.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@
3939
//! to avoid using `eyre::Report` as your public error type.
4040
//!
4141
//! - You export an undocumented error interface that is otherwise still
42-
//! accessible via downcast, making it hard for users to react to specific
43-
//! errors while not preventing them from depending on details you didn't mean
44-
//! to make part of your public API.
42+
//! accessible via downcast, making it hard for users to react to specific
43+
//! errors while not preventing them from depending on details you didn't mean
44+
//! to make part of your public API.
4545
//! - This in turn makes the error types of all libraries you use a part of
46-
//! your public API as well, and makes changing any of those libraries into
47-
//! undetectable runtime breakage.
46+
//! your public API as well, and makes changing any of those libraries into
47+
//! undetectable runtime breakage.
4848
//! - If many of your errors are constructed from strings, you encourage your
49-
//! users to use string comparison for reacting to specific errors, which is
50-
//! brittle and turns updating error messages into potentially undetectable
51-
//! runtime breakage.
49+
//! users to use string comparison for reacting to specific errors, which is
50+
//! brittle and turns updating error messages into potentially undetectable
51+
//! runtime breakage.
5252
//!
5353
//! ## Details
5454
//!

0 commit comments

Comments
 (0)