Skip to content

Conversation

@RAprogramm
Copy link
Owner

Summary

Fixed Rust 2024 edition compatibility by updating macro code generation to use shorthand field pattern syntax.

Changes

  • Modified error_trait.rs to generate shorthand patterns (field vs field: field) when field name matches binding name
  • Added #![deny(non_shorthand_field_patterns)] in error_derive.rs test to ensure compliance
  • Created comprehensive rust_2024_edition.rs test covering all pattern scenarios
  • Fixed telemetry_flushes_after_subscriber_install test race condition

Test Plan

  • cargo +nightly fmt passes
  • cargo clippy --all-targets --all-features passes with no warnings
  • cargo test --all-features - all 157 tests pass
  • cargo build --release --all-features succeeds
  • New rust_2024_edition test passes with #![deny(non_shorthand_field_patterns)]
  • Existing error_derive test passes with deny directive

Closes #173

…terns

This commit resolves issue #173 by updating the macro code generation to use
shorthand field pattern syntax required by Rust 2024 edition.

Changes:
- Modified error_trait.rs to generate shorthand patterns (field vs field: field)
- Added deny directive for non_shorthand_field_patterns in error_derive test
- Created new rust_2024_edition.rs test with comprehensive coverage
- Fixed telemetry_flushes_after_subscriber_install test race condition

All tests pass successfully with Rust 2024 edition.
@RAprogramm RAprogramm merged commit 355faaa into main Oct 12, 2025
3 checks passed
@RAprogramm RAprogramm deleted the 173 branch October 12, 2025 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rust 2024 edition compatibility: non_shorthand_field_patterns lint triggered by #[source] attribute

2 participants