1
Fork 0

fix rustc_log doctest

This commit is contained in:
Ralf Jung 2023-02-10 15:07:55 +01:00
parent 569c2fe54b
commit 623ed8e481

View file

@ -14,7 +14,7 @@
//! //!
//! ``` //! ```
//! fn main() { //! fn main() {
//! rustc_log::init_rustc_env_logger().unwrap(); //! rustc_log::init_env_logger("LOG").unwrap();
//! //!
//! let edition = rustc_span::edition::Edition::Edition2021; //! let edition = rustc_span::edition::Edition::Edition2021;
//! rustc_span::create_session_globals_then(edition, || { //! rustc_span::create_session_globals_then(edition, || {
@ -23,9 +23,9 @@
//! } //! }
//! ``` //! ```
//! //!
//! Now `RUSTC_LOG=debug cargo run` will run your minimal main.rs and show //! Now `LOG=debug cargo run` will run your minimal main.rs and show
//! rustc's debug logging. In a workflow like this, one might also add //! rustc's debug logging. In a workflow like this, one might also add
//! `std::env::set_var("RUSTC_LOG", "debug")` to the top of main so that `cargo //! `std::env::set_var("LOG", "debug")` to the top of main so that `cargo
//! run` by itself is sufficient to get logs. //! run` by itself is sufficient to get logs.
//! //!
//! The reason rustc_log is a tiny separate crate, as opposed to exposing the //! The reason rustc_log is a tiny separate crate, as opposed to exposing the