Skip to content

Commit e1f0d6a

Browse files
committed
Fix doctest errors related to rustc_middle
1 parent c5d82ed commit e1f0d6a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

compiler/rustc_middle/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ version = "0.0.0"
44
edition = "2021"
55

66
[lib]
7-
doctest = false
87

98
[dependencies]
109
bitflags = "1.2.1"

compiler/rustc_middle/src/query/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,8 @@ rustc_queries! {
16481648
/// a generic type parameter will panic if you call this method on it:
16491649
///
16501650
/// ```
1651+
/// use std::fmt::Debug;
1652+
///
16511653
/// pub trait Foo<T: Debug> {}
16521654
/// ```
16531655
///

compiler/rustc_middle/src/ty/inhabitedness/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//!
66
//! # Example
77
//! ```rust
8-
//! enum Void {}
8+
//! #![feature(never_type)]
99
//! mod a {
1010
//! pub mod b {
1111
//! pub struct SecretlyUninhabited {
@@ -15,6 +15,7 @@
1515
//! }
1616
//!
1717
//! mod c {
18+
//! enum Void {}
1819
//! pub struct AlsoSecretlyUninhabited {
1920
//! _priv: Void,
2021
//! }
@@ -35,7 +36,7 @@
3536
//! `Foo`.
3637
//!
3738
//! # Example
38-
//! ```rust
39+
//! ```ignore(illustrative)
3940
//! let foo_result: Result<T, Foo> = ... ;
4041
//! let Ok(t) = foo_result;
4142
//! ```

0 commit comments

Comments
 (0)