Error map

E0373: closure may outlive the current function Rust: error[E0373]: closure may outlive the current function, but it borrows `v`, which is owned by the current function

Rust · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (10). 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.

E0373: closure may outlive the current function — Rust: error[E0373]: closure may outlive the current function, but it borrows `v`, which is owned by the current function (Rust)E0373: clos…undefined reference to pthread_create — C/C++: undefined reference to `pthread_create' — missing -pthread (also `dlopen`, `clock_gettime`) (C/C++)undefined reference…terminate called without an active exception — C++: terminate called without an active exception — std::thread destroyed while joinable (C/C++)terminate called wi…feature edition2024 is required / Cargo.lock version too new — Cargo: error: failed to parse manifest — feature `edition2024` is required / lock file version 4 requires `-Znext-lockfile-bump` (Rust)feature edition2024…Blocking waiting for file lock on package cache / build directory — Cargo: Blocking waiting for file lock on package cache / on build directory (Rust)Blocking waiting fo…E0505: cannot move out of value because it is borrowed — Rust: error[E0505]: cannot move out of `s` because it is borrowed (Rust)E0505: cannot move …E0106: missing lifetime specifier — 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 (Rust)E0106: missing life…E0597: borrowed value does not live long enough — Rust: error[E0597]: `x` does not live long enough — borrowed value does not live long enough (Rust)E0597: borrowed val…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)E0521: borrowed dat…cargo: failed to select a version for the requirement — Cargo: error: failed to select a version for the requirement `serde = "^2.0"` — candidate versions found which didn't match: 1.0.197 (Rust)cargo: failed to se…cargo: failed to get from registry (spurious network error) — Cargo: warning: spurious network error (2 tries remaining): [35] SSL connect error / error: failed to download from `https://index.crates.io/...` (Rust)cargo: failed to ge…error while loading shared libraries — error while loading shared libraries: libX.so.N: cannot open shared object file: No such file or directory (Linux)error while loading…undefined reference to — C/C++: undefined reference to `function' — collect2: error: ld returned 1 exit status (C/C++)undefined reference…multiple definition of — C/C++: multiple definition of `x'; first defined here — ld returned 1 exit status (C/C++)multiple definition…terminate called after throwing an instance of — C++: terminate called after throwing an instance of 'std::out_of_range' — what(): vector::_M_range_check (C/C++)terminate called af…call of overloaded is ambiguous — C++: error: call of overloaded 'f(int)' is ambiguous (C/C++)call of overloaded …cannot declare variable to be of abstract type — C++: error: cannot declare variable 'x' to be of abstract type 'Shape' (pure virtual functions) (C/C++)cannot declare vari…E0507: cannot move out of a shared reference / index — Rust: error[E0507]: cannot move out of `self.name` which is behind a shared reference (Rust)E0507: cannot move …E0425: cannot find value in this scope — Rust: error[E0425]: cannot find value `x` in this scope (Rust)E0425: cannot find …E0004: non-exhaustive patterns — Rust: error[E0004]: non-exhaustive patterns: `None` not covered (Rust)E0004: non-exhausti…E0499: cannot borrow as mutable more than once at a time — Rust: error[E0499]: cannot borrow `v` as mutable more than once at a time (Rust)E0499: cannot borro…E0277: the trait bound is not satisfied — Rust: error[E0277]: the trait bound `Foo: Display` is not satisfied / `Rc<RefCell<T>>` cannot be sent between threads safely (Rust)E0277: the trait bo…E0599: no method named found for type — Rust: error[E0599]: no method named `push_str` found for struct `Vec<String>` in the current scope (Rust)E0599: no method na…E0382 — Rust: error[E0382]: borrow of moved value: `x` (Rust)E0382E0596: cannot borrow as mutable, as it is not declared as mutable — Rust: error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable (Rust)E0596: cannot borro…E0716: temporary value dropped while borrowed — Rust: error[E0716]: temporary value dropped while borrowed — creates a temporary value which is freed while still in use (Rust)E0716: temporary va…E0502 — Rust: error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable (Rust)E0502E0728: await is only allowed inside async functions and blocks — Rust: error[E0728]: `await` is only allowed inside `async` functions and blocks (Rust)E0728: await is onl…E0752: main function is not allowed to be async — Rust: error[E0752]: `main` function is not allowed to be `async` (Rust)E0752: main functio…Cannot start a runtime from within a runtime (Tokio) — 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 (Rust)Cannot start a runt…held broken packages — Unmet dependencies / E: Unable to correct problems, you have held broken packages (Linux)held broken packagesE0432: unresolved import — Rust: error[E0432]: unresolved import `crate::utils` — maybe a missing crate `utils`? (Rust)E0432: unresolved i…E0433: failed to resolve: use of undeclared type or module — Rust: error[E0433]: failed to resolve: use of undeclared type `HashMap` (Rust)E0433: failed to re…ssh port 22 Connection refused — ssh: connect to host x port 22: Connection refused (Linux)ssh port 22 Connect…ssh port 22 Connection timed out — ssh: connect to host x port 22: Connection timed out (Linux)ssh port 22 Connect…Temporary failure in name resolution — ping: google.com: Temporary failure in name resolution (Linux)Temporary failure i…

