Fix compiler docs
This commit is contained in:
parent
3416fa1882
commit
adc24d1b5e
10 changed files with 32 additions and 16 deletions
|
@ -707,10 +707,12 @@ pub(super) fn check_opaque_for_cycles<'tcx>(
|
|||
/// check those cases in the `param_env` of that function, which may have
|
||||
/// bounds not on this opaque type:
|
||||
///
|
||||
/// type X<T> = impl Clone
|
||||
/// ```ignore (illustrative)
|
||||
/// type X<T> = impl Clone;
|
||||
/// fn f<T: Clone>(t: T) -> X<T> {
|
||||
/// t
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// Without this check the above code is incorrectly accepted: we would ICE if
|
||||
/// some tried, for example, to clone an `Option<X<&mut ()>>`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue