Skip to content

nightly convert /// # }) to //#### # }) in doc #6025

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

Open
LuckyTurtleDev opened this issue Jan 12, 2024 · 1 comment
Open

nightly convert /// # }) to //#### # }) in doc #6025

LuckyTurtleDev opened this issue Jan 12, 2024 · 1 comment

Comments

@LuckyTurtleDev
Copy link

LuckyTurtleDev commented Jan 12, 2024

cargo +nightly fmt make valid rust code invalid.

before:

    /// ```rust
    /// use scryfall::card::Card;
    /// use futures::stream::{self, StreamExt};
    /// use futures::future;
    /// assert!(
    /// # tokio_test::block_on(async {
    ///     Card::search("lightning").await
    ///         .unwrap()
    ///         .into_stream()
    ///         .map(Result::unwrap)
    ///         .all(|x| future::ready(x.name.to_lowercase().contains("lightning")))
    ///         .await
    /// # })
    /// )

after:

    /// ```rust
    /// use futures::future;
    /// use futures::stream::{self, StreamExt};
    /// use scryfall::card::Card;
    /// assert!(
    /// # tokio_test::block_on(async {
    ///     Card::search("lightning")
    ///         .await
    ///         .unwrap()
    ///         .into_stream()
    ///         .map(Result::unwrap)
    ///         .all(|x| future::ready(x.name.to_lowercase().contains("lightning")))
    ///         .await //#### # })
    /// )
    /// ```

Step to reproduce:


❯ cargo +nightly fmt --version
rustfmt 1.7.0-nightly (62d7ed4 2024-01-11)

@LuckyTurtleDev
Copy link
Author

looks like that is not the only issue. After fixing this manual even other tests fail:

---- search::tests::numeric_property_comparison stdout ----
thread 'search::tests::numeric_property_comparison' panicked at src/search.rs:397:9:
assertion `left == right` failed
  left: 0
 right: 2
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

LuckyTurtleDev added a commit to LuckyTurtleDev/scryfall-rs that referenced this issue Jan 12, 2024
mendess pushed a commit to mendess/scryfall-rs that referenced this issue Jan 12, 2024
* fmt

* Revert "fmt"

This reverts commit 95d7016.

* cargo nightly is broken, see rust-lang/rustfmt#6025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant