Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emit rustc-check-cfg info and fix doc_lazy_continuation clippy warning #200

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/target
**/*.rs.bk
tags
3 changes: 3 additions & 0 deletions color-spantrace/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ enum Toolchain {

impl Toolchain {
fn set_feature(self) {
println!("cargo:rustc-check-cfg=cfg(nightly)");
println!("cargo:rustc-check-cfg=cfg(beta)");
println!("cargo:rustc-check-cfg=cfg(stable)");
match self {
Toolchain::Nightly => println!("cargo:rustc-cfg=nightly"),
Toolchain::Beta => println!("cargo:rustc-cfg=beta"),
Expand Down
7 changes: 7 additions & 0 deletions eyre/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ use std::{
};

fn main() {
println!("cargo:rustc-check-cfg=cfg(nightly)");
println!("cargo:rustc-check-cfg=cfg(track_caller)");
println!("cargo:rustc-check-cfg=cfg(generic_member_access)");
println!("cargo:rustc-check-cfg=cfg(eyre_no_fmt_args_capture)");
println!("cargo:rustc-check-cfg=cfg(backtrace)");
println!("cargo:rustc-check-cfg=cfg(eyre_no_fmt_arguments_as_str)");
println!("cargo:rustc-check-cfg=cfg(doc_cfg)");
let ac = autocfg::new();

// https://github.com/rust-lang/rust/issues/99301 [nightly]
Expand Down
16 changes: 8 additions & 8 deletions eyre/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
//! to avoid using `eyre::Report` as your public error type.
//!
//! - You export an undocumented error interface that is otherwise still
//! accessible via downcast, making it hard for users to react to specific
//! errors while not preventing them from depending on details you didn't mean
//! to make part of your public API.
//! accessible via downcast, making it hard for users to react to specific
//! errors while not preventing them from depending on details you didn't mean
//! to make part of your public API.
//! - This in turn makes the error types of all libraries you use a part of
//! your public API as well, and makes changing any of those libraries into
//! undetectable runtime breakage.
//! your public API as well, and makes changing any of those libraries into
//! undetectable runtime breakage.
//! - If many of your errors are constructed from strings, you encourage your
//! users to use string comparison for reacting to specific errors, which is
//! brittle and turns updating error messages into potentially undetectable
//! runtime breakage.
//! users to use string comparison for reacting to specific errors, which is
//! brittle and turns updating error messages into potentially undetectable
//! runtime breakage.
//!
//! ## Details
//!
Expand Down
Loading