We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
with_tables
1 parent 16fadb3 commit 06a9dbeCopy full SHA for 06a9dbe
compiler/rustc_smir/src/rustc_internal/mod.rs
@@ -162,12 +162,12 @@ where
162
163
/// Loads the current context and calls a function with it.
164
/// Do not nest these, as that will ICE.
165
-pub(crate) fn with_tables<'tcx, R>(f: impl FnOnce(&mut Tables<'tcx>) -> R) -> R {
+pub(crate) fn with_tables<R>(f: impl for<'tcx> FnOnce(&mut Tables<'tcx>) -> R) -> R {
166
assert!(TLV.is_set());
167
TLV.with(|tlv| {
168
let ptr = tlv.get();
169
assert!(!ptr.is_null());
170
- let wrapper = ptr as *const TablesWrapper<'tcx>;
+ let wrapper = ptr as *const TablesWrapper<'_>;
171
let mut tables = unsafe { (*wrapper).0.borrow_mut() };
172
f(&mut *tables)
173
})
0 commit comments