Skip to content

1.100 beta regression: "cannot find value Masquerade in this scope" #164078

Description

@theemathas

Found in the 1.100 beta crater run

This issue is a variant of #163800 (which regressed in #163080). However, this issue is not fixed by #163863.

This issue affects rustables and its dependents:

Output of compiling rustables-0.8.8 on rustc 1.100.0-beta.4 (a2eb6097d 2026-10-04), which I assume does not contain #163863:

error: the `Self` constructor can only be used with tuple or unit structs
 --> src/expr/masquerade.rs:6:10
  |
6 | #[derive(Default, Debug, PartialEq, Eq)]
  |          ^^^^^^^

error: could not compile `rustables` (lib) due to 1 previous error

Output of compiling rustables-0.8.8 on rustc 1.101.0-nightly (32dba69d6 2026-10-09), which contains #163863:

error[E0423]: cannot find value `Masquerade` in this scope
 --> src/expr/masquerade.rs:6:10
  |
6 | #[derive(Default, Debug, PartialEq, Eq)]
  |          ^^^^^^^ in this derive macro
7 | #[nfnetlink_struct(nested = true)]
  | ---------------------------------- `Masquerade` defined here
  |
  = note: a struct named `Masquerade` exists in another namespace
help: consider importing this tuple variant instead
  |
1 + use crate::expr::ExpressionVariant::Masquerade;
  |

For more information about this error, try `rustc --explain E0423`.
error: could not compile `rustables` (lib) due to 1 previous error

Relevant code:

#[derive(Default, Debug, PartialEq, Eq)]
#[nfnetlink_struct(nested = true)]
pub struct Masquerade;

Relevant portion of the macro expansion:

pub struct Masquerade {}

#[automatically_derived]
impl ::core::default::Default for Masquerade {
    #[inline]
    fn default() -> Self {
        Masquerade
    }
}

cc @cyrgani @nnethercote

Activity

  1. added
    A-resolveArea: Name/path resolution done by `rustc_resolve` specifically
    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
    T-langRelevant to the language team
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    C-bugCategory: This is a bug.
    on Oct 10, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Oct 10, 2026
  3. self-assigned this
    on Oct 10, 2026
  4. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Oct 10, 2026
  5. cyrgani commented on Oct 10, 2026

    @cyrgani
    Contributor

    This is actually caused by the earlier PR #161867.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-proc-macrosArea: Procedural macrosA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamregression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions