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

Compilation of ad from cloned github project with cargo (or running cargo install ad-editor) fails with "error[E0658]: use of unstable library feature 'iter_repeat_n'" 7 times #96

Closed
Drake42 opened this issue Feb 21, 2025 · 2 comments
Labels
question Further information is requested wontfix This will not be worked on

Comments

@Drake42
Copy link

Drake42 commented Feb 21, 2025

Versions & OS Details

  • ad Version [point version from crates.io or hash of develop]
  • OS: [e.g. linux/bsd]
  • Distribution [e.g. Ubuntu/Arch]
  • OS Version [e.g. 24.04 LTS]

ad (and ad-editor) v0.3.0 and v0.3.1
macOS
cargo crate and cloning github project
cargo 1.80.0
macOS Sequoia 15.3.1

Describe the bug

Neither running cargo install ad-editor, or cloning the github project to my machine and running cargo install --path . work. The compilation error is error[E0658]: use of unstable library feature 'iter_repeat_n'. This error occurs 7 times, and compilation fails.

This issue occurred for ad (and ad-editor) v0.3.0, as well as v0.3.1

...

To Reproduce

Steps to reproduce the behavior:

  1. Run cargo install ad-editor
    OR
  2. run git clone https://github.com/sminez/ad.git
  3. cd ad
  4. cargo install --path .

Expected behavior

Compiling fails with these errors:

_error[E0658]: use of unstable library feature 'iter_repeat_n'
--> src/ts.rs:31:12
|
31 | iter::{repeat_n, Peekable},
| ^^^^^^^^
|
= note: see issue #104434 rust-lang/rust#104434 for more information

error[E0658]: use of unstable library feature 'iter_repeat_n'
--> src/ts.rs:182:36
|
182 | buf.extend(repeat_n(' ', indent * 2));
| ^^^^^^^^
|
= note: see issue #104434 rust-lang/rust#104434 for more information

error[E0658]: use of unstable library feature 'iter_repeat_n'
--> src/ts.rs:190:28
|
190 | buf.extend(repeat_n(' ', indent * 2));
| ^^^^^^^^
|
= note: see issue #104434 rust-lang/rust#104434 for more information

error[E0658]: use of unstable library feature 'iter_repeat_n'
--> src/ui/tui.rs:29:12
|
29 | iter::{repeat_n, Peekable},
| ^^^^^^^^
|
= note: see issue #104434 rust-lang/rust#104434 for more information

error[E0658]: use of unstable library feature 'iter_repeat_n'
--> src/ui/tui.rs:688:20
|
688 | buf.extend(repeat_n(' ', n));
| ^^^^^^^^
|
= note: see issue #104434 rust-lang/rust#104434 for more information

error[E0658]: use of unstable library feature 'iter_repeat_n'
--> src/ui/tui.rs:707:28
|
707 | buf.extend(repeat_n(' ', tabstop));
| ^^^^^^^^
|
= note: see issue #104434 rust-lang/rust#104434 for more information

error[E0658]: use of unstable library feature 'iter_repeat_n'
--> src/ui/tui.rs:779:20
|
779 | buf.extend(repeat_n(' ', max_cols - cols));
| ^^^^^^^^
|
= note: see issue #104434 rust-lang/rust#104434 for more information

For more information about this error, try rustc --explain E0658.
error: could not compile ad-editor (lib) due to 7 previous errors
error: failed to compile `ad-editor v0.3.1_

...

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

@Drake42 Drake42 added the bug Something isn't working label Feb 21, 2025
@sminez
Copy link
Owner

sminez commented Feb 21, 2025

I've not got an msrv set for this project so I'm afraid that this is simply a case of your compiler being out of date: you are on 1.80 and the most recent compiler version is now 1.85. If you update to at least 1.82 the project will compile just fine: https://dev-doc.rust-lang.org/stable/std/iter/fn.repeat_n.html

@sminez sminez added question Further information is requested wontfix This will not be worked on and removed bug Something isn't working labels Feb 21, 2025
@sminez sminez closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2025
@sminez
Copy link
Owner

sminez commented Feb 21, 2025

For future reference, I run CI for the current stable, beta and nightly compilers and ensure that the releases are compiling correctly against them when the crate is published. As a binary, particularly one with clear warnings about its lack of current stability, I am not aiming to support compilers older than the current stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants