8000 Rollup of 15 pull requests by jonas-schievink · Pull Request #78303 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 15 pull requests #78303

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

Closed
wants to merge 55 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
16e10bf
Revert "Allow dynamic linking for iOS/tvOS targets."
francesca64 Oct 7, 2020
16d65d0
revise Hermit's mutex interface to support the behaviour of StaticMutex
stlankes Oct 6, 2020
98fcc3f
using the latest version of libhermit-rs
stlankes Oct 6, 2020
d560b50
revise code to pass the format check
stlankes Oct 6, 2020
986c1fc
revise comments and descriptions of the helper functions
stlankes Oct 7, 2020
d6e955f
fix typos in new method
stlankes Oct 9, 2020
530f575
revise code to pass the format check
stlankes Oct 9, 2020
8d8a290
add hermit to the list of omit OS
stlankes Oct 9, 2020
33fd08b
remove obsolete function diverge
stlankes Oct 12, 2020
30c3dad
reuse implementation of the system provider "unsupported"
stlankes Oct 12, 2020
1741e5b
define required type 'MovableMutex'
stlankes Oct 12, 2020
bc6b2ac
move __rg_oom to the libos to avoid duplicated symbols
stlankes Oct 13, 2020
77d9831
minor changes to pass the format check
stlankes Oct 13, 2020
bf268fe
box mutex to get a movable mutex
stlankes Oct 13, 2020
d3467fe
`#[deny(unsafe_op_in_unsafe_fn)]` in sys/cloudabi
Aug 2, 2020
b62b352
Check for exhaustion in RangeInclusive::contains
cuviper Oct 19, 2020
9fd79a3
make exhausted RangeInclusive::end_bound return Excluded(end)
cuviper Oct 19, 2020
a9470d0
Simplify assert terminator only if condition evaluates to expected value
tmiasko Oct 21, 2020
9202fbd
Check for exhaustion in S 8000 liceIndex for RangeInclusive
cuviper Oct 21, 2020
0a4d948
Remove unused ProfileCategory.
cjgillot Jun 7, 2020
de76370
Remove unused category from macros.
cjgillot Oct 11, 2020
de7da7f
Unify query name and node name.
cjgillot Oct 11, 2020
e853cc0
Retire rustc_dep_node_force.
cjgillot Oct 11, 2020
57ba8ed
Retire rustc_dep_node_try_load_from_on_disk_cache.
cjgillot Oct 11, 2020
40ab18d
improve const infer error
lcnr Oct 22, 2020
9775ac6
Document inline-const in the Unstable Book
camelid Oct 22, 2020
09135e4
Add regression test for issue-77475
JohnTitor Oct 23, 2020
e1c524c
review
lcnr Oct 23, 2020
50e34d6
Do not try to report on closures to avoid ICE
JohnTitor Oct 23, 2020
9b90e17
add `insert` and `insert_with` to `Option`
Canop Oct 1, 2020
e8df2a4
remove `option.insert_with`
Canop Oct 1, 2020
60a96ca
more tests in option.insert, code cleaning in option
Canop Oct 1, 2020
cc8b77a
fix naming unconsistency between function doc and prototype
Canop Oct 3, 2020
3955779
Update library/core/src/option.rs
Canop Oct 23, 2020
415a8e5
Update library/core/src/option.rs
Canop Oct 23, 2020
216d0fe
add tracking issue number to option_insert feature gate
Canop Oct 23, 2020
efedcb2
Update description of Empty Enum for accuracy
Enet4 Oct 23, 2020
972d9e8
move `visit_predicate` into `TypeVisitor`
lcnr Oct 23, 2020
a0ce1e0
Always store Rustdoc theme when it's changed
nasso Oct 23, 2020
929f80e
Add a spin loop hint for Arc::downgrade
nicbn Sep 12, 2020
eccd04c
Rollup merge of #75115 - chansuke:sys-cloudabi-unsafe, r=KodrAus
jonas-schievink Oct 23, 2020
52c9f0f
Rollup merge of #76649 - nicbn:arc-spin-loop-hint, r=m-ou-se
jonas-schievink Oct 23, 2020
39b3f6b
Rollup merge of #77392 - Canop:option_insert, r=m-ou-se
jonas-schievink Oct 23, 2020
b0c018d
Rollup merge of #77610 - hermitcore:dtors, r=m-ou-se
jonas-schievink Oct 23, 2020
b92f3c8
Rollup merge of #77716 - francesca64:revert-ios-dynamic-linking, r=jo…
jonas-schievink Oct 23, 2020
0647b99
Rollup merge of #77830 - cjgillot:remacro, r=oli-obk
jonas-schievink Oct 23, 2020
e8dbd9d
Rollup merge of #78109 - cuviper:exhausted-rangeinc, r=dtolnay
jonas-schievink Oct 23, 2020
79afa04
Rollup merge of #78198 - tmiasko:assert, r=davidtwco
jonas-schievink Oct 23, 2020
0ec32ef
Rollup merge of #78249 - lcnr:ct-infer-origin, r=varkor
jonas-schievink Oct 23, 2020
58855f9
Rollup merge of #78250 - camelid:document-inline-const, r=spastorino
jonas-schievink Oct 23, 2020
ba91d8e
Rollup merge of #78264 - JohnTitor:macro-test, r=petrochenkov
jonas-schievink Oct 23, 2020
09d589e
Rollup merge of #78268 - JohnTitor:issue-78262, r=estebank
jonas-schievink Oct 23, 2020
411bef6
Rollup merge of #78274 - Enet4:patch-1, r=jonas-schievink
jonas-schievink Oct 23, 2020
49dc5ec
Rollup merge of #78278 - lcnr:predicate-visit, r=matthewjasper
jonas-schievink Oct 23, 2020
9a132f5
Rollup merge of #78293 - nasso:master, r=GuillaumeGomez
jonas-schievink Oct 23, 2020
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
Check for exhaustion in RangeInclusive::contains
When a range has finished iteration, `is_empty` returns true, so it
should also be the case that `contains` returns false.
  • Loading branch information
cuviper committed Oct 19, 2020
commit b62b352f4779072c07c110a63fd83afa9508b9e9
12 changes: 11 additions & 1 deletion library/core/src/ops/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,23 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
/// assert!(!(0.0..=f32::NAN).contains(&0.0));
/// assert!(!(f32::NAN..=1.0).contains(&1.0));
/// ```
///
/// This method always returns `false` after iteration has finished:
///
/// ```
/// let mut r = 3..=5;
/// assert!(r.contains(&3) && r.contains(&5));
/// for _ in r.by_ref() {}
/// // Precise field values are unspecified here
/// assert!(!r.contains(&3) && !r.contains(&5));
/// ```
#[stable(feature = "range_contains", since = "1.35.0")]
pub fn contains<U>(&self, item: &U) -> bool
where
Idx: PartialOrd<U>,
U: ?Sized + PartialOrd<Idx>,
{
<Self as RangeBounds<Idx>>::contains(self, item)
!self.exhausted && <Self as RangeBounds<Idx>>::contains(self, item)
}

/// Returns `true` if the range contains no items.
Expand Down
0