Skip to content

Commit d20e000

Browse files
committed
Auto merge of #59471 - cuviper:rollup, r=cuviper
Rollup of 18 pull requests Successful merges: - #57293 (Make some lints incremental) - #57565 (syntax: Remove warning for unnecessary path disambiguators) - #58253 (librustc_driver => 2018) - #58837 (librustc_interface => 2018) - #59268 (Add suggestion to use `&*var` when `&str: From<String>` is expected) - #59283 (Make ASCII case conversions more than 4× faster) - #59284 (adjust MaybeUninit API to discussions) - #59372 (add rustfix-able suggestions to trim_{left,right} deprecations) - #59390 (Make `ptr::eq` documentation mention fat-pointer behavior) - #59393 (Refactor tuple comparison tests) - #59420 ([CI] record docker image info for reuse) - #59421 (Reject integer suffix when tuple indexing) - #59430 (Renames `EvalContext` to `InterpretCx`) - #59439 (Generalize diagnostic for `x = y` where `bool` is the expected type) - #59449 (fix: Make incremental artifact deletion more robust) - #59451 (Add `Default` to `std::alloc::System`) - #59459 (Add some tests) - #59460 (Include id in Thread's Debug implementation) Failed merges: r? @ghost
2 parents 33ef0ba + a2c4562 commit d20e000

File tree

84 files changed

+1470
-694
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1470
-694
lines changed

src/ci/docker/run.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ ci_dir="`dirname $docker_dir`"
1212
src_dir="`dirname $ci_dir`"
1313
root_dir="`dirname $src_dir`"
1414

15+
objdir=$root_dir/obj
16+
dist=$objdir/build/dist
17+
1518
source "$ci_dir/shared.sh"
1619

1720
travis_fold start build_docker
@@ -77,6 +80,11 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
7780
else
7881
echo "Looks like docker image is the same as before, not uploading"
7982
fi
83+
# Record the container image for reuse, e.g. by rustup.rs builds
84+
info="$dist/image-$image.txt"
85+
mkdir -p "$dist"
86+
echo "$url" >"$info"
87+
echo "$digest" >>"$info"
8088
fi
8189
elif [ -f "$docker_dir/disabled/$image/Dockerfile" ]; then
8290
if [ -n "$TRAVIS_OS_NAME" ]; then
@@ -99,8 +107,6 @@ fi
99107
travis_fold end build_docker
100108
travis_time_finish
101109

102-
objdir=$root_dir/obj
103-
104110
mkdir -p $HOME/.cargo
105111
mkdir -p $objdir/tmp
106112
mkdir -p $objdir/cores

src/doc/unstable-book/src/language-features/on-unimplemented.md

+13
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,16 @@ error[E0277]: `&str` is not an iterator
138138
= help: the trait `std::iter::Iterator` is not implemented for `&str`
139139
= note: required by `std::iter::IntoIterator::into_iter`
140140
```
141+
142+
If you need to filter on multiple attributes, you can use `all`, `any` or
143+
`not` in the following way:
144+
145+
```rust,compile_fail
146+
#[rustc_on_unimplemented(
147+
on(
148+
all(_Self="&str", T="std::string::String"),
149+
note="you can coerce a `{T}` into a `{Self}` by writing `&*variable`"
150+
)
151+
)]
152+
pub trait From<T>: Sized { /* ... */ }
153+
```

src/liballoc/collections/btree/node.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl<K, V> LeafNode<K, V> {
109109
keys: uninitialized_array![_; CAPACITY],
110110
vals: uninitialized_array![_; CAPACITY],
111111
parent: ptr::null(),
112-
parent_idx: MaybeUninit::uninitialized(),
112+
parent_idx: MaybeUninit::uninit(),
113113
len: 0
114114
}
115115
}
@@ -129,7 +129,7 @@ unsafe impl Sync for NodeHeader<(), ()> {}
129129
// ever take a pointer past the first key.
130130
static EMPTY_ROOT_NODE: NodeHeader<(), ()> = NodeHeader {
131131
parent: ptr::null(),
132-
parent_idx: MaybeUninit::uninitialized(),
132+
parent_idx: MaybeUninit::uninit(),
133133
len: 0,
134134
keys_start: [],
135135
};
@@ -261,7 +261,7 @@ impl<K, V> Root<K, V> {
261261
-> NodeRef<marker::Mut<'_>, K, V, marker::Internal> {
262262
debug_assert!(!self.is_shared_root());
263263
let mut new_node = Box::new(unsafe { InternalNode::new() });
264-
new_node.edges[0].set(unsafe { BoxedNode::from_ptr(self.node.as_ptr()) });
264+
new_node.edges[0].write(unsafe { BoxedNode::from_ptr(self.node.as_ptr()) });
265265

266266
self.node = BoxedNode::from_internal(new_node);
267267
self.height += 1;
@@ -737,7 +737,7 @@ impl<'a, K, V> NodeRef<marker::Mut<'a>, K, V, marker::Internal> {
737737
unsafe {
738738
ptr::write(self.keys_mut().get_unchecked_mut(idx), key);
739739
ptr::write(self.vals_mut().get_unchecked_mut(idx), val);
740-
self.as_internal_mut().edges.get_unchecked_mut(idx + 1).set(edge.node);
740+
self.as_internal_mut().edges.get_unchecked_mut(idx + 1).write(edge.node);
741741

742742
(*self.as_leaf_mut()).len += 1;
743743

@@ -1080,7 +1080,7 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
10801080
let mut child = self.descend();
10811081
unsafe {
10821082
(*child.as_leaf_mut()).parent = ptr;
1083-
(*child.as_leaf_mut()).parent_idx.set(idx);
1083+
(*child.as_leaf_mut()).parent_idx.write(idx);
10841084
}
10851085
}
10861086

0 commit comments

Comments
 (0)