martin-g commented on PR #501: URL: https://github.com/apache/avro-rs/pull/501#issuecomment-4004331494
Are you sure ? https://crates.io/crates/rustversion starts with: ``` Selectors #[::stable] — True on any stable compiler. #[rustversion::stable(1.34)] — True on exactly the specified stable compiler. ... ``` I experimented a bit with: ```rust fn main() { print_version(); } #[rustversion::stable(1.85)] fn print_version() { println!("1.85"); } #[rustversion::stable] fn print_version() { println!("Stable"); } #[rustversion::nightly] fn print_version() { println!("Nightly"); } ``` and `clear && cargo run` prints `Stable`, `clear && cargo +nightly run` prints `Nightly`. `clear && cargo +1.85 run` fails to resolve the function because both `::stable` and `::stable(1.85)` are detected: ``` Compiling rustver v0.1.0 (/private/tmp/rustver) error[E0428]: the name `print_version` is defined multiple times --> src/main.rs:12:1 | 7 | fn print_version() { | ------------------ previous definition of the value `print_version` here ... 12 | fn print_version() { | ^^^^^^^^^^^^^^^^^^ `print_version` redefined here | = note: `print_version` must be defined only once in the value namespace of this module For more information about this error, try `rustc --explain E0428`. error: could not compile `rustver` (bin "rustver") due to 1 previous error ``` Since we don't need to both `::stable` and `::stable(x.y.z)` we should be fine, no ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
