chore: add deprecation notice for type ascription use#2483
Conversation
|
The formatting is a bit clunky with all the spaces, but this is how EDIT: I also couldn't get the span to wrap the entirety of the expression for some reason. It completely ignores the type override part. |
sqlx-macros-core/src/query/args.rs
Outdated
| \t\tSee <https://github.com/rust-lang/rfcs/pull/3307> for more information | ||
| " | ||
| ); | ||
| let name = Ident::new(&format!("warning_{name}"), span); |
There was a problem hiding this comment.
The names won't conflict as the consts are created inside the invocation's local scope.
6be6874 to
40ade0b
Compare
|
@abonander should I enable the missing |
|
We enable the correct features in |
40ade0b to
505d0fa
Compare
|
Done, I've enabled both "parsing" and "proc-macro", which were missing and causing my local test to fail while building without |
Adds a deprecation notice when type ascription pattern is used, preparing grounds for when
we drop support for the pattern, keeping compatibility with Rust's supported syntax, as decided
on RFC 3307.
This change was created as discussed in #2482.
Example
The following code uses type ascription for the second argument.
Generating a warning that looks as follows: