Commit 5bd52c1
Merge #932
932: Incoming breakage: Replace an invalid `#[deprecated]` attribute with a doc comment r=michaelkirk a=fmease
- [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/main/CODE_OF_CONDUCT.md).
- [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.
---
`#[deprecated]` attributes on `impl` blocks do not have any effect and normally the deny-by-default lint `useless_deprecated` would be triggered with the message *this `#[deprecated]` annotation has no effect*.
However, there is a bug in the current version of the Rust compiler that makes it ignore the attribute entirely if it is *malformed*
which is the case for the `#[deprecated]` attached to the `From` impl for `GeometryCollection` (the version is not surrounded by double quotes).
I've replaced the attribute with a documentation comment similar to the one for the softly deprecated associated function `GeometryCollection::new_from`.
---
The compiler bug is about to be fixed (rust-lang/rust#104148) and the malformed attribute will soon become a hard error.
This future breakage was found with the help of [crater](https://github.com/rust-lang/crater) (see the [build log](https://crater-reports.s3.amazonaws.com/pr-104148/try%23692571811df96d28cfa90e2b8cdf3be7e99c44e1/reg/geo-types-0.7.7/log.txt)).
Co-authored-by: León Orell Valerian Liehr <[email protected]>1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
| |||
0 commit comments