Skip to content

Commit 1b8abbd

Browse files
committed
Formatting
1 parent e9e907a commit 1b8abbd

3 files changed

Lines changed: 6 additions & 25 deletions

File tree

compiler/rustc_middle/src/sync.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,7 @@ where
229229
&& let Some(QueryInclusion { id, branch }) = icx.query
230230
{
231231
let icx = tls::ImplicitCtxt {
232-
query: Some(QueryInclusion {
233-
id,
234-
branch: branch.branch(branch_num, branch_space),
235-
}),
232+
query: Some(QueryInclusion { id, branch: branch.branch(branch_num, branch_space) }),
236233
..*icx
237234
};
238235
tls::enter_context(&icx, f)

compiler/rustc_query_impl/src/plumbing.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,7 @@ impl<'tcx> QueryContext for QueryCtxt<'tcx> {
161161
// Update the `ImplicitCtxt` to point to our new query job.
162162
let new_icx = ImplicitCtxt {
163163
tcx: self.tcx,
164-
query: Some(QueryInclusion {
165-
id: token,
166-
branch: BranchKey::root(),
167-
}),
164+
query: Some(QueryInclusion { id: token, branch: BranchKey::root() }),
168165
query_depth: current_icx.query_depth + depth_limit as usize,
169166
task_deps: current_icx.task_deps,
170167
};

compiler/rustc_query_system/src/query/job.rs

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,14 @@ pub struct QueryJob<I> {
7272

7373
impl<I> Clone for QueryJob<I> {
7474
fn clone(&self) -> Self {
75-
Self {
76-
id: self.id,
77-
span: self.span,
78-
parent: self.parent,
79-
latch: self.latch.clone(),
80-
}
75+
Self { id: self.id, span: self.span, parent: self.parent, latch: self.latch.clone() }
8176
}
8277
}
8378

8479
impl<I> QueryJob<I> {
8580
/// Creates a new query job.
8681
#[inline]
87-
pub fn new(
88-
id: QueryJobId,
89-
span: Span,
90-
parent: Option<QueryInclusion>,
91-
) -> Self {
82+
pub fn new(id: QueryJobId, span: Span, parent: Option<QueryInclusion>) -> Self {
9283
QueryJob { id, span, parent, latch: Weak::new() }
9384
}
9485

@@ -211,12 +202,8 @@ impl<I> QueryLatch<I> {
211202
query: Option<QueryInclusion>,
212203
span: Span,
213204
) -> Result<(), CycleError<I>> {
214-
let waiter = Arc::new(QueryWaiter {
215-
query,
216-
span,
217-
cycle: Mutex::new(None),
218-
condvar: Condvar::new(),
219-
});
205+
let waiter =
206+
Arc::new(QueryWaiter { query, span, cycle: Mutex::new(None), condvar: Condvar::new() });
220207
self.wait_on_inner(qcx, &waiter);
221208
// FIXME: Get rid of this lock. We have ownership of the QueryWaiter
222209
// although another thread may still have a Arc reference so we cannot

0 commit comments

Comments
 (0)