Content-Length: 25264 | pFad | https://doc.rust-lang.org/std/pin/../cmp/../fs/../iter/../../../std/../../error_codes/./E0425.html

E0425 - Error codes index

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error code E0425

An unresolved name was used.

Erroneous code examples:

#![allow(unused)]
fn main() {
something_that_doesnt_exist::foo;
// error: unresolved name `something_that_doesnt_exist::foo`

// or:

trait Foo {
    fn bar() {
        Self; // error: unresolved name `Self`
    }
}

// or:

let x = unknown_variable;  // error: unresolved name `unknown_variable`
}

Please verify that the name wasn’t misspelled and ensure that the identifier being referred to is valid for the given situation. Example:

#![allow(unused)]
fn main() {
enum something_that_does_exist {
    Foo,
}
}

Or:

#![allow(unused)]
fn main() {
mod something_that_does_exist {
    pub static foo : i32 = 0i32;
}

something_that_does_exist::foo; // ok!
}

Or:

#![allow(unused)]
fn main() {
let unknown_variable = 12u32;
let x = unknown_variable; // ok!
}

If the item is not defined in the current module, it must be imported using a use statement, like so:

mod foo { pub fn bar() {} }
fn main() {
use foo::bar;
bar();
}

If the item you are importing is not defined in some super-module of the current module, then it must also be declared as public (e.g., pub fn).









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://doc.rust-lang.org/std/pin/../cmp/../fs/../iter/../../../std/../../error_codes/./E0425.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy