Skip to content

Conversation

weikengchen
Copy link

In the recent nightly, Debug trait's implementation now may need to add <'_>, as hidden lifetime parameters would now become a warning.

And it could be difficult for developers to find out why, as the code of Derivative is not exposed in the compiler's warnings.

warning: hidden lifetime parameters in types are deprecated
   --> ff/src/fields/macros.rs:96:9
    |
96  | /         /// Represents an element of the prime field F_p, where `p == P::MODULUS`.
97  | |         /// This type can represent elements in any field of size at most
98  | |         #[doc = $field_size]
99  | |         /// bits.
...   |
114 | |             pub PhantomData<P>,
115 | |         );
    | |__________^ expected named lifetime parameter

In the current nightly, Debug trait's implementation now may need to add <'_>, as hidden lifetime parameters would now become a warning.

And it could be difficult for developers to find out why, as the code of Derivative is not exposed in the compiler's warnings.

```
warning: hidden lifetime parameters in types are deprecated
   --> ff/src/fields/macros.rs:96:9
    |
96  | /         /// Represents an element of the prime field F_p, where `p == P::MODULUS`.
97  | |         /// This type can represent elements in any field of size at most
98  | |         #[doc = $field_size]
99  | |         /// bits.
...   |
114 | |             pub PhantomData<P>,
115 | |         );
    | |__________^ expected named lifetime parameter
```
@weikengchen
Copy link
Author

I will research a little bit to see how to fix the issue here.

What happens is the following: ryu and itoa increases their rustc minimal version in a recent release, while we still want Derivative to be only requiring >0.34

@weikengchen
Copy link
Author

weikengchen commented Jan 8, 2022

Ready for CI.

Added the following version limits to the dev_dependency to avoid an error in the CI test suite. Local github actions execution is passing.

# 1.0.73 requires itoa 1.0.0, which requires rustc 1.36, while our msrv is 1.34
serde_json = "=1.0.72"
itoa = "=0.4.3"
# 1.0.7 requires rustc 1.36, while our msrv is 1.34
ryu = "=1.0.6"

Note: It is very unlikely to pass the clippy check unless we change msrv.

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.

1 participant