ITADN

CARGO THOWS 56 ERRORS !!!

#219Closedpenguin-operator 创建于 2024-05-20
I'm developing a supersimple code editor using [ncurses](https://github.com/jeaye/ncurses-rs/). When I run `cargo build` to build this: ``` rust use ncurses::{ initscr, endwin, addstr, getch, }; fn main() { initscr(); addstr("hello world"); getch(); endwin(); } ``` I get this: ``` yaml Compiling ncurses v6.0.0 error[E0432]: unresolved import `constants::TRUE` --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/panel/wrapper.rs:6:5 | 6 | use constants::TRUE; | ^^^^^^^^^^^^^^^ no `TRUE` in `constants` error[E0432]: unresolved import `constants::TRUE` --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/menu/wrapper.rs:11:5 | 11 | use constants::TRUE; | ^^^^^^^^^^^^^^^ no `TRUE` in `constants` error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:166:38 | 166 | { unsafe { ll::can_change_color() == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 166 | { unsafe { ll::can_change_color() == true } } | ~~~~ error[E0425]: cannot find value `OK` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:410:3 | 410 | OK | ^^ help: a tuple variant with a similar name exists (notice the capitalization): `Ok` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:506:5 | 506 | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), | -- similarly named tuple variant `Ok` defined here error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:459:32 | 459 | { unsafe { ll::has_colors() == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 459 | { unsafe { ll::has_colors() == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:463:28 | 463 | { unsafe { ll::has_ic() == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 463 | { unsafe { ll::has_ic() == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:467:28 | 467 | { unsafe { ll::has_il() == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 467 | { unsafe { ll::has_il() == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:601:30 | 601 | { unsafe { ll::isendwin() == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 601 | { unsafe { ll::isendwin() == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:605:40 | 605 | { unsafe { ll::is_linetouched(w, l) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 605 | { unsafe { ll::is_linetouched(w, l) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:609:36 | 609 | { unsafe { ll::is_wintouched(w) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 609 | { unsafe { ll::is_wintouched(w) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:613:48 | 613 | { unsafe { ll::is_term_resized(lines, cols) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 613 | { unsafe { ll::is_term_resized(lines, cols) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:617:33 | 617 | { unsafe { ll::is_cleared(w) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 617 | { unsafe { ll::is_cleared(w) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:621:31 | 621 | { unsafe { ll::is_idcok(w) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 621 | { unsafe { ll::is_idcok(w) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:625:31 | 625 | { unsafe { ll::is_idlok(w) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 625 | { unsafe { ll::is_idlok(w) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:629:33 | 629 | { unsafe { ll::is_immedok(w) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 629 | { unsafe { ll::is_immedok(w) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:633:32 | 633 | { unsafe { ll::is_keypad(w) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 633 | { unsafe { ll::is_keypad(w) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:637:33 | 637 | { unsafe { ll::is_leaveok(w) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 637 | { unsafe { ll::is_leaveok(w) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:641:33 | 641 | { unsafe { ll::is_nodelay(w) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 641 | { unsafe { ll::is_nodelay(w) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:645:35 | 645 | { unsafe { ll::is_notimeout(w) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 645 | { unsafe { ll::is_notimeout(w) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:649:34 | 649 | { unsafe { ll::is_scrollok(w) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 649 | { unsafe { ll::is_scrollok(w) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:653:32 | 653 | { unsafe { ll::is_syncok(w) == TRUE }} | ^^^^ not found in this scope | help: you may want to use a bool value instead | 653 | { unsafe { ll::is_syncok(w) == true }} | ~~~~ error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:690:18 | 690 | if mv(y, x) == ERR | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:691:12 | 691 | { return ERR; } | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:698:18 | 698 | if mv(y, x) == ERR | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:699:12 | 699 | { return ERR; } | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:706:18 | 706 | if mv(y, x) == ERR | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:707:15 | 707 | { return Ok(ERR); } | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:714:18 | 714 | if mv(y, x) == ERR | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:715:15 | 715 | { return Ok(ERR); } | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:745:10 | 745 | _ => ERR, | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:752:18 | 752 | if mv(y, x) == ERR | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:753:12 | 753 | { return ERR; } | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:768:18 | 768 | if mv(y, x) == ERR | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:769:12 | 769 | { return ERR; } | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:776:18 | 776 | if mv(y, x) == ERR | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:777:12 | 777 | { return ERR; } | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:784:18 | 784 | if mv(y, x) == ERR | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:785:12 | 785 | { return ERR; } | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:796:18 | 796 | if mv(y, x) == ERR | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:797:12 | 797 | { return ERR; } | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:804:18 | 804 | if mv(y, x) == ERR | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:805:12 | 805 | { return ERR; } | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:812:18 | 812 | if mv(y, x) == ERR | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:813:15 | 813 | { return Ok(ERR); } | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:859:10 | 859 | _ => ERR, | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:866:18 | 866 | if mv(y, x) == ERR | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:867:12 | 867 | { return ERR; } | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `OK` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:876:3 | 876 | OK | ^^ help: a tuple variant with a similar name exists (notice the capitalization): `Ok` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:506:5 | 506 | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), | -- similarly named tuple variant `Ok` defined here error[E0425]: cannot find value `ERR` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:1470:10 | 1470 | _ => ERR, | ^^^ help: a tuple variant with a similar name exists: `Err` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:511:5 | 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E), | --- similarly named tuple variant `Err` defined here error[E0425]: cannot find value `OK` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:1484:3 | 1484 | OK | ^^ help: a tuple variant with a similar name exists (notice the capitalization): `Ok` | ::: /home/operator/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:506:5 | 506 | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), | -- similarly named tuple variant `Ok` defined here error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:1717:38 | 1717 | if ll::is_leaveok(newscr()) == TRUE | ^^^^ not found in this scope | help: you may want to use a bool value instead | 1717 | if ll::is_leaveok(newscr()) == true | ~~~~ error[E0425]: cannot find value `KEY_F0` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:1751:3 | 1751 | KEY_F0 + n as i32 | ^^^^^^ not found in this scope error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:1759:31 | 1759 | { unsafe { ll::has_mouse() == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 1759 | { unsafe { ll::has_mouse() == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:1779:67 | 1779 | { unsafe { ll::wenclose(w, y as libc::c_int, x as libc::c_int) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 1779 | { unsafe { ll::wenclose(w, y as libc::c_int, x as libc::c_int) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:1782:92 | 1782 | { unsafe { ll::wmouse_trafo(w, y.as_mut_ptr(), x.as_mut_ptr(), to_screen as ll::c_bool) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 1782 | { unsafe { ll::wmouse_trafo(w, y.as_mut_ptr(), x.as_mut_ptr(), to_screen as ll::c_bool) == true } } | ~~~~ error[E0425]: cannot find value `TRUE` in this scope --> /home/operator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-6.0.0/src/lib.rs:1785:88 | 1785 | { unsafe { ll::mouse_trafo(y.as_mut_ptr(), x.as_mut_ptr(), to_screen as ll::c_bool) == TRUE } } | ^^^^ not found in this scope | help: you may want to use a bool value instead | 1785 | { unsafe { ll::mouse_trafo(y.as_mut_ptr(), x.as_mut_ptr(), to_screen as ll::c_bool) == true } } | ~~~~ Some errors have detailed explanations: E0425, E0432. For more information about an error, try `rustc --explain E0425`. error: could not compile `ncurses` (lib) due to 56 previous errors ``` TOTAL 56 ERRORS (MY VSCODE PROBLEM COUNTER SAYS) !!! It is related to `constants.rs` module inside the library. Please define the constants TRUE, FALSE, ERR, OK, etc. P.S. And don't forget about `KEY_F0` I can give you code to paste into `constants.rs` ``` rust // ... // end of file pub const TRUE: c_bool = 1; pub const FALSE: c_bool = 0; pub const ERR: c_int = -1; pub const OK: c_int = 0; pub const KEY_F0: c_int = 0x100; ``` It works on my machine. THANKS !!!
关闭于 2024-05-21 1 条评论