Skip to content
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

Pr arrayvec copy edit #281

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Pr arrayvec copy edit #281

wants to merge 6 commits into from

Conversation

bluss
Copy link
Owner

@bluss bluss commented Oct 19, 2024

Just to run CI on my part. See main PR at #280.

pYtoner and others added 5 commits October 17, 2024 22:40
It works by replacing a couple of strings in `src/arrayvec.rs` and then
applying a small patch.

Check that the patch is up-to-date in CI.
They don't work on Rust 1.51

```
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
  --> src/arrayvec_copy.rs:59:6
   |
59 | impl<T: Copy, const CAP: usize> ArrayVecCopy<T, CAP> {
   |      ^
   |
   = note: see issue #57563 <rust-lang/rust#57563> for more information
   = help: add `#![feature(const_fn)]` to the crate attributes to enable
```
Invent this little hack, insert directives like this in ArrayVec:

```rust
// DIRECTIVE ArrayVecCopy #[cfg(not_in_arrayvec_copy)]
```

And replace them as follows in ArrayVecCopy:

```rust
 #[cfg(not_in_arrayvec_copy)]
```
@bluss bluss marked this pull request as draft October 19, 2024 17:08
It's a type nested in a function, does not need renaming.
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.

3 participants