-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regression: trait no longer implemented #61563
Comments
This was injected between rustc 1.36.0-nightly (3991285 2019-04-25) and rustc 1.36.0-nightly (597f432 2019-04-26). There were four PR's merged in that time period:
And it was in fact injected specifically by the rollup #60296, which has the following PR's in it:
|
Ah... the code in question is this: #[cfg(any(test, feature = "generic-array"))]
impl<N, A> From<generic_array::GenericArray<A, N>> for Vec<N, A>
where
N: Unsigned + generic_array::ArrayLength<A>,
{
/// Construct a vector of size `N` from a `GenericArray`.
///
/// # Examples
/// ```
/// # #[macro_use] extern crate sized_vec;
/// # use std::convert::TryFrom;
/// # use sized_vec::Vec;
/// # use typenum::U3;
/// # use generic_array::GenericArray;
/// # fn main() {
/// let array = GenericArray::from([1, 2, 3]);
/// let good_vec: Vec<U3, _> = Vec::from(array);
/// assert_eq!(svec![1, 2, 3], good_vec);
/// # }
/// ```
... Note in particular that this code is guarded by So, before PR #59940 (which was in the rollup PR), we would not have tested that example code during So presumably that code example fails to compile if one were to lift it to a higher point, outside of a doc example? I'll give that a quick whirl. Update: (but I don't even understand how that |
That PR might be getting reverted by #61199 as well |
Well, in any case, when I lift the code in that test out of the docs, it fails to compile even on stable (and failed to compile back in 1.34. The crate fails to compile for other reasons related to unstable APIs on earlier versions.) |
(I still don't really understand how the logic for the cfg on that impl is meant to work. I would think that this |
Filed bodil/sized-vec#4 as a followup issue in the problematic crate. Closing as not-a-bug, or at least not a regression that I think we need to act on specifically (though if we happen to "fix" it via #61199, I won't complain). |
The text was updated successfully, but these errors were encountered: