Skip to content

Rollup of 7 pull requests #124034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Apr 16, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a30a79c
std: use queue-based `RwLock` on SGX
joboet Apr 11, 2024
8afee14
std: use queue-based `RwLock` on Xous
joboet Apr 11, 2024
dbda4f9
std: use queue-based `RwLock` on Windows 7
joboet Apr 11, 2024
ff2e4ed
Factor out common code in interface tests.
nnethercote Mar 21, 2024
62c32ae
Construct `SourceMap` at the same time as `SessionGlobals`.
nnethercote Mar 21, 2024
9b0ced0
Move `initialize_checked_jobserver`.
nnethercote Mar 21, 2024
93544d5
Match ergonomics 2024: Implement eat-one-layer
Jules-Bertholet Apr 1, 2024
4cd87c4
Properly downgrade inherited mutability
Jules-Bertholet Apr 6, 2024
b6c4097
Support `let &mut x = &&mut 0;`
Jules-Bertholet Apr 6, 2024
e3945bd
Ensure inherited reference is never set to `&mut` behind an `&`
Jules-Bertholet Apr 6, 2024
88cd821
Address review comments
Jules-Bertholet Apr 14, 2024
3efbe3e
Simplify `calc_default_binding_mode`
Jules-Bertholet Apr 14, 2024
82e7773
Subtype predicates only exist on inference types, so we can allow the…
oli-obk Apr 15, 2024
780dfb8
Outline default query and hook provider function implementations
DaniPopes Apr 16, 2024
864eb7f
Remove uneeded clones now that TrustedStep implies Copy
krtab Apr 12, 2024
10b6ca1
std: fix lint on SGX
joboet Apr 16, 2024
a03aeca
Allow workproducts without object files.
pacak Apr 16, 2024
14496d5
Rollup merge of #122811 - nnethercote:mv-SourceMap-init, r=WaffleLapkin
GuillaumeGomez Apr 16, 2024
239b372
Rollup merge of #123512 - Jules-Bertholet:ref-pat-eat-one-layer-2024,…
GuillaumeGomez Apr 16, 2024
1176134
Rollup merge of #123811 - joboet:queue_em_up, r=ChrisDenton
GuillaumeGomez Apr 16, 2024
183c706
Rollup merge of #123859 - krtab:uneeded_clone, r=cuviper
GuillaumeGomez Apr 16, 2024
f939d1f
Rollup merge of #123979 - oli-obk:define_opaque_types7, r=compiler-er…
GuillaumeGomez Apr 16, 2024
4779115
Rollup merge of #124016 - DaniPopes:dedup-default-providers, r=lcnr
GuillaumeGomez Apr 16, 2024
7709b7d
Rollup merge of #124023 - pacak:less-splody, r=jieyouxu
GuillaumeGomez Apr 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove uneeded clones now that TrustedStep implies Copy
This is a follow up to 11fa176
  • Loading branch information
krtab committed Apr 16, 2024
commit 864eb7fa14c25de655e03d692c5da798d3d98413
16 changes: 8 additions & 8 deletions library/core/src/iter/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1156,11 +1156,11 @@ impl<T: TrustedStep> RangeInclusiveIteratorImpl for ops::RangeInclusive<T> {
let is_iterating = self.start < self.end;
Some(if is_iterating {
// SAFETY: just checked precondition
let n = unsafe { Step::forward_unchecked(self.start.clone(), 1) };
let n = unsafe { Step::forward_unchecked(self.start, 1) };
mem::replace(&mut self.start, n)
} else {
self.exhausted = true;
self.start.clone()
self.start
})
}

Expand All @@ -1179,15 +1179,15 @@ impl<T: TrustedStep> RangeInclusiveIteratorImpl for ops::RangeInclusive<T> {

while self.start < self.end {
// SAFETY: just checked precondition
let n = unsafe { Step::forward_unchecked(self.start.clone(), 1) };
let n = unsafe { Step::forward_unchecked(self.start, 1) };
let n = mem::replace(&mut self.start, n);
accum = f(accum, n)?;
}

self.exhausted = true;

if self.start == self.end {
accum = f(accum, self.start.clone())?;
accum = f(accum, self.start)?;
}

try { accum }
Expand All @@ -1201,11 +1201,11 @@ impl<T: TrustedStep> RangeInclusiveIteratorImpl for ops::RangeInclusive<T> {
let is_iterating = self.start < self.end;
Some(if is_iterating {
// SAFETY: just checked precondition
let n = unsafe { Step::backward_unchecked(self.end.clone(), 1) };
let n = unsafe { Step::backward_unchecked(self.end, 1) };
mem::replace(&mut self.end, n)
} else {
self.exhausted = true;
self.end.clone()
self.end
})
}

Expand All @@ -1224,15 +1224,15 @@ impl<T: TrustedStep> RangeInclusiveIteratorImpl for ops::RangeInclusive<T> {

while self.start < self.end {
// SAFETY: just checked precondition
let n = unsafe { Step::backward_unchecked(self.end.clone(), 1) };
let n = unsafe { Step::backward_unchecked(self.end, 1) };
let n = mem::replace(&mut self.end, n);
accum = f(accum, n)?;
}

self.exhausted = true;

if self.start == self.end {
accum = f(accum, self.start.clone())?;
accum = f(accum, self.start)?;
}

try { accum }
Expand Down