Skip to content

matches is ambiguous #152346

@Mark-Simulacrum

Description

@Mark-Simulacrum

I feel like we've seen this before, but filing since it looks like it's occurring again in 1.94.

https://crater-reports.s3.amazonaws.com/beta-1.94-3/beta-2026-01-26/gh/3scale-rs.threescale-wasm-auth/log.txt

[INFO] [stdout] error[E0659]: `matches` is ambiguous
[INFO] [stdout]   --> /opt/rustwide/cargo-home/git/checkouts/threescalers-3c034920aa4ddc80/f813a7a/src/api_call.rs:23:9
[INFO] [stdout]    |
[INFO] [stdout] 23 |         matches!(self, Kind::Report)
[INFO] [stdout]    |         ^^^^^^^ ambiguous name
[INFO] [stdout]    |
[INFO] [stdout]    = note: ambiguous because of a conflict between a `macro_rules` name and a non-`macro_rules` name from another module
[INFO] [stdout] note: `matches` could refer to the macro defined here
[INFO] [stdout]   --> /opt/rustwide/cargo-home/git/checkouts/threescalers-3c034920aa4ddc80/f813a7a/src/util/compat/macros.rs:3:1
[INFO] [stdout]    |
[INFO] [stdout]  3 | / macro_rules! matches {
[INFO] [stdout]  4 | |     ($expression:expr, $( $pattern:pat )|+ $( if $guard: expr )? $(,)?) => {
[INFO] [stdout]  5 | |         match $expression {
[INFO] [stdout]  6 | |             $( $pattern )|+ $( if $guard )? => true,
[INFO] [stdout] ...  |
[INFO] [stdout] 10 | | }
[INFO] [stdout]    | |_^
[INFO] [stdout] note: `matches` could also refer to the macro imported here
[INFO] [stdout]   --> /opt/rustwide/cargo-home/git/checkouts/threescalers-3c034920aa4ddc80/f813a7a/src/api_call.rs:1:5
[INFO] [stdout]    |
[INFO] [stdout]  1 | use std::prelude::v1::*;
[INFO] [stdout]    |     ^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    = help: use `self::matches` to refer to this macro unambiguously

Panic:

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyE-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions