From ffbeebbf7a6dc5fba40b439fc0ebe80ac72af309 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 3 Jan 2022 22:01:35 -0800 Subject: [PATCH] Make rustc_log doc test runnable --- Cargo.lock | 1 + compiler/rustc_log/Cargo.toml | 6 +++--- compiler/rustc_log/src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 17f7d2ca15a9..eed6cb275164 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4080,6 +4080,7 @@ name = "rustc_log" version = "0.0.0" dependencies = [ "atty", + "rustc_span", "tracing", "tracing-subscriber", "tracing-tree", diff --git a/compiler/rustc_log/Cargo.toml b/compiler/rustc_log/Cargo.toml index 5b0379462246..1b2cde605556 100644 --- a/compiler/rustc_log/Cargo.toml +++ b/compiler/rustc_log/Cargo.toml @@ -3,14 +3,14 @@ name = "rustc_log" version = "0.0.0" edition = "2021" -[lib] -doctest = false - [dependencies] atty = "0.2" tracing = "0.1.28" tracing-subscriber = { version = "0.3.3", default-features = false, features = ["fmt", "env-filter", "smallvec", "parking_lot", "ansi"] } tracing-tree = "0.2.0" +[dev-dependencies] +rustc_span = { path = "../rustc_span" } + [features] max_level_info = ['tracing/max_level_info'] diff --git a/compiler/rustc_log/src/lib.rs b/compiler/rustc_log/src/lib.rs index 44c76a7379bd..f5e7435d36e3 100644 --- a/compiler/rustc_log/src/lib.rs +++ b/compiler/rustc_log/src/lib.rs @@ -12,7 +12,7 @@ //! rustc_span = { path = "../rust/compiler/rustc_span" } //! ``` //! -//! ```ignore +//! ``` //! fn main() { //! rustc_log::init_rustc_env_logger().unwrap(); //!