From fd7f099051b0d3eeb817bdf6668f0963eb3a5a0d Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Fri, 26 Apr 2024 14:23:22 +0800 Subject: [PATCH] ignore doctests Signed-off-by: Bugen Zhao --- .github/workflows/check-test.yaml | 4 ++-- derive/src/lib.rs | 14 +++++++------- src/report.rs | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml index 0a69e8a..ea2b929 100644 --- a/.github/workflows/check-test.yaml +++ b/.github/workflows/check-test.yaml @@ -33,6 +33,6 @@ jobs: - name: Clippy run: cargo clippy ${{ matrix.features }} -- -D warnings - name: Run tests - run: cargo test ${{ matrix.features }} + run: cargo test --workspace ${{ matrix.features }} - name: Generate docs - run: RUSTDOCFLAGS="-Dwarnings" cargo doc --no-deps + run: RUSTDOCFLAGS="-Dwarnings --cfg docsrs" cargo doc --no-deps diff --git a/derive/src/lib.rs b/derive/src/lib.rs index a7432f7..118f834 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -17,7 +17,7 @@ mod thiserror; /// /// # Example /// -/// ```no_run +/// ```ignore /// #[derive(Debug, thiserror::Error, thiserror_ext::Construct)] /// enum Error { /// #[error("unsupported feature: {0}")] @@ -65,7 +65,7 @@ pub fn derive_construct(input: TokenStream) -> TokenStream { /// /// # Example /// -/// ```no_run +/// ```ignore /// #[derive(Debug, thiserror::Error, thiserror_ext::ContextInto)] /// enum Error { /// #[error("cannot parse int from `{from}`")] @@ -126,7 +126,7 @@ pub fn derive_context_into(input: TokenStream) -> TokenStream { /// /// ## Example /// -/// ```no_run +/// ```ignore /// #[derive(Debug, thiserror::Error, thiserror_ext::Macro)] /// enum Error { /// #[error("internal error: {msg}")] @@ -151,7 +151,7 @@ pub fn derive_context_into(input: TokenStream) -> TokenStream { /// /// ## Example /// -/// ```no_run +/// ```ignore /// #[derive(Debug, thiserror::Error, thiserror_ext::Macro)] /// #[error("not yet implemented: {message}")] /// struct NotYetImplemented { @@ -221,7 +221,7 @@ pub fn derive_macro(input: TokenStream) -> TokenStream { /// /// ## Example /// -/// ```no_run +/// ```ignore /// #[derive(Debug, thiserror::Error, thiserror_ext::Box)] /// #[thiserror_ext(newtype(name = Error))] /// enum ErrorKind { @@ -258,7 +258,7 @@ pub fn derive_macro(input: TokenStream) -> TokenStream { /// /// ## Example /// -/// ```no_run +/// ```ignore /// # use std::backtrace::Backtrace; /// #[derive(Debug, thiserror::Error, thiserror_ext::Box)] /// #[thiserror_ext(newtype(name = Error, backtrace))] @@ -312,7 +312,7 @@ pub fn derive_arc(input: TokenStream) -> TokenStream { /// chain can be kept in these cases. /// /// # Example -/// ```no_run +/// ```ignore /// #[derive(thiserror::Error, thiserror_ext::ReportDebug)] /// #[error("inner")] /// struct Inner; diff --git a/src/report.rs b/src/report.rs index 0d0373e..991141d 100644 --- a/src/report.rs +++ b/src/report.rs @@ -29,8 +29,8 @@ pub trait AsReport: crate::error_sealed::Sealed { /// like under different options. /// /// # Example - /// ```no_run - /// use thiserror::AsReport; + /// ```ignore + /// use thiserror_ext::AsReport; /// /// let error = fallible_action().unwrap_err(); /// println!("{}", error.as_report());