Skip to content

Nonexisting macro is silently accepted in trait definition block #40845

Closed
@bluss

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!'

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