Closed mattlourenco27 closed 1 year ago
Here is an example where lifetimes need to be fixed:
error[E0261]: use of undeclared lifetime name 'tcx
--> src/librustdoc/clean/utils.rs:302:52 |
302 | pub(crate) fn printconst(cx: &DocContext<'>, n: &'tcx ty::Const<'_>) -> String { | - ^^^^ undeclared lifetime |
---|---|---|---|
help: consider introducing lifetime 'tcx here: <'tcx> |
How to make this fix: https://doc.rust-lang.org/beta/error_codes/E0261.html
I commented out this obsolete feature: //#![feature(in_band_lifetimes)]
This feature used to allow you to use lifetimes without bringing them into scope first. Now that the feature is no longer supported, we need to fix any errors where the lifetime was not explicitly brought into scope.