Email me

Rust errors / Attributes, macros and features

Rust compiler error · checked with rustc 1.99.0

Rust error E0658: is unstable

What it meansThe code uses a feature that only exists on nightly Rust. Either switch to a stable alternative or opt in on nightly with #![feature(..)].

What rustc prints

error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
 --> main.rs:1:5
  |
1 | use std::intrinsics; // error: use of unstable library feature `core_intrinsics`
  |     ^^^^^^^^^^^^^^^

Real output of rustc 1.99.0 compiling the official example below (2021 edition). Your names and line numbers will differ; the first line is the part to match.

Why it happens

  • A crate or snippet written for nightly.
  • An MSRV mismatch: the feature was stabilised in a newer Rust than you run.

How to fix it

1. Update Rust

Many features become stable; check the release notes.

rustup update stable

2. Use nightly for this project

rustup override set nightly

Other wordings of this error

is unstable, use of unstable library feature, add `#![feature, is experimental

E0658Attributes, macros and features
Activein rustc 1.99.0
4related errors linked below

The compiler team's explanation

An unstable feature was used.

Erroneous code example:

use std::intrinsics; // error: use of unstable library feature `core_intrinsics`

If you're using a stable or a beta version of rustc, you won't be able to use any unstable features. In order to do so, please switch to a nightly version of rustc (by using rustup).

If you're using a nightly version of rustc, just add the corresponding feature to be able to use it:

#![feature(core_intrinsics)]

use std::intrinsics; // ok!

From rustc --explain E0658 (1.99.0), part of the Rust project, MIT or Apache-2.0. Official page.

Related errors

All 518 Rust error codes · Rust crate data · Glossary

Up next

Often hit nextE0602: An unknown or invalid lint was used on the command lineA related error from the same family.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