Skip to content

Commit

Permalink
Fix doctest errors related to rustc_middle
Browse files Browse the repository at this point in the history
  • Loading branch information
reez12g committed Nov 20, 2022
1 parent c5d82ed commit e1f0d6a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion compiler/rustc_middle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version = "0.0.0"
edition = "2021"

[lib]
doctest = false

[dependencies]
bitflags = "1.2.1"
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: Debug> {}
/// ```
///
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_middle/src/ty/inhabitedness/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//!
//! # Example
//! ```rust
//! enum Void {}
//! #![feature(never_type)]
//! mod a {
//! pub mod b {
//! pub struct SecretlyUninhabited {
Expand All @@ -15,6 +15,7 @@
//! }
//!
//! mod c {
//! enum Void {}
//! pub struct AlsoSecretlyUninhabited {
//! _priv: Void,
//! }
Expand All @@ -35,7 +36,7 @@
//! `Foo`.
//!
//! # Example
//! ```rust
//! ```ignore(illustrative)
//! let foo_result: Result<T, Foo> = ... ;
//! let Ok(t) = foo_result;
//! ```
Expand Down

0 comments on commit e1f0d6a

Please sign in to comment.