Rust guides
Rust guides: async runtimes and embedded targets, with what actually runs under QEMU.
-
E0601 No Main Function Found Fix Error Reference
Rust error E0601 - `main` function not found in crate - fires when a binary crate has no `main` function at its crate root: a file holding only a helper...
-
E0624 Method Is Private Fix Error Reference
Rust error E0624 - method is private - fires when code calls a method from outside the module that defines it: a call from the crate root and a call from an...
-
E0276 Impl Has Stricter Requirements Fix Error Reference
Rust error E0276 - impl has stricter requirements than trait - fires when a trait implementation adds a requirement the trait declaration does not have: a...
-
E0040 Explicit Destructor Call Fix Error Reference
Rust error E0040, explicit use of destructor method, means code called a value's Drop::drop method directly - as g.drop() or as Drop::drop(&mut g)...
-
E0533 Expected Value, Found Variant Fix Error Reference
Rust error E0533 has two headers. In value position - let shape = Shape::Circle; - it reads expected value, found struct variant, because a struct variant...
-
E0532 Expected Tuple Variant Fix Error Reference
Rust error E0532, expected unit struct, unit variant or constant, found tuple variant, means a pattern named a tuple variant as if it carried no data...
-
E0261 Undeclared Lifetime Name Fix Error Reference
A lifetime name such as 'a used in a function signature, struct, enum, type alias, trait, or impl block that never declares it fails with E0261, use of...
-
E0271 Type Mismatch Resolving Fix Error Reference
A bound that names an associated type, such as T
- or Iterator
- , states an equality the implementation has to meet...
- or Iterator
-
E0631 Type Mismatch in Closure Fix Error Reference
A function that takes a closure through an Fn, FnMut, or FnOnce bound fixes the types of the closure's arguments, and a closure whose annotated...
-
E0560 Struct Has No Field Named Fix Error Reference
A struct literal that names a field the struct does not declare fails with E0560, struct has no field named: the literal may only name fields the struct...
-
E0004 Non-Exhaustive Patterns Fix Error Reference
A match that does not cover every possible value of its type fails with E0004: non-exhaustive patterns. This guide reproduces E0004 exactly as Rust 1.99.1...
-
E0554 Feature on Stable Rust Fix Error Reference
A #![feature] attribute at the crate root of a program compiled with the stable release channel fails with E0554, `#![feature]` may not be used on the...
-
E0404 Expected Trait Found Struct Fix Error Reference
A generic bound, an impl header, a dyn type, or a supertrait list that names a struct instead of a trait fails with 'expected trait, found struct'...
-
E0401 Can't Use Generic Parameters Fix Error Reference
A function, type alias, struct, or enum written inside a generic function or impl cannot use the outer item's type, lifetime, or const parameters, and...
-
E0434 Can't Capture Environment Fix Error Reference
A nested fn item that uses a variable from its enclosing function fails with E0434, can't capture dynamic environment in a fn item: a function item has...
-
E0412 Cannot Find Type Fix Error Reference
E0412 was the error for a type name that is not in scope, and `rustc --explain E0412` now states that this error code is no longer emitted by the compiler...
-
E0405 Cannot Find Trait Fix Error Reference
A generic bound that names a trait the compiler cannot find fails with 'cannot find trait in this scope': the trait was never defined, never...
-
E0510 Cannot Assign in Match Guard Fix Error Reference
A match guard that assigns to the value being matched fails with 'cannot assign in match guard': while a guard runs, the matched value is held...
-
E0571 Break With Value Fix Error Reference
A `break` carrying a value can only exit a `loop` (or a labeled block); the same `break` inside a `while`, `for`, or `while let` loop fails with E0571, a...
-
E0728 Await Outside Async Fix Error Reference
An await expression is legal only inside an async function, an async block, or an async closure, and writing one anywhere else — in fn main, in a plain...
-
E0050 Wrong Parameter Count Fix Error Reference
A trait method implemented with the wrong number of parameters fails with E0050: the method has one count, the declaration in the trait has another, and the...
-
E0133 Unsafe Call Fix Error Reference
Calling an unsafe function, dereferencing a raw pointer, using a mutable static, calling a foreign function, or calling an unsafe method outside an unsafe...
-
E0615 Take Value of Method Fix Error Reference
Writing text.len instead of text.len() fails with 'attempted to take value of method len on type String': a method is not a field, and the dot...
-
E0072 Recursive Type Fix Error Reference
A type that contains itself by value can never have a finite size, and the compiler says so with E0072: recursive type has infinite size. This guide...
-
E0121 Placeholder Type Fix Error Reference
Writing the placeholder _ as a type on an item signature — a function parameter, a return type, a static, a const, a struct field, or a type alias — fails...
-
E0407 Method Not in Trait Fix Error Reference
Adding a method inside a trait implementation that the trait never declared fails with 'method is not a member of trait': a trait impl may define...
-
E0053 Method Signature Mismatch Fix Error Reference
Implementing a trait method with a signature that does not match the trait declaration fails with 'method has an incompatible type for trait': the...
-
E0623 Lifetime Mismatch Fix Error Reference
A function whose parameter and return type are declared with different lifetimes, while data from that parameter reaches the return value through a trait...
-
E0583 File Not Found for Module Fix Error Reference
A `mod config;` declaration with no file behind it fails with 'file not found for module': the compiler looked for config.rs or config/mod.rs next...
-
E0204 Copy Trait Field Fix Error Reference
A type that derives or implements Copy while one of its fields — a String, a Vec, or a &mut reference — does not implement Copy fails with E0204: the...