Skip to content

Add support for PowerPC64 on FreeBSD #57615

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 36 commits into from
Jan 15, 2019
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f9f71cc
Fix poor worst case performance of set intersection (and union, somew…
ssomers Dec 21, 2018
ccba43d
Merge remote-tracking branch 'upstream/master'
ssomers Jan 9, 2019
60d1db6
Clean up and fix a bug in query plumbing
Zoxc Jan 9, 2019
8823bf0
Fix poor worst case performance of is_disjoint
ssomers Jan 9, 2019
565c39d
provide suggestion for invalid boolean cast
euclio Jan 9, 2019
cef2e2f
Merge remote-tracking branch 'upstream/master'
ssomers Jan 10, 2019
5c67ba6
Continue parser after trailing type argument attribute
estebank Jan 12, 2019
fc4b541
Continue parsing after lifetime in incorrect location
estebank Jan 12, 2019
d8610b3
Continue evaluating after parsing incorrect binary literal
estebank Jan 12, 2019
5d2f31c
Continue evaluating after missing `for` in `impl Trait for Foo`
estebank Jan 12, 2019
57f17e9
Continue evaluating after type argument in where clause
estebank Jan 12, 2019
65a8d7b
fix tests
estebank Jan 12, 2019
8bede50
Continue evaluating after incorrect float literal
estebank Jan 12, 2019
975f8b5
fix test
estebank Jan 12, 2019
8119017
Continue evaluating after finding incorrect .. in pattern
estebank Jan 12, 2019
de3c4be
Tweak type argument after assoc type error
estebank Jan 12, 2019
7feb802
Small tweaks to parser errors
estebank Jan 12, 2019
3ead6de
Tweak incorrect discriminator value variant error
estebank Jan 12, 2019
1550787
Add label for invalid literal suffix
estebank Jan 12, 2019
db74031
Remove unrelated errors from parse stderr tests
estebank Jan 13, 2019
28ea03e
Suggest correct location for lifetime parameters in use
estebank Jan 13, 2019
c4f6ef2
remove extern_in_paths.
Centril Jan 13, 2019
fb60400
Querify local proc_macro_decls_static
Xanewok Jan 12, 2019
59d7d7d
Querify local plugin_registrar_fn
Xanewok Jan 13, 2019
707a9a0
Retain original pass order
Xanewok Jan 13, 2019
3874c77
Recover from item trailing semicolon
estebank Jan 14, 2019
1fd971c
Add a debug_assert to Vec::set_len
scottmcm Dec 15, 2018
5bc95de
Rollup merge of #57043 - ssomers:master, r=alexcrichton
Centril Jan 14, 2019
8c001b1
Rollup merge of #57480 - Zoxc:query-fix, r=michaelwoerister
Centril Jan 14, 2019
816e31b
Rollup merge of #57481 - euclio:bool-cast-suggestion, r=estebank
Centril Jan 14, 2019
2f7a226
Rollup merge of #57540 - estebank:eval-more, r=petrochenkov
Centril Jan 14, 2019
2e10944
Rollup merge of #57570 - Xanewok:querify-some, r=Zoxc
Centril Jan 14, 2019
feb48f3
Rollup merge of #57572 - Centril:unaccept-extern-in-path, r=petrochenkov
Centril Jan 14, 2019
b03d414
Rollup merge of #57585 - estebank:trailing-semicolon, r=petrochenkov
Centril Jan 14, 2019
8a62e39
Rollup merge of #57589 - scottmcm:vec-set_len-debug_assert, r=alexcri…
Centril Jan 14, 2019
aea9f0a
Auto merge of #57607 - Centril:rollup, r=Centril
bors Jan 14, 2019
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
Fix poor worst case performance of is_disjoint
  • Loading branch information
ssomers committed Jan 9, 2019
commit 8823bf0b403b0ebf348e1f3fa59d74f2843f0c8b
7 changes: 5 additions & 2 deletions src/libstd/collections/hash/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,11 @@ impl<T, S> HashSet<T, S>
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub fn is_disjoint(&self, other: &HashSet<T, S>) -> bool {
self.iter().all(|v| !other.contains(v))
if self.len() <= other.len() {
self.iter().all(|v| !other.contains(v))
} else {
other.iter().all(|v| !self.contains(v))
}
}

/// Returns `true` if the set is a subset of another,
Expand Down Expand Up @@ -1510,7 +1514,6 @@ mod test_set {
let mut a = HashSet::new();
let mut b = HashSet::new();
assert!(a.intersection(&b).next().is_none());
assert!(b.intersection(&a).next().is_none());

assert!(a.insert(11));
assert!(a.insert(1));
Expand Down