Skip to content

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 as not planned
@Drake42

Description

@Drake42

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedwontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions