Skip to content

Commit 4508f5f

Browse files
committed
update outdated doc with new example
1 parent 1c3b035 commit 4508f5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_hir_analysis/src/check/wfcheck.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ fn check_well_formed(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(), ErrorGua
218218
/// definition itself. For example, this definition would be illegal:
219219
///
220220
/// ```rust
221-
/// struct Ref<'a, T> { x: &'a T }
221+
/// struct StaticRef<T> { x: &'static T }
222222
/// ```
223223
///
224-
/// because the type did not declare that `T:'a`.
224+
/// because the type did not declare that `T: 'static`.
225225
///
226226
/// We do this check as a pre-pass before checking fn bodies because if these constraints are
227227
/// not included it frequently leads to confusing errors in fn bodies. So it's better to check

0 commit comments

Comments
 (0)