fix most compiler/ doctests

This commit is contained in:
Elliot Roberts
2022-04-15 15:04:34 -07:00
parent bf611439e3
commit 7907385999
116 changed files with 666 additions and 609 deletions

View File

@@ -712,9 +712,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
/// and we desugared it so that the type of the expression is
/// `Closure`, and `Closure` expects `i32` as argument. Then it
/// is "as if" the compiler generated this impl:
///
/// impl Fn(i32) for Closure { ... }
///
/// ```ignore (illustrative)
/// impl Fn(i32) for Closure { ... }
/// ```
/// Now imagine our obligation is `Closure: Fn(usize)`. So far
/// we have matched the self type `Closure`. At this point we'll
/// compare the `i32` to `usize` and generate an error.

View File

@@ -1933,7 +1933,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
///
/// Here are some (simple) examples:
///
/// ```
/// ```ignore (illustrative)
/// (i32, u32) -> [i32, u32]
/// Foo where struct Foo { x: i32, y: u32 } -> [i32, u32]
/// Bar<i32> where struct Bar<T> { x: T, y: u32 } -> [i32, u32]