You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
_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
The text was updated successfully, but these errors were encountered:
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
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.
Versions & OS Details
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:
OR
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 errorserror: failed to compile `ad-editor v0.3.1_
...
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
The text was updated successfully, but these errors were encountered: