Skip to content
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

Rollup of 17 pull requests #59466

Closed
wants to merge 63 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
36bcbc3
Add FromStr impl for NonZero types
hellow554 Feb 25, 2019
ce30d4e
replaced nonzeroparseerror with regular interror
hellow554 Feb 27, 2019
912ad68
fixed nonzero tests
hellow554 Feb 28, 2019
ad240ea
add feature flag to test
hellow554 Feb 28, 2019
7330525
fixed tests again
hellow554 Feb 28, 2019
8740d5d
Add benchmarks for [u8]::make_ascii_uppercase
SimonSapin Mar 18, 2019
ce933f7
Make u8::to_ascii_lowercase and to_ascii_uppercase branchless
SimonSapin Mar 18, 2019
fbe34cc
Add benchmark for not-quite-correct “fake SIMD” make_ascii_uppercase
SimonSapin Mar 18, 2019
e3fb6f8
Tidy
SimonSapin Mar 18, 2019
525a043
Rename src/libcore/benches/ascii_case.rs to ascii.rs
SimonSapin Mar 18, 2019
6d3840b
Add benchmarks for `u8::is_ascii*`
SimonSapin Mar 18, 2019
b4faa9b
Remove ASCII_CHARACTER_CLASS table, use `match` with range patterns i…
SimonSapin Mar 18, 2019
4a3241a
Benchmark more possibles impls of [u8]::make_ascii_uppercase
SimonSapin Mar 18, 2019
0ad91f7
Simplify u8::to_ascii_{upp,low}ercase while keeping it fast
SimonSapin Mar 18, 2019
c1ec29a
ASCII uppercase: add "subtract shifted bool" benchmark
SimonSapin Mar 19, 2019
7fad370
ASCII uppercase: add "subtract multiplied bool" benchmark
SimonSapin Mar 19, 2019
b34a71b
add suggestions to trim_{left,right} deprecations
euclio Mar 22, 2019
ac3290e
Add suggestion to use `&*var` when `&str: From<String>` is expected
estebank Mar 18, 2019
2f7b320
extend on-unimplemented docs
estebank Mar 18, 2019
e929d19
review comments
estebank Mar 23, 2019
4b38294
syntax: Remove warning for unnecessary path disambiguators
petrochenkov Jan 13, 2019
c709a10
Refactor tuple comparison tests
czipperz Mar 24, 2019
7e156c2
Make some lints incremental
Zoxc Jun 11, 2018
32bc4a5
Make more lints incremental
Zoxc Mar 3, 2019
00d8fa3
Update tests
Zoxc Mar 13, 2019
91b7423
Reject integer suffix when tuple indexing
estebank Mar 25, 2019
630d5a4
renames EvalContext to InterpretCx.
kenta7777 Mar 26, 2019
6ad77b0
review comments
estebank Mar 26, 2019
0e0383a
adjust MaybeUninit API to discussions
RalfJung Mar 18, 2019
853ae8d
fix some uses I missed
RalfJung Mar 19, 2019
4093bec
Exclude UnusedBrokenConst from module lints
Zoxc Mar 26, 2019
c7ddb83
Use `expect_no_suffix` for error
estebank Mar 26, 2019
1bb3694
Reword invalid suffixe errors
estebank Mar 26, 2019
8d1cc72
Add specific message for tuple struct invoked with suffixed numeric f…
estebank Mar 26, 2019
24a0cae
librustc_driver => 2018
taiki-e Mar 26, 2019
a365287
fix: Make incremental artifact deletion more robust
Marwes Mar 26, 2019
8733b2a
Add `Default` to `std::alloc::System`
TimDiekmann Mar 26, 2019
892f7c4
renames EvalContext to InterpretCx in docs and comments.
kenta7777 Mar 27, 2019
14f3f6c
librustc_interface => 2018
Centril Mar 26, 2019
bf1068b
librustc_interface => 2018; rename rustc-rayon to rayon in Cargo.toml
Centril Mar 27, 2019
7945eff
generalize diagnostic for x = y where type bool is expected.
Centril Mar 26, 2019
05d59fe
add test for assignment x = y where type bool is expected.
Centril Mar 26, 2019
0b9c589
adjust assignment-in-if test accordingly.
Centril Mar 26, 2019
ce1c5e0
add negative test case in assignment-expected-bool
Centril Mar 27, 2019
2368aa8
Add some tests
JohnTitor Mar 27, 2019
ba21e0b
Include id in Thread's Debug implementation
KamilaBorowska Mar 27, 2019
6a3b639
Rollup merge of #57293 - Zoxc:incr-passes3, r=michaelwoerister
Centril Mar 27, 2019
9bfc4d3
Rollup merge of #57565 - petrochenkov:turbowarn, r=Centril
Centril Mar 27, 2019
34f0297
Rollup merge of #58253 - taiki-e:librustc_driver-2018, r=petrochenkov
Centril Mar 27, 2019
44a7b9c
Rollup merge of #58717 - hellow554:nonzero_parse, r=Amanieu
Centril Mar 27, 2019
0be9d16
Rollup merge of #58837 - Centril:librustc_interface_2018, r=petrochenkov
Centril Mar 27, 2019
47083fb
Rollup merge of #59268 - estebank:from-string, r=QuietMisdreavus
Centril Mar 27, 2019
51f4fcd
Rollup merge of #59283 - SimonSapin:branchless-ascii-case, r=joshtrip…
Centril Mar 27, 2019
5562519
Rollup merge of #59284 - RalfJung:maybe-uninit, r=sfackler
Centril Mar 27, 2019
9b259c6
Rollup merge of #59372 - euclio:rename-trim, r=rkruppe
Centril Mar 27, 2019
961b86b
Rollup merge of #59393 - czipperz:refactor_tuple_comparison_tests, r=…
Centril Mar 27, 2019
d3119e4
Rollup merge of #59421 - estebank:tuple-index-suffix, r=petrochenkov
Centril Mar 27, 2019
81201e2
Rollup merge of #59430 - kenta7777:rename-evalcontext-to-interpretcx,…
Centril Mar 27, 2019
d42e5eb
Rollup merge of #59439 - Centril:generalize-assign-to-bool-diagnostic…
Centril Mar 27, 2019
a4b4253
Rollup merge of #59449 - Marwes:issue_57958, r=michaelwoerister
Centril Mar 27, 2019
d04b1ec
Rollup merge of #59451 - TimDiekmann:patch-1, r=sfackler
Centril Mar 27, 2019
d2757d0
Rollup merge of #59459 - JohnTitor:add-tests, r=Centril
Centril Mar 27, 2019
3f372a1
Rollup merge of #59460 - xfix:include-id-in-thread-debug, r=Amanieu
Centril Mar 27, 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
13 changes: 13 additions & 0 deletions src/doc/unstable-book/src/language-features/on-unimplemented.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,16 @@ error[E0277]: `&str` is not an iterator
= help: the trait `std::iter::Iterator` is not implemented for `&str`
= note: required by `std::iter::IntoIterator::into_iter`
```

If you need to filter on multiple attributes, you can use `all`, `any` or
`not` in the following way:

```rust,compile_fail
#[rustc_on_unimplemented(
on(
all(_Self="&str", T="std::string::String"),
note="you can coerce a `{T}` into a `{Self}` by writing `&*variable`"
)
)]
pub trait From<T>: Sized { /* ... */ }
```
10 changes: 5 additions & 5 deletions src/liballoc/collections/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl<K, V> LeafNode<K, V> {
keys: uninitialized_array![_; CAPACITY],
vals: uninitialized_array![_; CAPACITY],
parent: ptr::null(),
parent_idx: MaybeUninit::uninitialized(),
parent_idx: MaybeUninit::uninit(),
len: 0
}
}
Expand All @@ -129,7 +129,7 @@ unsafe impl Sync for NodeHeader<(), ()> {}
// ever take a pointer past the first key.
static EMPTY_ROOT_NODE: NodeHeader<(), ()> = NodeHeader {
parent: ptr::null(),
parent_idx: MaybeUninit::uninitialized(),
parent_idx: MaybeUninit::uninit(),
len: 0,
keys_start: [],
};
Expand Down Expand Up @@ -261,7 +261,7 @@ impl<K, V> Root<K, V> {
-> NodeRef<marker::Mut<'_>, K, V, marker::Internal> {
debug_assert!(!self.is_shared_root());
let mut new_node = Box::new(unsafe { InternalNode::new() });
new_node.edges[0].set(unsafe { BoxedNode::from_ptr(self.node.as_ptr()) });
new_node.edges[0].write(unsafe { BoxedNode::from_ptr(self.node.as_ptr()) });

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

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

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

Expand Down
Loading