Rust errors · 518 codes · checked with rustc 1.99.0
Rust compiler errors, explained with fixes
Paste the error from your terminal and jump straight to what it means and how to fix it. Every code rustc knows, with the real message it prints today.
The ones people hit most
Build and Cargo errors (no code)
- buildlinker link.exe not found
- buildlinker cc not found
- buildfailed to run custom build command for openssl-sys
- buildfailed to select a version for the requirement
- buildlinks to the native library
- buildcould not compile due to previous error
- buildcannot be built because it requires rustc
- buildfeature edition2024 is required
- buildblocking waiting for file lock on package cache
- buildno targets specified in the manifest
- buildcurrent package believes it's in a workspace when it's not
- buildperhaps two different versions of crate
- buildno matching package named found
- buildcannot find derive macro Serialize in this scope
- buildmain function is not allowed to be async
- buildthere is no reactor running, must be called from the context of a Tokio 1.x runtime
- buildcannot start a runtime from within a runtime
- buildfuture cannot be sent between threads safely
- buildtarget may not be installed
- buildthe item is gated behind the
- buildrust-analyzer failed to load workspace
- buildsignal: 9, SIGKILL: kill
Browse by kind of problem
Ownership and borrowing (56)
- E0106missing lifetime specifier
- E0161cannot move a value of type `dyn Bar`
- E0195lifetime parameters do not match the trait definition
- E0207the type parameter `T` is not constrained by the impl trait, self type, or predicates
- E0226only a single explicit lifetime bound is permitted
- E0227ambiguous lifetime bound, explicit lifetime bound required
- E0228cannot deduce the lifetime bound for this trait object type from context
- E0261use of undeclared lifetime name `'a`
- E0262invalid lifetime parameter name: `'static`
- E0309the parameter type `T` may not live long enough
- E0310the parameter type may not live long enough
- E0311the parameter type `T` may not live long enough
- E0316nested quantification of lifetimes
- E0373closure may outlive the current function, but it borrows
- E0382borrow of moved value
- E0384cannot assign twice to immutable variable
- E0392type parameter `T` is never used
- E0476lifetime of the source pointer does not outlive lifetime bound of the object type
- E0478A lifetime bound was not satisfied
- E0491in type `&'a Foo<'b>`, reference has a longer lifetime than the data it references
- E0492interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
- E0493destructor of `(DropType, DropType)` cannot be evaluated at compile-time
- E0496lifetime name `'a` shadows a lifetime name that is already in scope
- E0499cannot borrow as mutable more than once at a time
- E0500closure requires unique access to `*jon_snow` but it is already borrowed
- E0501cannot borrow `*a` as mutable because previous closure requires unique access
- E0502cannot borrow as mutable because it is also borrowed as immutable
- E0503cannot use `value` because it was mutably borrowed
- E0505cannot move out of because it is borrowed
- E0506cannot assign to because it is borrowed
- E0507cannot move out of
- E0508cannot move out of type `[NonCopy; 1]`, a non-copy array
- E0509cannot move out of type `DropStruct`, which implements the `Drop` trait
- E0521borrowed data escapes outside of closure
- E0557feature has been removed
- E0568auto traits cannot have super traits or lifetime bounds
- E0581return type references lifetime `'a`, which is not constrained by the fn input types
- E0582binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types
- E0594cannot assign to `ss.earth`, as `ss` is not declared as mutable
- E0596cannot borrow as mutable, as it is not declared as mutable
- E0597does not live long enough
- E0621explicit lifetime required in the type of `y`
- E0623lifetime mismatch
- E0626This error occurs because a borrow in a movable coroutine persists across a yield point
- E0637`'_` cannot be used here
- E0657`impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
- E0700hidden type for `impl Trait<'y>` captures lifetime that does not appear in bounds
- E0712thread-local variable borrowed past end of function
- E0713borrow may still be in use when destructor runs
- E0716temporary value dropped while borrowed
- E0726implicit elided lifetime not allowed here
- E0745cannot take address of a temporary
- E0747type provided when a lifetime was expected
- E0764mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
- E0794cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
- E0803cannot infer an appropriate lifetime for lifetime parameter '_ in generic type due to conflicting requirements
Types and traits (166)
- E0025field `a` bound multiple times in the pattern
- E0029only `char` and numeric types are allowed in range patterns
- E0030lower bound for range pattern must be less than or equal to upper bound
- E0033A trait type has been dereferenced
- E0038For any given trait `Trait` there may be a related _type_ called the _trait object type_ which is typically written as `dyn Trait`. In earlier editions of Rust, trait object types were written as plain `Trait` (just the name of the trait, written in type positions) but this was a bit too confusing, so we now write `dyn Trait`
- E0044foreign items may not have type parameters
- E0046not all trait items implemented, missing: `foo`
- E0049associated function `foo` has 0 type parameters but its trait declaration has 1 type parameter
- E0050method `foo` has 1 parameter but the declaration in trait `Foo::foo` has 2
- E0053method `foo` has an incompatible type for trait
- E0055reached the recursion limit while auto-dereferencing `Foo`
- E0059type parameter to bare `FnOnce` trait must be a tuple
- E0069`return;` in a function whose return type is not `()`
- E0071expected struct, variant or union type, found `u32`
- E0072recursive type has infinite size
- E0076SIMD vector's only field must be an array
- E0077SIMD vector element type should be a primitive scalar (integer/float/pointer) type
- E0091type parameter `T` is never used
- E0094intrinsic has wrong number of type parameters: found 2, expected 1
- E0107missing generics for struct `Foo`
- E0109type arguments are not allowed on builtin type `u32`
- E0116cannot define inherent `impl` for a type outside of the crate where the type is defined
- E0117only traits defined in the current crate can be implemented for types defined outside of the crate
- E0118no nominal type found for inherent implementation
- E0119conflicting implementations of trait for type
- E0120the `Drop` trait may only be implemented for local structs, enums, and unions
- E0121the placeholder `_` is not allowed within types on item signatures for return types
- E0128generic parameter defaults cannot reference parameters before they are declared
- E0131The `main` function was defined with generic parameters
- E0158constant pattern cannot depend on generic parameters
- E0170pattern binding `GET` is named the same as one of the variants of the type `Method`
- E0178expected a path on the left-hand side of `+`
- E0183manual implementations of `FnOnce` are experimental
- E0184the trait `Copy` cannot be implemented for this type; the type has a destructor
- E0185method `foo` has a `&self` declaration in the impl, but not in the trait
- E0186method `foo` has a `&self` declaration in the trait, but not in the impl
- E0191the value of the associated type `Bar` in `Trait` must be specified
- E0197inherent impls cannot be unsafe
- E0198negative impls cannot be unsafe
- E0199implementing the trait `Bar` is not unsafe
- E0200the trait `Bar` requires an `unsafe impl` declaration
- E0201duplicate definitions with name `baz`:
- E0203duplicate relaxed `Sized` bounds
- E0204the trait Copy cannot be implemented for this type
- E0206the trait `Copy` cannot be implemented for this type
- E0210This error indicates a violation of one of Rust's orphan rules for trait implementations. The rule concerns the use of type parameters in an implementation of a foreign trait (a trait defined in another crate), and states that type parameters must be "covered" by a local type
- E0212cannot use the associated type of a trait with uninferred generic parameters
- E0214parenthesized type parameters may only be used with a `Fn` trait
- E0220associated type `Baz` not found for `Self`
- E0221ambiguous associated type `A` in bounds of `Self`
- E0222ambiguous associated type `Color` in bounds of `BoxCar`
- E0223ambiguous associated type
- E0224at least one trait is required for an object type
- E0225only auto traits can be used as additional traits in a trait object
- E0271type mismatch resolving `<i8 as Trait>::AssociatedType == u32`
- E0275overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<_>>>>>>>: Foo`
- E0276impl has stricter requirements than trait
- E0277the trait bound is not satisfied
- E0282type annotations needed
- E0283type annotations needed
- E0284type annotations needed
- E0307invalid `self` parameter type: `&Bar`
- E0308mismatched types
- E0321cross-crate traits with a default impl, like `Send`, can only be implemented for a struct/enum type, not `&'static Foo`
- E0322explicit impls for the `Sized` trait are not permitted
- E0323item `N` is an associated const, which doesn't match its trait `Foo`
- E0324item `N` is an associated method, which doesn't match its trait `Foo`
- E0325item `N` is an associated type, which doesn't match its trait `Foo`
- E0326implemented const `BAR` has an incompatible type for trait
- E0328explicit impls for the `Unsize` trait are not permitted
- E0364`foo` is private, and cannot be re-exported
- E0366`Drop` impls cannot be specialized
- E0367`Drop` impl requires `T: Foo` but the struct it is implemented for does not
- E0368binary assignment operation `<<=` cannot be applied to type `f32`
- E0369binary operation cannot be applied to type
- E0371the object type `(dyn Baz + 'static)` automatically implements the trait `Bar`
- E0374implementing `CoerceUnsized` requires a field to be coerced
- E0375implementing `CoerceUnsized` does not allow multiple fields to be coerced
- E0377the trait `CoerceUnsized` may only be implemented for a coercion between structures
- E0378the trait `DispatchFromDyn` may only be implemented for structs containing the field being coerced, ZST fields with 1 byte alignment that don't mention type/const generics, and nothing else
- E0379functions in traits cannot be declared const
- E0380auto traits cannot have associated items
- E0390cannot define inherent `impl` for primitive types
- E0391cycle detected when computing the super clauses of `FirstTrait`
- E0393the type parameter `T` must be explicitly specified
- E0401can't use generic parameters from outer item
- E0403the name `T` is already used for a generic parameter in this item's generic parameters
- E0404expected trait, found struct `Foo`
- E0405cannot find trait `SomeTrait` in this scope
- E0407method `b` is not a member of trait `Foo`
- E0408variable `y` is not bound in all patterns
- E0409variable `y` is bound inconsistently across alternatives separated by `|`
- E0411cannot find type `Self` in this scope
- E0415identifier `f` is bound more than once in this parameter list
- E0416identifier `x` is bound more than once in the same pattern
- E0422cannot find struct, variant or union type `Foo` in this scope
- E0428the name `Bar` is defined multiple times
- E0433failed to resolve
- E0434can't capture dynamic environment in a fn item
- E0437type `Bar` is not a member of trait `Foo`
- E0438const `BAR` is not a member of trait `Foo`
- E0446private type `Bar` in public interface
- E0449visibility qualifiers are not permitted here
- E0512cannot transmute between types of different sizes, or dependently-sized types
- E0520`fly` specializes an item from a parent `impl`, but that item is not marked `default`
- E0525expected a closure that implements the `Fn` trait, but this closure only implements `FnOnce`
- E0529expected an array or slice, found `f32`
- E0531cannot find tuple struct or tuple variant `Type` in this scope
- E0561patterns aren't allowed in function pointer types
- E0562`impl Trait` is not allowed in the type of variable bindings
- E0567auto traits cannot have generic parameters
- E0569requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
- E0573expected type, found variant `Dragon::Born`
- E0574expected struct, variant or union type, found module `mordor`
- E0575cannot find associated type `Mythology` in trait `Age`
- E0576cannot find associated type `You` in trait `Hello`
- E0579lower bound for range pattern must be less than upper bound
- E0580`main` function has wrong type
- E0587type has conflicting packed and align representation hints
- E0588packed type cannot transitively contain a `#[repr(align)]` type
- E0593closure is expected to take 0 arguments, but it takes 1 argument
- E0599no method named X found in the current scope
- E0600cannot apply unary operator `!` to type `Question`
- E0604only `u8` can be cast as `char`, not `u32`
- E0608cannot index into a value of type `u8`
- E0609no field on type
- E0610`u32` is a primitive type and therefore doesn't have fields
- E0614type cannot be dereferenced
- E0615attempted to take value of method on type
- E0617can't pass `f32` to variadic function
- E0620cast to unsized type: `&[usize; 2]` as `[usize]`
- E0631type mismatch in closure arguments
- E0634type has conflicting packed representation hints
- E0642patterns aren't allowed in functions without bodies
- E0643method `foo` has incompatible signature for trait
- E0644closure/coroutine type that references itself
- E0665`#[derive(Default)]` on enum with no `#[default]`
- E0666nested `impl Trait` is not allowed
- E0689can't call method `neg` on ambiguous numeric type `{float}`
- E0690transparent struct needs at most one non-trivial field, but has 2
- E0692transparent struct cannot have other repr hints
- E0714marker traits cannot have associated items
- E0715impls for marker traits cannot contain items
- E0719the value of the associated type `Item` in trait `Iterator` is already specified
- E0720cannot resolve opaque type
- E0735generic parameters cannot use `Self` in their defaults
- E0737`#[track_caller]` can only be used with the Rust ABI
- E0740field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
- E0741`A` must implement `ConstParamTy` to be used as the type of a const generic parameter
- E0743C-variadic type `...` may not be nested inside another type
- E0746return type cannot have an unboxed trait object
- E0749negative impls cannot have any items
- E0750negative impls cannot be default impls
- E0751found both positive and negative implementation of trait `MyTrait` for type `i32`:
- E0770the type of const parameters must not depend on other generic parameters
- E0777expected path to a trait, found literal
- E0782expected a type, found a trait
- E0785cannot define inherent `impl` for a dyn auto trait
- E0790cannot call associated function on trait without specifying the corresponding `impl` type
- E0791invalid type for variable with `#[linkage]` attribute
- E0792expected generic type parameter, found `u32`
- E0799expected type or const parameter, found function `main`
- E0800cannot find type or const parameter `T` in this scope
- E0801invalid generic `self` parameter type: `R`
- E0804cannot add auto trait `Send` to dyn bound via pointer cast
- E0806`y` has 1 parameter but #[foo] requires it to have 0
Names, paths and imports (49)
- E0005refutable pattern in local binding
- E0026struct `Thing` does not have a field named `z`
- E0027pattern does not mention field `name`
- E0034multiple applicable items in scope
- E0093unrecognized intrinsic function: `foo`
- E0124field `field1` is already declared
- E0130patterns aren't allowed in foreign function declarations
- E0252the name `baz` is defined multiple times
- E0254the name `core` is defined multiple times
- E0255the name `foo` is defined multiple times
- E0259the name `core` is defined multiple times
- E0260the name `core` is defined multiple times
- E0365`foo` is only public within the crate, and cannot be re-exported outside
- E0423cannot find function, tuple struct or tuple variant `Foo` in this scope
- E0424cannot find value `self` in this scope
- E0425cannot find value in this scope
- E0426use of undeclared label `'a`
- E0432unresolved import
- E0451field `b` of struct `Foo` is private
- E0453allow(non_snake_case) incompatible with previous forbid
- E0454link name must not be empty
- E0459`#[link]` attribute requires a `name = "string"` argument
- E0460Found possibly newer version of crate `..` which `..` depends on
- E0461Couldn't find crate `..` with expected target triple `..`
- E0463can't find crate for `foo`
- E0464The compiler found multiple library files with the requested crate name
- E0468an `extern crate` loading macros must be at the crate root
- E0469imported macro not found
- E0519The current crate is indistinguishable from one of its dependencies, in terms of metadata
- E0544multiple stability levels
- E0559variant `main::Field::Fool` has no field named `joke`
- E0560struct has no field named
- E0577expected module, found enum `crate::Sea`
- E0583file not found for module
- E0592duplicate definitions with name `bar`
- E0601No `main` function was found in a binary crate
- E0603is private
- E0616field `x` of struct `Foo` is private
- E0624method `method` is private
- E0639This error indicates that the struct, enum or enum variant cannot be instantiated from outside of the defining crate as it has been marked as `non_exhaustive` and as such more fields/variants may be added in future that could cause adverse side effects for this code
- E0648`export_name` may not contain null characters
- E0710unknown tool name `clipp` found in scoped lint: `clipp::filter_map`
- E0711feature `foo` is declared stable since 1.29.0, but was previously declared stable since 1.0.0
- E0725A feature attribute named a feature that was disallowed in the compiler command line flags
- E0742visibilities can only be restricted to ancestor modules
- E0754trying to load file for module `řųśť` with non-ascii identifier name
- E0761Multiple candidate files were found for an out-of-line module
- E0780Cannot use `doc(inline)` with anonymous imports
- E0789`rustc_allowed_through_unstable_modules` attribute must be paired with a `stable` attribute
Patterns and matching (15)
- E0004non-exhaustive patterns
- E0023this pattern has 1 field, but the corresponding tuple variant has 2 fields
- E0164expected tuple struct or tuple variant, found associated function `A::new`
- E0381used binding `x` isn't initialized
- E0510cannot assign `x` in match guard
- E0527pattern requires 2 elements but array has 4
- E0528pattern requires at least 3 elements but array has 2
- E0530match bindings cannot shadow tuple variants
- E0532expected unit struct, unit variant or constant, found tuple variant `State::Failed`
- E0533expected unit struct, unit variant or constant, found associated function `Tortoise::turtle`
- E0638This error indicates that the struct, enum or enum variant must be matched non-exhaustively as it has been marked as `non_exhaustive`
- E0730cannot pattern-match on an array without a fixed length
- E0748unterminated raw string
- E0769tuple variant `E::A` written as struct variant
- E0783`...` range patterns are deprecated
Const, static and compile-time (10)
- E0015cannot call non-const fn in constants
- E0080attempt to shift left by `500_i32`, which would overflow
- E0229associated item constraints are not allowed here
- E0435attempt to use a non-constant value in a constant
- E0462Found `staticlib` `..` instead of `rlib` or `dylib`
- E0607cannot cast thin pointer `*const u8` to wide pointer `*const [u8]`
- E0625thread-local statics cannot be accessed at compile-time
- E0697closures cannot be static
- E0757`#[ffi_const]` function cannot be `#[ffi_pure]`
- E0763unterminated byte constant
Attributes, macros and features (31)
- E0075SIMD vector cannot be empty
- E0084unsupported representation for zero-variant enum
- E0452malformed lint attribute input
- E0472Inline assembly (`asm!`) is not supported on this target
- E0517#### Note: this error code is no longer emitted by the compiler. This error code was replaced with the `attribute cannot be used on...` diagnostic that does not have an error code
- E0522definition of an unknown lang item: `cookie`
- E0537#### Note: this error code is no longer emitted by the compiler An unknown predicate was used inside the `cfg` attribute
- E0538malformed `deprecated` attribute input
- E0539malformed `deprecated` attribute input
- E0542missing 'since'
- E0543missing 'note'
- E0545`issue` must be a non-zero numeric string or "none"
- E0546missing 'feature'
- E0547missing 'issue'
- E0549deprecated attribute must be paired with either stable or unstable attribute
- E0554`#![feature]` may not be used on the stable release channel
- E0565malformed `repr` attribute input
- E0566conflicting representation hints
- E0589invalid alignment value: not a power of two
- E0602An unknown or invalid lint was used on the command line
- E0635unknown feature `nonexistent_rust_feature`
- E0658is unstable
- E0731transparent enum needs exactly one variant, but has 2
- E0732`#[repr(inttype)]` must be specified for enums with explicit discriminants and non-unit variants
- E0736attribute incompatible with `#[unsafe(naked)]`
- E0774`derive` may only be applied to `struct`s, `enum`s and `union`s
- E0778#### Note: this error code is no longer emitted by the compiler The `instruction_set` attribute was malformed
- E0779#### Note: this error code is no longer emitted by the compiler An unknown argument was given to the `instruction_set` attribute
- E0795`Some` is an enum variant; expected field at end of `offset_of`
- E0802`CoercePointee` can only be derived on `struct`s with `#[repr(transparent)]`
- E0805malformed `inline` attribute input
Everything else (191)
- E0001#### Note: this error code is no longer emitted by the compiler
- E0002#### Note: this error code is no longer emitted by the compiler
- E0007#### Note: this error code is no longer emitted by the compiler
- E0009#### Note: this error code is no longer emitted by the compiler
- E0010#### Note: this error code is no longer emitted by the compiler
- E0013#### Note: this error code is no longer emitted by the compiler
- E0014#### Note: this error code is no longer emitted by the compiler
- E0040explicit use of destructor method
- E0045C-variadic functions with the "Rust" calling convention are not supported
- E0054cannot cast `i32` as `bool`
- E0057this function takes 1 argument but 0 arguments were supplied
- E0060this function takes at least 1 argument but 0 arguments were supplied
- E0061this function takes N arguments but M were supplied
- E0062field `x` specified more than once
- E0063missing field `y` in initializer of `Foo`
- E0067invalid left-hand side of assignment
- E0070invalid left-hand side of assignment
- E0073#### Note: this error code is no longer emitted by the compiler
- E0074#### Note: this error code is no longer emitted by the compiler
- E0081discriminant value `3` assigned more than once
- E0087#### Note: this error code is no longer emitted by the compiler
- E0088#### Note: this error code is no longer emitted by the compiler
- E0089#### Note: this error code is no longer emitted by the compiler
- E0090#### Note: this error code is no longer emitted by the compiler
- E0092#### Note: this error code is no longer emitted by the compiler
- E0110#### Note: this error code is no longer emitted by the compiler
- E0132#### Note: this error code is no longer emitted by the compiler
- E0133call to unsafe function `f` is unsafe and requires unsafe function or block
- E0136#### Note: this error code is no longer emitted by the compiler
- E0137#### Note: this error code is no longer emitted by the compiler
- E0138#### Note: this error code is no longer emitted by the compiler
- E0139#### Note: this error code is no longer emitted by the compiler
- E0152found duplicate lang item `owned_box`
- E0154#### Note: this error code is no longer emitted by the compiler
- E0162#### Note: this error code is no longer emitted by the compiler
- E0165#### Note: this error code is no longer emitted by the compiler
- E0192#### Note: this error code is no longer emitted by the compiler
- E0193#### Note: this error code is no longer emitted by the compiler
- E0205#### Note: this error code is no longer emitted by the compiler
- E0208#### This error code is internal to the compiler and will not be emitted with normal Rust code. #### Note: this error code is no longer emitted by the compiler
- E0211#### Note: this error code is no longer emitted by the compiler
- E0230#### Note: this error code is no longer emitted by the compiler
- E0231#### Note: this error code is no longer emitted by the compiler
- E0232#### Note: this error code is no longer emitted by the compiler
- E0243#### Note: this error code is no longer emitted by the compiler
- E0244#### Note: this error code is no longer emitted by the compiler
- E0251#### Note: this error code is no longer emitted by the compiler
- E0253#### Note: this error code is no longer emitted by the compiler
- E0256#### Note: this error code is no longer emitted by the compiler
- E0263#### Note: this error code is no longer emitted by the compiler
- E0264unknown external lang item: `copy`
- E0267`break` inside of a closure
- E0268`break` outside of a loop or labeled block
- E0281#### Note: this error code is no longer emitted by the compiler
- E0297#### Note: this error code is no longer emitted by the compiler
- E0301#### Note: this error code is no longer emitted by the compiler
- E0302#### Note: this error code is no longer emitted by the compiler
- E0303#### Note: this error code is no longer emitted by the compiler
- E0312#### Note: this error code is no longer emitted by the compiler
- E0317`if` may be missing an `else` clause
- E0320overflow while adding drop-check rules for `A<T>`
- E0329#### Note: this error code is no longer emitted by the compiler
- E0370enum discriminant overflowed
- E0376#### Note: this error code is no longer emitted by the compiler
- E0383#### Note: this error code is no longer emitted by the compiler
- E0386#### Note: this error code is no longer emitted by the compiler
- E0387#### Note: this error code is no longer emitted by the compiler
- E0388#### Note: this error code is no longer emitted by the compiler
- E0389#### Note: this error code is no longer emitted by the compiler
- E0398#### Note: this error code is no longer emitted by the compiler
- E0399#### Note: this error code is no longer emitted by the compiler
- E0412cannot find type in this scope
- E0429#### Note: this error code is no longer emitted by the compiler
- E0430#### Note: this error code is no longer emitted by the compiler
- E0431#### Note: this error code is no longer emitted by the compiler
- E0436functional record update syntax requires a struct
- E0439#### Note: this error code is no longer emitted by the compiler
- E0445#### Note: this error code is no longer emitted by the compiler
- E0447#### Note: this error code is no longer emitted by the compiler
- E0448#### Note: this error code is no longer emitted by the compiler
- E0455link kind `framework` is only supported on Apple targets
- E0457#### Note: this error code is no longer emitted by the compiler
- E0458#### Note: this error code is no longer emitted by the compiler
- E0466#### Note: this error code is no longer emitted by the compiler
- E0477#### Note: this error code is no longer emitted by the compiler
- E0482#### Note: this error code is no longer emitted by the compiler
- E0495#### Note: this error code is no longer emitted by the compiler
- E0497#### Note: this error code is no longer emitted by the compiler
- E0498#### Note: this error code is no longer emitted by the compiler
- E0504#### Note: this error code is no longer emitted by the compiler
- E0511Invalid monomorphization of an intrinsic function was used
- E0514Dependency compiled with different version of `rustc`
- E0515cannot return reference to local variable
- E0516#### Note: this error code is no longer emitted by the compiler
- E0518#### Note: this error code is no longer emitted by the compiler
- E0523#### Note: this error code is no longer emitted by the compiler
- E0524two closures require unique access to `*x` at the same time
- E0534#### Note: this error code is no longer emitted by the compiler
- E0535#### Note: this error code is no longer emitted by the compiler
- E0536#### Note: this error code is no longer emitted by the compiler
- E0541#### Note: this error code is no longer emitted by the compiler
- E0550#### Note: this error code is no longer emitted by the compiler
- E0551#### Note: this error code is no longer emitted by the compiler
- E0552#### Note: this error code is no longer emitted by the compiler. This error code was replaced by `E0539`
- E0556#### Note: this error code is no longer emitted by the compiler
- E0570The requested ABI is unsupported by the current target
- E0571`break` with value from a `while` loop
- E0572return statement outside of function body
- E0578#### Note: this error code is no longer emitted by the compiler
- E0584found a documentation comment that doesn't document anything
- E0585found a documentation comment that doesn't document anything
- E0586inclusive range with no end
- E0590`break` or `continue` with no label in the condition of a `while` loop
- E0591Per [RFC 401][rfc401], if you have a function declaration `foo`:
- E0595#### Note: this error code is no longer emitted by the compiler
- E0605non-primitive cast
- E0606casting `&u8` as `u32` is invalid
- E0618expected function, found
- E0619#### Note: this error code is no longer emitted by the compiler
- E0622#### Note: this error code is no longer emitted by the compiler
- E0627yield expression outside of coroutine literal
- E0628too many parameters for a coroutine (expected 0 or 1 parameters)
- E0632#### Note: this error code is no longer emitted by the compiler
- E0633#### Note: this error code is no longer emitted by the compiler
- E0636#### Note: this error code is no longer emitted by the compiler
- E0640#### This error code is internal to the compiler and will not be emitted with normal Rust code. #### Note: this error code is no longer emitted by the compiler
- E0641cannot cast to a pointer of an unknown kind
- E0646`main` function is not allowed to have a `where` clause
- E0647#### Note: this error code is no longer emitted by the compiler
- E0659`foo` is ambiguous
- E0660#### Note: this error code is no longer emitted by the compiler
- E0661#### Note: this error code is no longer emitted by the compiler
- E0662#### Note: this error code is no longer emitted by the compiler
- E0663#### Note: this error code is no longer emitted by the compiler
- E0664#### Note: this error code is no longer emitted by the compiler
- E0667#### Note: this error code is no longer emitted by the compiler
- E0668#### Note: this error code is no longer emitted by the compiler
- E0669#### Note: this error code is no longer emitted by the compiler
- E0670Rust 2015 does not permit the use of `async fn`
- E0671#### Note: this error code is no longer emitted by the compiler
- E0687#### Note: this error code is no longer emitted by the compiler
- E0688#### Note: this error code is no longer emitted by the compiler
- E0691#### Note: this error code is no longer emitted by the compiler
- E0693#### Note: this error code is no longer emitted by the compiler. This error code was replaced by `E0539`
- E0695unlabeled `break` inside of a labeled block
- E0696`continue` pointing to a labeled block
- E0698#### Note: this error code is no longer emitted by the compiler
- E0699#### Note: this error code is no longer emitted by the compiler
- E0701#### Note: this error code is no longer emitted by the compiler
- E0703invalid ABI: found `invalid`
- E0704incorrect visibility restriction
- E0705#### Note: this error code is no longer emitted by the compiler
- E0706#### Note: this error code is no longer emitted by the compiler
- E0708#### Note: this error code is no longer emitted by the compiler
- E0717#### This error code is internal to the compiler and will not be emitted with normal Rust code
- E0718#### Note: this error code is no longer emitted by the compiler
- E0722#### Note: this error code is no longer emitted by the compiler
- E0724#### Note: this error code is no longer emitted by the compiler
- E0727`async` coroutines are not yet supported
- E0728await is only allowed inside async functions and blocks
- E0729#### Note: this error code is no longer emitted by the compiler
- E0733recursion in an async fn requires boxing
- E0734#### Note: this error code is no longer emitted by the compiler
- E0739#### Note: this error code is no longer emitted by the compiler
- E0744#### Note: this error code is no longer emitted by the compiler
- E0752`main` function is not allowed to be `async`
- E0753expected outer doc comment
- E0755#### Note: this error code is no longer emitted by the compiler
- E0756#### Note: this error code is no longer emitted by the compiler
- E0758unterminated block comment
- E0759#### Note: this error code is no longer emitted by the compiler
- E0760#### Note: this error code is no longer emitted by the compiler
- E0762unterminated character literal
- E0765unterminated double quote string
- E0766unterminated double quote byte string
- E0767use of unreachable label `'a`
- E0768no valid digits found for number
- E0771#### Note: this error code is no longer emitted by the compiler
- E0772#### Note: this error code is no longer emitted by the compiler
- E0773#### Note: this error code is no longer emitted by the compiler
- E0775#### Note: this error code is no longer emitted by the compiler
- E0776#### Note: this error code is no longer emitted by the compiler
- E0781the `"cmse-nonsecure-call"` ABI is only allowed on function pointers
- E0784union expressions should have exactly one field
- E0786A metadata file was invalid
- E0787naked functions must contain a single `naked_asm!` invocation
- E0788#### Note: this error code is no longer emitted by the compiler
- E0793reference to field of packed struct is unaligned
- E0796#### Note: this error code is no longer emitted by the compiler
- E0797base expression required after `..`
- E0798arguments for `"cmse-nonsecure-call"` function too large to pass via registers
How we built this
We ran rustc --explain for every code from E0001 to E0899 on rustc 1.99.0, compiled each official erroneous example with that compiler, and kept the exact first line it printed. The common errors also get our own plain answer, the usual causes and fixes. Explanations are from the Rust project (MIT or Apache-2.0). Greyed codes are retired: rustc no longer emits them.
Up next
Most hitE0382: borrow of moved valueThe error almost every Rust developer meets first.Read it next →Also worth your time
Did this answer your question?