Skip to content

CompileError Rust1.94 and Rust1.92 for From` is ambiguous #525

@sunflower-knight

Description

@sunflower-knight
error[E0659]: `From` is ambiguous
   --> tests\from.rs:25:25
    |
 25 |         #[derive(Debug, From, PartialEq)]
    |                         ^^^^ ambiguous name
    |
    = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
note: `From` could refer to the derive macro imported here
   --> tests\from.rs:23:13
    |
 23 |         use super::*;
    |             ^^^^^^^^
    = help: consider adding an explicit import of `From` to disambiguate
    = help: or use `self::From` to refer to this derive macro unambiguously
note: `From` could also refer to the derive macro defined here
   --> C:\Users\knight\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\prelude\mod.rs:147:13
    |
147 |     pub use core::prelude::rust_2021::*;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^

cargo +nightly test -p derive_more --tests --features full

When I use the test command in the latest version of code , compile Error,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions