Skip to content

Regression: The crate named assert-cmp v0.2.1 no longer compile on Rust 1.87.0 #142626

Closed as duplicate
@KSXGitHub

Description

@KSXGitHub

I tried this code:

[dependencies]
assert-cmp = "0.2.1"
fn main() {
    assert_cmp::assert_op!(0 < 1);
}

I expected to see this happen: Compile successfully

Instead, this happened: Error

error: expected one of `!`, `.`, `;`, `?`, `{`, `}`, or an operator, found `::`
 --> src/main.rs:2:5
  |
2 |     assert_cmp::assert_op!(0 < 1);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected one of 7 possible tokens
  |
  = note: this error originates in the macro `assert_cmp::assert_op` (in Nightly builds, run with -Z macro-backtrace for more info)

Meta

rustc --version --verbose:

rustc 1.87.0 (17067e9ac 2025-05-09)
binary: rustc
commit-hash: 17067e9ac6d7ecb70e50f92c1944e545188d2359
commit-date: 2025-05-09
host: x86_64-unknown-linux-gnu
release: 1.87.0
LLVM version: 20.1.1

Backtrace

error: expected one of `!`, `.`, `;`, `?`, `{`, `}`, or an operator, found `::`
 --> src/main.rs:2:5
  |
2 |     assert_cmp::assert_op!(0 < 1);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected one of 7 possible tokens
  |
  = note: this error originates in the macro `assert_cmp::assert_op` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `debug-assert-op` (bin "debug-assert-op") due to 1 previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions