Skip to content

Nonexisting macro is silently accepted in trait definition block #40845

Closed

Description

@bluss

This compiles successfully on beta and nightly, but it should be an error.

trait Trait {
    wut!{ }
}

fn main() {
}

(playground link)

Actual Result:

The program compiles successfully.

Expected Result:

Compilation error (Rust 1.16 does this correctly)

rustc 1.16.0 (30cf806ef 2017-03-10)
error: macro undefined: 'wut!'

Activity

  1. added
    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Mar 26, 2017
  2. self-assigned this
    on Mar 27, 2017
  3. jseyfried commented on Mar 27, 2017

    @jseyfried
    Contributor

    Fixed in #40849.

  4. added 3 commits that reference this issue on Feb 5, 2025
  5. added a commit that references this issue on Feb 6, 2025
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, ..)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-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