Skip to content

Commit

Permalink
Rollup merge of rust-lang#104626 - reez12g:issue-99144-2, r=jyn514
Browse files Browse the repository at this point in the history
Fix doctest errors related to rustc_middle

Helps with rust-lang#99144
  • Loading branch information
Yuki Okushi authored Nov 20, 2022
2 parents 28034bb + e1f0d6a commit d553811
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 d553811

Please sign in to comment.