Skip to content

Macro resolution regression when a #[test] is named 'panic' #53675

Closed
@SimonSapin

Description

@SimonSapin

Test case:

#[test]
fn panic() {
    assert!(true)
}
$ rustc +nightly -V
rustc 1.30.0-nightly (63d66494a 2018-08-23)
$ cargo +nightly test
error: cannot determine resolution for the macro `panic`
 --> src/lib.rs:3:5
  |
3 |     assert!(true)
  |     ^^^^^^^^^^^^^
  |
  = note: import resolution is stuck, try simplifying macro imports

error: aborting due to previous error

error: Could not compile `foo`.

CC @petrochenkov

Metadata

Metadata

Labels

A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions