Fix compiler docs
This commit is contained in:
committed by
Guillaume Gomez
parent
3416fa1882
commit
adc24d1b5e
@@ -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 ()>>`.
|
||||
|
||||
Reference in New Issue
Block a user