Auto merge of #99324 - reez12g:issue-99144, r=jyn514
Enable doctests in compiler/ crates Helps with https://github.com/rust-lang/rust/issues/99144
This commit is contained in:
commit
0152393048
36 changed files with 16 additions and 40 deletions
|
@ -58,6 +58,7 @@ impl<'cx, 'a> Context<'cx, 'a> {
|
|||
/// Builds the whole `assert!` expression. For example, `let elem = 1; assert!(elem == 1);` expands to:
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(generic_assert_internals)]
|
||||
/// let elem = 1;
|
||||
/// {
|
||||
/// #[allow(unused_imports)]
|
||||
|
@ -70,7 +71,7 @@ impl<'cx, 'a> Context<'cx, 'a> {
|
|||
/// __local_bind0
|
||||
/// } == 1
|
||||
/// ) {
|
||||
/// panic!("Assertion failed: elem == 1\nWith captures:\n elem = {}", __capture0)
|
||||
/// panic!("Assertion failed: elem == 1\nWith captures:\n elem = {:?}", __capture0)
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
|
|
|
@ -1114,6 +1114,11 @@ impl<'a> MethodDef<'a> {
|
|||
/// ```
|
||||
/// is equivalent to:
|
||||
/// ```
|
||||
/// #![feature(core_intrinsics)]
|
||||
/// enum A {
|
||||
/// A1,
|
||||
/// A2(i32)
|
||||
/// }
|
||||
/// impl ::core::cmp::PartialEq for A {
|
||||
/// #[inline]
|
||||
/// fn eq(&self, other: &A) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue