diff --git a/compiler/rustc_middle/Cargo.toml b/compiler/rustc_middle/Cargo.toml index 5f6e498dbeaa2..fc1167c105ae8 100644 --- a/compiler/rustc_middle/Cargo.toml +++ b/compiler/rustc_middle/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] bitflags = "1.2.1" diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 1564cf414bd25..0277201343700 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -1648,6 +1648,8 @@ rustc_queries! { /// a generic type parameter will panic if you call this method on it: /// /// ``` + /// use std::fmt::Debug; + /// /// pub trait Foo {} /// ``` /// diff --git a/compiler/rustc_middle/src/ty/inhabitedness/mod.rs b/compiler/rustc_middle/src/ty/inhabitedness/mod.rs index 279a728ea3922..786eced61d6e9 100644 --- a/compiler/rustc_middle/src/ty/inhabitedness/mod.rs +++ b/compiler/rustc_middle/src/ty/inhabitedness/mod.rs @@ -5,7 +5,7 @@ //! //! # Example //! ```rust -//! enum Void {} +//! #![feature(never_type)] //! mod a { //! pub mod b { //! pub struct SecretlyUninhabited { @@ -15,6 +15,7 @@ //! } //! //! mod c { +//! enum Void {} //! pub struct AlsoSecretlyUninhabited { //! _priv: Void, //! } @@ -35,7 +36,7 @@ //! `Foo`. //! //! # Example -//! ```rust +//! ```ignore(illustrative) //! let foo_result: Result = ... ; //! let Ok(t) = foo_result; //! ```