Directly related (10)

undefined reference to pthread_createC/C++

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.

terminate called without an active exceptionC/C++

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…

feature edition2024 is required / Cargo.lock version too newRust

Cargo: error: failed to parse manifest — feature `edition2024` is required / lock file version 4 requires `-Znext-lockfile-bump`

Your Cargo is older than the manifest or lockfile requires.

Blocking waiting for file lock on package cache / build directoryRust

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.

E0505: cannot move out of value because it is borrowedRust

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.

E0106: missing lifetime specifierRust

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.

E0597: borrowed value does not live long enoughRust

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).

E0521: borrowed data escapes outside of functionRust

Rust: error[E0521]: borrowed data escapes outside of function — `data` escapes the function body here (tokio::spawn requires 'static)

A reference was passed to something requiring `'static` (spawn tasks/threads) but it borrows local data.

cargo: failed to select a version for the requirementRust

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: failed to get from registry (spurious network error)Rust

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).

Two steps away (25)

error while loading shared librariesLinux

error while loading shared libraries: libX.so.N: cannot open shared object file: No such file or directory

The program needs a shared library (.so) that isn’t installed or isn’t on the loader’s search path.

undefined reference toC/C++

C/C++: undefined reference to `function' — collect2: error: ld returned 1 exit status

The linker can’t find the definition of a function or variable that was declared and used.

multiple definition ofC/C++

C/C++: multiple definition of `x'; first defined here — ld returned 1 exit status

The linker found the same function or global variable defined in two object files — usually something defined in a header.

terminate called after throwing an instance ofC/C++

C++: terminate called after throwing an instance of 'std::out_of_range' — what(): vector::_M_range_check

A C++ exception wasn’t caught anywhere, so std::terminate aborted the program. what() tells you the reason.

call of overloaded is ambiguousC/C++

C++: error: call of overloaded 'f(int)' is ambiguous

Two or more overloads fit equally well, so the compiler refuses to guess which function you meant.

cannot declare variable to be of abstract typeC/C++

C++: error: cannot declare variable 'x' to be of abstract type 'Shape' (pure virtual functions)

You tried to create an object of a class that still has pure virtual functions; only a derived class that overrides all of them c…

E0507: cannot move out of a shared reference / indexRust

Rust: error[E0507]: cannot move out of `self.name` which is behind a shared reference

You tried to take ownership of a value through a reference (or from a Vec/Option behind `&`).

E0425: cannot find value in this scopeRust

Rust: error[E0425]: cannot find value `x` in this scope

The identifier (variable, function, constant) isn't defined where it's used.

E0004: non-exhaustive patternsRust

Rust: error[E0004]: non-exhaustive patterns: `None` not covered

A `match` doesn't handle every possible value of the type.

E0499: cannot borrow as mutable more than once at a timeRust

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.

E0277: the trait bound is not satisfiedRust

Rust: error[E0277]: the trait bound `Foo: Display` is not satisfied / `Rc<RefCell<T>>` cannot be sent between threads safely

A type doesn't implement a trait required by a function, macro or generic bound.

E0599: no method named found for typeRust

Rust: error[E0599]: no method named `push_str` found for struct `Vec<String>` in the current scope

The type doesn't have that method — wrong type, trait not in scope, or missing derive/feature.

E0382Rust

Rust: error[E0382]: borrow of moved value: `x`

A value was moved (ownership transferred) and then used again.

E0596: cannot borrow as mutable, as it is not declared as mutableRust

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.

E0716: temporary value dropped while borrowedRust

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.

E0502Rust

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.

E0728: await is only allowed inside async functions and blocksRust

Rust: error[E0728]: `await` is only allowed inside `async` functions and blocks

You used `.await` in a normal (sync) function or closure.

E0752: main function is not allowed to be asyncRust

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.

Cannot start a runtime from within a runtime (Tokio)Rust

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.

held broken packagesLinux

Unmet dependencies / E: Unable to correct problems, you have held broken packages

apt can’t find a set of package versions that satisfies all dependencies — usually mixed repositories or a package from another r…

E0432: unresolved importRust

Rust: error[E0432]: unresolved import `crate::utils` — maybe a missing crate `utils`?

A `use` path doesn't point to an existing module, crate or item.

E0433: failed to resolve: use of undeclared type or moduleRust

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).

ssh port 22 Connection refusedLinux

ssh: connect to host x port 22: Connection refused

The server answered, but nothing is listening on the SSH port — sshd isn’t running, it uses another port, or a firewall actively…

ssh port 22 Connection timed outLinux

ssh: connect to host x port 22: Connection timed out

SSH packets get no reply — a firewall/security group drops them, the server is off, or the IP is wrong.

Temporary failure in name resolutionLinux

ping: google.com: Temporary failure in name resolution

The Linux host can’t resolve domain names — no working DNS server is configured or reachable.