This page documents all error codes in the Name Resolution category.
Total codes: 49
- 41 error code(s)
- 8 warning code(s)
- Severity: Error
- Code:
N2001
A variable name is used that has not been defined in the current scope. Check the spelling and ensure the variable is declared with let or var before use.
- Severity: Error
- Code:
N2002
A name is defined more than once in the same scope. Every variable, function, type, and module name must be unique within its scope.
- Severity: Error
- Code:
N2003
A function call references a function name that has not been defined in any accessible scope.
- Severity: Error
- Code:
N2004
A struct type name is used but no matching struct definition is found.
- Severity: Error
- Code:
N2005
An interface name is used but no matching interface definition is found.
- Severity: Error
- Code:
N2006
A module name in an import path cannot be found in the module search path.
- Severity: Error
- Code:
N2007
A type name is used that has not been defined. This includes built-in types and user-defined types.
- Severity: Error
- Code:
N2008
A macro invocation references a macro name that has not been defined.
- Severity: Error
- Code:
N2009
A private item (function, type, field) from another module is being accessed outside of its defining module.
- Severity: Error
- Code:
N2010
Two or more modules depend on each other directly or indirectly, forming a cycle. Nimble does not support circular dependencies.
- Severity: Error
- Code:
N2011
A type definition refers to itself directly or indirectly in a way that creates an infinite type.
- Severity: Error
- Code:
N2012
A name resolves to more than one definition in the current scope. Use a qualified path to disambiguate.
- Severity: Error
- Code:
N2013
A visibility qualifier is used in an invalid context or has incorrect syntax.
- Severity: Error
- Code:
N2014
The module specified in an import statement cannot be found in any of the configured module search paths.
- Severity: Error
- Code:
N2015
An import statement tries to import a symbol that exists in the target module but is not publicly exported.
- Severity: Error
- Code:
N2016
A user-defined name conflicts with a built-in name. Choose a different name.
- Severity: Warning
- Code:
N2017
A user-defined name shadows a built-in name. This is allowed but can lead to confusion.
- Severity: Warning
- Code:
N2018
An import statement introduces a name that is never used in the current file.
- Severity: Warning
- Code:
N2019
A wildcard import (use module::*) brings names into scope that may conflict with other imports.
- Severity: Error
- Code:
N2020
The self keyword is used outside of a method body. self is only valid as a method parameter or within method bodies.
- Severity: Error
- Code:
N2021
The super keyword is used outside of a class or type context. super is only valid for accessing parent type members.
- Severity: Error
- Code:
N2022
A method's self parameter has an invalid type or position. Self must be the first parameter.
- Severity: Error
- Code:
N2023
A method in an implementation block has no self parameter. Methods must take self (or &self, mut self) as the first parameter.
- Severity: Error
- Code:
N2024
A method implementation's return type does not match the return type declared in the interface or parent definition.
- Severity: Error
- Code:
N2025
A type that claims to implement an interface does not provide an implementation for all required methods.
- Severity: Error
- Code:
N2026
A type implementing an interface defines additional methods that are not part of the interface. This is not allowed.
- Severity: Error
- Code:
N2027
A method override does not match the signature of the method it is overriding. Parameter types and return types must match.
- Severity: Error
- Code:
N2028
A method is marked as override but no matching method exists in any parent type or interface.
- Severity: Error
- Code:
N2029
An associated type in a trait or interface implementation is bound to a type that conflicts with other constraints.
- Severity: Error
- Code:
N2030
Trait bounds form a cycle (e.g. A: B and B: A). Circular bounds are not allowed.
- Severity: Warning
- Code:
N2031
A variable is declared but never used. Consider removing it or prefixing with an underscore.
- Severity: Warning
- Code:
N2032
A value is assigned to a variable but the variable is never read afterward.
- Severity: Warning
- Code:
N2033
A variable declaration shadows a variable from an outer scope. Consider renaming to avoid confusion.
- Severity: Warning
- Code:
N2034
A pattern in a match expression can never be reached because a previous pattern already covers all matching values.
- Severity: Error
- Code:
N2035
A match expression does not cover all possible values of the matched type. Add a catch-all pattern (_ => ...) or handle all variants.
- Severity: Error
- Code:
N2036
A pattern binds the same name more than once. Each binding in a pattern must have a unique name.
- Severity: Error
- Code:
N2037
A pattern uses an unsupported binding mode (e.g., ref, mut) in a context where it is not allowed.
- Severity: Error
- Code:
N2038
The pattern syntax is invalid. Patterns must follow the allowed grammar (literals, identifiers, destructuring, etc.).
- Severity: Error
- Code:
N2039
An import path or symbol cannot be resolved. Check the module path and symbol name for typos.
- Severity: Error
- Code:
N2040
A re-export (pub use) refers to a symbol that cannot be found.
- Severity: Error
- Code:
N2041
A re-export attempts to publicly expose a private symbol from another module.
- Severity: Error
- Code:
N2042
Two or more re-exports attempt to expose different items with the same name.
- Severity: Error
- Code:
N2043
A re-export refers to a symbol that does not exist in the source module.
- Severity: Error
- Code:
N2044
A module attempts to import itself. Remove the self-import.
- Severity: Error
- Code:
N2045
The Self type alias is used in an invalid context. Self is only valid inside trait or interface definitions.
- Severity: Error
- Code:
N2046
An external crate dependency specified in an import cannot be found. Ensure the crate is listed in the manifest and installed.
- Severity: Error
- Code:
N2047
Two dependencies require different versions of the same external crate, creating a conflict.
- Severity: Error
- Code:
N2048
A feature of an external crate requested in an import or config does not exist.
- Severity: Warning
- Code:
N2049
An external crate is declared as a dependency but never imported or used.