From 720d2db7c49be27a256718e77f59c0af1b6906a4 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Tue, 22 Oct 2024 17:26:48 -0400 Subject: [PATCH] docs(lib): fix up misleading example about unstable features --- src/lib.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 23087a0efe..50e20fa1dc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -52,19 +52,22 @@ //! //! [feature flags]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section //! -//! # Unstable Features +//! ## Unstable Features //! //! hyper includes a set of unstable optional features that can be enabled through the use of a //! feature flag and a [configuration flag]. //! //! The following is a list of feature flags and their corresponding `RUSTFLAG`: +//! //! - `ffi`: Enables C API for hyper `hyper_unstable_ffi`. //! - `tracing`: Enables debug logging with `hyper_unstable_tracing`. //! -//! Enabling an unstable feature is possible with the following `cargo` command, as of version `1.64.0`: +//! For example: +//! //! ```notrust -//! RUSTFLAGS="--cfg hyper_unstable_tracing" cargo rustc --features client,http1,http2,tracing --crate-type cdylib -//!``` +//! RUSTFLAGS="--cfg hyper_unstable_tracing" cargo build +//! ``` +//! //! [configuration flag]: https://doc.rust-lang.org/reference/conditional-compilation.html //! //! # Stability