Skip to content

Commit c850274

Browse files
committed
adopt impl Trait for tls::enter
1 parent f1f209d commit c850274

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/librustc/ty/context.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1671,11 +1671,11 @@ pub mod tls {
16711671
})
16721672
}
16731673

1674-
pub fn enter<'a, 'gcx: 'tcx, 'tcx, F, R>(gcx: &'a GlobalCtxt<'gcx>,
1675-
interners: &'a CtxtInterners<'tcx>,
1676-
f: F) -> R
1677-
where F: FnOnce(TyCtxt<'a, 'gcx, 'tcx>) -> R
1678-
{
1674+
pub fn enter<'a, 'gcx: 'tcx, 'tcx, R>(
1675+
gcx: &'a GlobalCtxt<'gcx>,
1676+
interners: &'a CtxtInterners<'tcx>,
1677+
f: impl FnOnce(TyCtxt<'a, 'gcx, 'tcx>) -> R,
1678+
) -> R {
16791679
let gcx_ptr = gcx as *const _ as *const ThreadLocalGlobalCtxt;
16801680
let interners_ptr = interners as *const _ as *const ThreadLocalInterners;
16811681
TLS_TCX.with(|tls| {

0 commit comments

Comments
 (0)