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 8 pull requests #69819

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f85b0c4
Remove use of `unwrap()` from save-analysis
JohnTitor Feb 24, 2020
a211a82
Address review comment
JohnTitor Feb 24, 2020
5307edc
Tweak tests
JohnTitor Feb 24, 2020
f9db3c2
Clean up unstable book
JohnTitor Feb 28, 2020
4c9e87e
Stop generating `compiler_builtins_lib` doc
JohnTitor Feb 29, 2020
c55df37
Make `rustc_attrs` tracking issue None
JohnTitor Feb 29, 2020
2746e12
check_binding_alt_eq_ty: improve precision wrt. `if let`.
Centril Mar 1, 2020
8ea676e
Update books
ehuss Mar 2, 2020
44c97c4
Fix & test leak of some BTreeMap nodes on panic during `into_iter`
ssomers Mar 6, 2020
6548be2
'fieldless enums' is not what I meant -- it's empty/uninhabited enums…
RalfJung Mar 2, 2020
d47196b
miri value visitor: detect primitives by type, not layout
RalfJung Mar 2, 2020
aa1435b
const validation ub tests: use transmute instead of unions
RalfJung Mar 2, 2020
4807e93
test that we validate boxes
RalfJung Mar 2, 2020
f481547
test some more kinds of enums with uninhabited variants
RalfJung Mar 2, 2020
4584e75
better error messages for invalid boxes (and a few more tests)
RalfJung Mar 2, 2020
f0586f9
please tidy
RalfJung Mar 2, 2020
58f8cc2
rename visit_primitive -> try_visit_primitive, and comments
RalfJung Mar 2, 2020
295c2d6
bug on ty::GeneratorWitness
RalfJung Mar 2, 2020
1915bf1
resolve: `ImportDirective` -> `Import`
petrochenkov Mar 7, 2020
66d7a88
resolve: `directive` -> `import`
petrochenkov Mar 7, 2020
2e88bec
test(bindings_after_at): add dynamic drop tests for bindings_after_at
thekuom Mar 7, 2020
60c38ee
Rollup merge of #69422 - JohnTitor:remove-unwrap, r=Xanewok
Centril Mar 8, 2020
12920f4
Rollup merge of #69561 - JohnTitor:clean-up-unstable-book, r=Mark-Sim…
Centril Mar 8, 2020
7920d7b
Rollup merge of #69599 - Centril:typeck-tweak-wording, r=davidtwco
Centril Mar 8, 2020
1c5b0e2
Rollup merge of #69641 - ehuss:update-books, r=ehuss
Centril Mar 8, 2020
aa8aeaa
Rollup merge of #69646 - RalfJung:layout-visitor, r=eddyb
Centril Mar 8, 2020
958e8b7
Rollup merge of #69776 - ssomers:fix69769, r=Mark-Simulacrum
Centril Mar 8, 2020
36025b3
Rollup merge of #69805 - petrochenkov:importname, r=Centril
Centril Mar 8, 2020
72ad36f
Rollup merge of #69810 - thekuom:test/67523-dynamic-semantics-binding…
Centril Mar 8, 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
2 changes: 1 addition & 1 deletion src/doc/embedded-book
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The tracking issue for this feature is: [#49147]

[#44109]: https://github.com/rust-lang/rust/issues/49147
[#49147]: https://github.com/rust-lang/rust/issues/49147

------------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# `impl_trait_in_bindings`

The tracking issue for this feature is: [#34511]
The tracking issue for this feature is: [#63065]

[#34511]: https://github.com/rust-lang/rust/issues/34511
[#63065]: https://github.com/rust-lang/rust/issues/63065

------------------------

Expand Down
5 changes: 5 additions & 0 deletions src/doc/unstable-book/src/language-features/link-cfg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# `link_cfg`

This feature is internal to the Rust compiler and is not intended for general use.

------------------------
2 changes: 1 addition & 1 deletion src/doc/unstable-book/src/language-features/trait-alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The tracking issue for this feature is: [#41517]

[#41417]: https://github.com/rust-lang/rust/issues/41517
[#41517]: https://github.com/rust-lang/rust/issues/41517

------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The tracking issue for this feature is [#60405]

[60405]: https://github.com/rust-lang/rust/issues/60405
[#60405]: https://github.com/rust-lang/rust/issues/60405

----

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# `tidy_test_never_used_anywhere_else`

This feature is internal to the Rust compiler and is not intended for general use.

------------------------
11 changes: 10 additions & 1 deletion src/liballoc/collections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,14 @@ impl<K, V> Drop for IntoIter<K, V> {
// Continue the same loop we perform below. This only runs when unwinding, so we
// don't have to care about panics this time (they'll abort).
while let Some(_) = self.0.next() {}

// No need to avoid the shared root, because the tree was definitely not empty.
unsafe {
let mut node = ptr::read(&self.0.front).into_node().forget_type();
while let Some(parent) = node.deallocate_and_ascend() {
node = parent.into_node().forget_type();
}
}
}
}

Expand All @@ -1491,7 +1499,8 @@ impl<K, V> Drop for IntoIter<K, V> {
if node.is_shared_root() {
return;
}

// Most of the nodes have been deallocated while traversing
// but one pile from a leaf up to the root is left standing.
while let Some(parent) = node.deallocate_and_ascend() {
node = parent.into_node().forget_type();
}
Expand Down
26 changes: 25 additions & 1 deletion src/liballoc/tests/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ fn test_split_off_large_random_sorted() {
}

#[test]
fn test_into_iter_drop_leak() {
fn test_into_iter_drop_leak_1() {
static DROPS: AtomicU32 = AtomicU32::new(0);

struct D;
Expand All @@ -1045,3 +1045,27 @@ fn test_into_iter_drop_leak() {

assert_eq!(DROPS.load(Ordering::SeqCst), 5);
}

#[test]
fn test_into_iter_drop_leak_2() {
let size = 12; // to obtain tree with 2 levels (having edges to leaf nodes)
static DROPS: AtomicU32 = AtomicU32::new(0);
static PANIC_POINT: AtomicU32 = AtomicU32::new(0);

struct D;
impl Drop for D {
fn drop(&mut self) {
if DROPS.fetch_add(1, Ordering::SeqCst) == PANIC_POINT.load(Ordering::SeqCst) {
panic!("panic in `drop`");
}
}
}

for panic_point in vec![0, 1, size - 2, size - 1] {
DROPS.store(0, Ordering::SeqCst);
PANIC_POINT.store(panic_point, Ordering::SeqCst);
let map: BTreeMap<_, _> = (0..size).map(|i| (i, D)).collect();
catch_unwind(move || drop(map.into_iter())).ok();
assert_eq!(DROPS.load(Ordering::SeqCst), size);
}
}
6 changes: 3 additions & 3 deletions src/librustc_feature/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ declare_features! (

// no-tracking-issue-start

/// Allows using `rustc_*` attributes (RFC 572).
(active, rustc_attrs, "1.0.0", None, None),

/// Allows using compiler's own crates.
(active, rustc_private, "1.0.0", Some(27812), None),

Expand Down Expand Up @@ -128,9 +131,6 @@ declare_features! (
/// Allows using `#[link_name="llvm.*"]`.
(active, link_llvm_intrinsics, "1.0.0", Some(29602), None),

/// Allows using `rustc_*` attributes (RFC 572).
(active, rustc_attrs, "1.0.0", Some(29642), None),

/// Allows using the `box $expr` syntax.
(active, box_syntax, "1.0.0", Some(49733), None),

Expand Down
Loading