Error map
E0521: borrowed data escapes outside of function Rust: error[E0521]: borrowed data escapes outside of function — `data` escapes the function body here (tokio::spawn requires 'static)
Rust · layer 4, Application & API
Centre: this error. First ring: errors it is linked with (9). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.
Directly related (9)
Rust: error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
You tried to mutate a value while an immutable reference to it is still in use.
Rust: error[E0373]: closure may outlive the current function, but it borrows `v`, which is owned by the current function
A closure borrowing a local is passed somewhere that may outlive it (thread::spawn, tokio::spawn, returned closures).
Rust: thread 'main' panicked: there is no reactor running, must be called from the context of a Tokio 1.x runtime
A Tokio API (timer, TCP, `tokio::spawn`) was used outside a running Tokio runtime.
Rust: error[E0728]: `await` is only allowed inside `async` functions and blocks
You used `.await` in a normal (sync) function or closure.
Rust: thread 'main' panicked: Cannot start a runtime from within a runtime — a function like `block_on` tried to block a thread that drives async tasks
Blocking code (`block_on`, `reqwest::blocking`) was called inside an async context.
Rust: error[E0106]: missing lifetime specifier — this function's return type contains a borrowed value, but the signature does not say which one of `x`'s 2 lifetimes it is borrowed from
The compiler can't infer which input reference the returned/stored reference is tied to.
Rust: error[E0597]: `x` does not live long enough — borrowed value does not live long enough
A reference outlives the value it points to (the value is dropped first).
Rust: error[E0752]: `main` function is not allowed to be `async`
`async fn main()` needs a runtime attribute (Tokio/async-std), the std `main` can't be async.
Rust: error[E0716]: temporary value dropped while borrowed — creates a temporary value which is freed while still in use
A reference points to a temporary that's dropped at the end of the statement.
Two steps away (12)
ObjectDisposedException: Cannot access a disposed context instance
Code used a DbContext after its scope ended — usually async void, fire-and-forget tasks, or capturing a scoped context in a singl…
Rust: error[E0382]: borrow of moved value: `x`
A value was moved (ownership transferred) and then used again.
Rust: error[E0308]: mismatched types — expected `X`, found `Y`
A value’s type doesn’t match what the context expects — common with &str vs String, Option/Result vs plain values, and integer ty…
C/C++: undefined reference to `pthread_create' — missing -pthread (also `dlopen`, `clock_gettime`)
Your program uses threads (or another system library) but the linker was not told to link it.
C++: terminate called without an active exception — std::thread destroyed while joinable
A `std::thread` object was destroyed (or reassigned) while its thread was still running, so the C++ runtime called `std::terminat…
Rust: error[E0505]: cannot move out of `s` because it is borrowed
You moved a value while a reference to it was still in use.
Cargo: error: failed to select a version for the requirement `serde = "^2.0"` — candidate versions found which didn't match: 1.0.197
Cargo can't find a version of a dependency satisfying the constraints you (or other crates) set.
Cargo: warning: spurious network error (2 tries remaining): [35] SSL connect error / error: failed to download from `https://index.crates.io/...`
Cargo couldn't reach crates.io (network, proxy, TLS or DNS issues).
Cargo: Blocking waiting for file lock on package cache / on build directory
Another cargo process (or rust-analyzer/IDE) holds the lock, so this command waits.
Rust: error[E0499]: cannot borrow `v` as mutable more than once at a time
Two mutable references to the same value were alive at once, which Rust forbids.
Rust: error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
You called a `&mut` method (or took `&mut`) on a binding/reference that isn't mutable.
Rust: error[E0433]: failed to resolve: use of undeclared type `HashMap`
A path starts with a name that isn't in scope (a type or module you didn't import).
Map another error
Popular: 500403400ORA-009331064Critical errorFileNotFoundException assemblyTypeError