Skip to content

change offset from u32 to u64 #74848

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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
bb0424d
Update dependencies
Mark-Simulacrum Aug 17, 2020
10f4aa5
Update license check post-cargo update
Mark-Simulacrum Aug 17, 2020
4f2d8f3
Resolve licensing by updating tinyvec 0.3.3 -> 0.3.4
workingjubilee Aug 17, 2020
f9b8005
Downgrade version_check 0.9.2 -> 0.9.1
workingjubilee Aug 18, 2020
4400c8f
Fix asm compiler flags change from cmake 0.1.44
tmiasko Aug 18, 2020
23c3459
Don't panic in Vec::shrink_to_fit
cuviper Aug 18, 2020
0fa8af9
See also X-Link mem::{swap, take, replace}
Havvy Aug 2, 2020
28660fc
docs(marker/copy): clarify that `&T` is also `Copy`
janriemer Aug 2, 2020
06092d4
docs(marker/copy): provide example for `&T` being `Copy`
janriemer Aug 16, 2020
8c7b1f6
rephrase: struct -> type
janriemer Aug 16, 2020
b9354c1
add back emojis that have been removed accidentally
janriemer Aug 16, 2020
0bb35ff
add empty line above code block
janriemer Aug 16, 2020
594c6b0
docs: add `derive` for struct
janriemer Aug 16, 2020
f6f733c
docs: add another `derive` for `Copy`able struct
Aug 18, 2020
dd6ff5f
Fix documentation error
jack-champagne Aug 13, 2020
2250b11
Add test demonstrating the issue.
jumbatm Aug 15, 2020
ae14024
Fix stack overflow for recursive types.
jumbatm Aug 15, 2020
94f294e
Actually introduce a cycle in Reffy test.
jumbatm Aug 16, 2020
c3075e0
Remove unnecessary rebinding of def ids.
jumbatm Aug 16, 2020
996667d
Remove structural equiv check for Array const.
jumbatm Aug 16, 2020
5ae1b0f
Reduce indentation by replacing match arm w/ early return.
jumbatm Aug 16, 2020
ea4014b
Don't memoize seen types.
jumbatm Aug 16, 2020
a552b02
Avoid double hashset lookup.
jumbatm Aug 16, 2020
2ee3426
Also accept Refs for is_primitive_or_pointer
jumbatm Aug 16, 2020
5e21ac2
Wrap recursion in `ensure_sufficient_stack`.
jumbatm Aug 17, 2020
9930c8b
Move to intra doc links for keyword documentation
poliorcetics Aug 17, 2020
10dbfab
Resolve true and false as booleans
jyn514 Aug 17, 2020
0cd951c
Don't emit "is not a logical operator" error outside of associative e…
tgnottingham Aug 18, 2020
cf1ec81
Add doc examples count for --show-coverage
GuillaumeGomez Aug 18, 2020
a7ee17e
Update rustdoc-ui tests
GuillaumeGomez Aug 18, 2020
10ed330
Switch to intra-doc links in /src/sys/unix/ext/*.rs
nixphix Aug 18, 2020
6e1d6b8
resolve comments
nixphix Aug 19, 2020
688e4ec
Improve `align_offset` at opt-level <= 1
nagisa Aug 16, 2020
07f70cd
Improve codegen of align_offset when stride == 1
nagisa Aug 16, 2020
c4cc5f7
Add checks for doc alias on which item it's used
GuillaumeGomez Jul 6, 2020
d598d12
Add more tests for doc alias
GuillaumeGomez Jul 6, 2020
e700c5c
Add doc(alias) attribute checks for associated consts and associated …
GuillaumeGomez Jul 23, 2020
6a326a4
Remove invalid #[doc(alias)] from doc-alias search-index test
GuillaumeGomez Jul 23, 2020
917ef1e
Put back attributes check pass in rustdoc
GuillaumeGomez Aug 1, 2020
f974efc
Move #[doc(alias)] attribute checks in rustc
GuillaumeGomez Aug 1, 2020
b7d1e33
Allow #[doc(alias)] on impl const items
GuillaumeGomez Aug 11, 2020
a12256c
BTreeMap: check some invariants, avoid recursion in depth first search
ssomers Aug 18, 2020
bbcd1ec
move const param structural match checks to wfcheck
lcnr Aug 2, 2020
1ca044d
run wfcheck in parralel again, add test for 74950
lcnr Aug 13, 2020
6efe727
change const param ty warning message
lcnr Aug 18, 2020
d55dff7
mir building: fix some comments
RalfJung Aug 16, 2020
2d78f14
Adjust installation place for compiler docs
Mark-Simulacrum Aug 16, 2020
d675575
Make OnceCell<T> transparent to dropck
matklad Aug 17, 2020
49d075e
Refactor `impl_for_type` into a separate function
jyn514 Aug 17, 2020
a458938
Say `tcx.lang_items()` less
jyn514 Aug 17, 2020
526f571
Return all impls, not just the primary one
jyn514 Aug 17, 2020
13133be
impl_for_type -> PrimitiveType::impls
jyn514 Aug 17, 2020
6516ef5
Allow reusing the code in `collect_trait_impls`
jyn514 Aug 17, 2020
0d44f6e
Use `impls` for intra doc links as well
jyn514 Aug 17, 2020
ab4c87c
xpy fmt
jyn514 Aug 17, 2020
fcc2f50
Add a test
jyn514 Aug 17, 2020
1ded165
Add test for f32 and f64 methods
jyn514 Aug 19, 2020
277d327
Move to intra doc links for std::io
poliorcetics Aug 18, 2020
6b70a41
Fix nits in intra-doc links for std io
poliorcetics Aug 19, 2020
9c78a1f
Remove `#[cfg(miri)]` from OnceCell tests
matklad Aug 19, 2020
1fc75d1
Add tagged pointer impl to data structures
Mark-Simulacrum Aug 15, 2020
dba162a
Use CopyTaggedPtr for ParamEnv
Mark-Simulacrum Aug 16, 2020
71e0978
change offset from u32 to u64
Dylan-DPC Apr 29, 2020
ce316ea
just a rebase, things will still fail
Dylan-DPC Jul 27, 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
1,134 changes: 596 additions & 538 deletions Cargo.lock

Large diffs are not rendered by default.

35 changes: 3 additions & 32 deletions library/alloc/src/collections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1236,10 +1236,10 @@ impl<K: Ord, V> BTreeMap<K, V> {
right_root.fix_left_border();

if left_root.height() < right_root.height() {
self.recalc_length();
self.length = left_root.node_as_ref().calc_length();
right.length = total_num - self.len();
} else {
right.recalc_length();
right.length = right_root.node_as_ref().calc_length();
self.length = total_num - right.len();
}

Expand Down Expand Up @@ -1283,42 +1283,13 @@ impl<K: Ord, V> BTreeMap<K, V> {
{
DrainFilter { pred, inner: self.drain_filter_inner() }
}

pub(super) fn drain_filter_inner(&mut self) -> DrainFilterInner<'_, K, V> {
let root_node = self.root.as_mut().map(|r| r.node_as_mut());
let front = root_node.map(|rn| rn.first_leaf_edge());
DrainFilterInner { length: &mut self.length, cur_leaf_edge: front }
}

/// Calculates the number of elements if it is incorrect.
fn recalc_length(&mut self) {
fn dfs<'a, K, V>(node: NodeRef<marker::Immut<'a>, K, V, marker::LeafOrInternal>) -> usize
where
K: 'a,
V: 'a,
{
let mut res = node.len();

if let Internal(node) = node.force() {
let mut edge = node.first_edge();
loop {
res += dfs(edge.reborrow().descend());
match edge.right_kv() {
Ok(right_kv) => {
edge = right_kv.right_edge();
}
Err(_) => {
break;
}
}
}
}

res
}

self.length = dfs(self.root.as_ref().unwrap().node_as_ref());
}

/// Creates a consuming iterator visiting all the keys, in sorted order.
/// The map cannot be used after calling this.
/// The iterator element type is `K`.
Expand Down
Loading