Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly diagnostic panic #16

Closed
Juici opened this issue Feb 17, 2024 · 0 comments
Closed

Nightly diagnostic panic #16

Juici opened this issue Feb 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Juici
Copy link
Owner

Juici commented Feb 17, 2024

The macro is panicking when emitting diagnostics on nightly.

error: proc-macro derive panicked
 --> tests/ui/missing_discriminant.rs:4:23
  |
4 | #[derive(Clone, Copy, IntEnum)]
  |                       ^^^^^^^
  |
  = help: message: assertion failed: child.level.can_be_top_or_sub().1

This is caused by a compiler change here https://github.com/rust-lang/rust/blob/59e0bc2de7134a2d88e9c14db32884e631e90373/compiler/rustc_errors/src/emitter.rs#L2119.

The only levels that can be used for sub-diagnostics emitted by proc-macros are now Warning, Note, and Help.

@Juici Juici added the bug Something isn't working label Feb 17, 2024
Juici added a commit that referenced this issue Feb 17, 2024
@Juici Juici closed this as completed Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant