profile
viewpoint
Stein Somers ssomers Gent, Belgium https://stackoverflow.com/users/story/106275 Software engineer & cyclist

ssomers/arduino_RF433_chacon 0

Arduino sketch to decode the RF signals from a Chacon transmitter

ssomers/Bron-Kerbosch 0

Performance comparison of many Bron–Kerbosch algorithm implementations that find all maximal cliques in a graph.

ssomers/cargo-benchcmp 0

A small utility to compare Rust micro-benchmarks.

ssomers/FiiO-X3II 0

Scripts to tame the FiiO X3II Digital Audio Player from Windows

ssomers/go 0

Reusable functions for the Go programming language

ssomers/micronucleus 0

ATTiny usb bootloader with a strong emphasis on bootloader compactness.

ssomers/miri 0

An interpreter for Rust's mid-level intermediate representation

ssomers/polymorphic_value 0

A polymorphic value-type for C++

ssomers/rust 0

Empowering everyone to build reliable and efficient software.

create barnchssomers/rust

branch : btree_drain_filter_size_hint

created branch time in 2 days

PR opened rust-lang/rust

BTreeMap: more refactoring around edges

Alternatives to #77025.

r? @Mark-Simulacrum

+45 -51

0 comment

1 changed file

pr created time in 3 days

create barnchssomers/rust

branch : btree_love_the_leaf_edge

created branch time in 3 days

pull request commentrust-lang/rust

BTreeMap: consider leaf nodes to have empty edges

Or very concretely, if you try to treat edges in the split of internal nodes just like leafy_split treats the other arrays:

            ptr::copy_nonoverlapping(
                self.node.edge_at(self.idx + 1),
                MaybeUninit::slice_as_mut_ptr(&mut new_node.edges),
                new_len + 1,
            );

you end up realizing that the debug_assert in edge_at fails because length was already reduced. And it's not trivial to find out because any assert causes panic in drops, without a trace of the original problem in the stack. But that's another issue.

ssomers

comment created time in 3 days

push eventssomers/rust

Stein Somers

commit sha 3e485d7cf59dafbc37467c3ef1acc51f26b381d9

BTreeMap: keep an eye out on the size of the main components

view details

push time in 3 days

delete branch ssomers/rust

delete branch : btree_cleanup_3

delete time in 3 days

push eventssomers/rust

Stein Somers

commit sha 646f0ad5cf2f60c220d718bf8a9af300160bfb44

BTreeMap: keep an eye out on the size of the main components

view details

push time in 3 days

pull request commentrust-lang/rust

BTreeMap: consider leaf nodes to have empty edges

The motivation is in this PR's description. The first point can be covered by adapting comments, the second point is somewhat addressed by the leafy_ methods, but they complicated matters too because the length is adjusted before the edges are treated. I think the methods look better here, but the type overhead here is more than I hoped.

ssomers

comment created time in 3 days

Pull request review commentrust-lang/rust

BTreeMap: keep an eye out on the size of the main components

 fn test_splitpoint() {         assert!(left_len + right_len == CAPACITY);     } }++#[test]+fn test_sizes() {+    #[cfg(all(any(target_os = "windows", target_os = "unix"), target_pointer_width = "32"))]

Yeah, that seems wiser. I actually wandered what the effect is of the two u16 fields in LeafNode that are combined - if it helps to give them each 32 bits on 64 bit platforms. But testing that doesn't have to remain in there.

ssomers

comment created time in 3 days

PullRequestReviewEvent

PR opened rust-lang/rust

BTreeMap: keep an eye out on the size of the main components

Limited to the platforms I know my way around.

r? @Mark-Simulacrum

+14 -0

0 comment

1 changed file

pr created time in 3 days

create barnchssomers/rust

branch : btree_size_matters

created branch time in 4 days

push eventssomers/rust

Stein Somers

commit sha 553d1291b20e71dfe520bc82891595a6156de1e1

BTreeMap: consider leaf nodes to have empty edges

view details

push time in 4 days

Pull request review commentrust-lang/rust

BTreeMap: consider leaf nodes to have empty edges

 struct LeafNode<K, V> {     vals: [MaybeUninit<V>; CAPACITY], } -impl<K, V> LeafNode<K, V> {-    /// Creates a new `LeafNode`. Unsafe because all nodes should really be hidden behind-    /// `BoxedNode`, preventing accidental dropping of uninitialized keys and values.-    unsafe fn new() -> Self {-        LeafNode {-            // As a general policy, we leave fields uninitialized if they can be, as this should-            // be both slightly faster and easier to track in Valgrind.-            keys: MaybeUninit::uninit_array(),-            vals: MaybeUninit::uninit_array(),-            parent: None,-            parent_idx: MaybeUninit::uninit(),-            len: 0,-        }-    }-}--/// The underlying representation of internal nodes. As with `LeafNode`s, these should be hidden-/// behind `BoxedNode`s to prevent dropping uninitialized keys and values. Any pointer to an-/// `InternalNode` can be directly casted to a pointer to the underlying `LeafNode` portion of the-/// node, allowing code to act on leaf and internal nodes generically without having to even check+/// The actual representation of leaf or internal nodes. These should be hidden behind+/// `BoxedNode`s to prevent dropping uninitialized keys and values. Any pointer to a+/// `UniversalNode` can be directly casted to or from a pointer to its `LeafData`,+/// allowing code to act on leaf and internal nodes generically without having to even check /// which of the two a pointer is pointing at. This property is enabled by the use of `repr(C)`. #[repr(C)]-// gdb_providers.py uses this type name for introspection.-struct InternalNode<K, V> {+pub struct UniversalNode<K, V, E> {     // gdb_providers.py uses this field name for introspection.-    data: LeafNode<K, V>,+    leaf: LeafNode<K, V>, -    /// The pointers to the children of this node. `len + 1` of these are considered+    /// The contents of the edges delimiting each key/value pair.+    /// For leaf nodes, these are empty. For internal nodes, these are+    /// pointers to the children of this node. `len + 1` of these are considered     /// initialized and valid. Although during the process of `into_iter` or `drop`,     /// some pointers are dangling while others still need to be traversed.-    edges: [MaybeUninit<BoxedNode<K, V>>; 2 * B],+    edges: [MaybeUninit<E>; 2 * B], } -impl<K, V> InternalNode<K, V> {-    /// Creates a new `InternalNode`.+type Node<K, V, Type> = UniversalNode<K, V, <Type as NodeTypeTrait<K, V>>::E>;++impl<K, V, E> UniversalNode<K, V, E> {+    /// Creates a new `Node`. Unsafe because all nodes should really be hidden behind+    /// `BoxedNode`, preventing accidental dropping of uninitialized keys and values.+    unsafe fn new() -> Box<Self> {+        box Self {+            leaf: LeafNode {+                // As a general policy, we leave fields uninitialized if they can be, as this should+                // be both slightly faster and easier to track in Valgrind.+                keys: MaybeUninit::uninit_array(),+                vals: MaybeUninit::uninit_array(),+                parent: None,+                parent_idx: MaybeUninit::uninit(),+                len: 0,+            },+            edges: MaybeUninit::uninit_array(),+        }+    }+}++impl<K, V> Node<K, V, marker::Internal> {+    /// Fixes the parent pointer and index in some of the child nodes. This is useful+    /// when the ordering of edges has been changed, such as in the various `insert` methods.     ///-    /// This is unsafe for two reasons. First, it returns an `InternalNode` by value, risking-    /// dropping of uninitialized fields. Second, an invariant of internal nodes is that `len + 1`-    /// edges are initialized and valid, meaning that even when the node is empty (having a-    /// `len` of 0), there must be one initialized and valid edge. This function does not set up-    /// such an edge.-    unsafe fn new() -> Self {-        InternalNode { data: unsafe { LeafNode::new() }, edges: MaybeUninit::uninit_array() }+    /// # Safety+    /// Every item returned by `range` is a valid edge index for the node.+    unsafe fn correct_childrens_parent_links<R: Iterator<Item = usize>>(&mut self, idx_range: R) {+        let ptr = NonNull::new(self);+        for idx in idx_range {+            let child = unsafe { self.edges.get_unchecked_mut(idx).assume_init_mut().ptr.as_mut() };+            child.parent = ptr;+            child.parent_idx = MaybeUninit::new(idx as u16);+        }+    }+}++pub trait NodeTypeTrait<K, V>+where+    Self: Sized,+{+    type E;++    /// Wrapper for the `correct_childrens_parent_links` method on internal nodes,+    /// doing nothing on leaf nodes.+    ///+    /// # Safety+    /// Every item returned by `range` is a valid edge index for the node.+    unsafe fn correct_childrens_parent_links<R: Iterator<Item = usize>>(+        _node: &mut Node<K, V, Self>,+        _idx_range: R,+    ) {+    }+}++impl<K, V> NodeTypeTrait<K, V> for marker::Leaf {+    type E = ();+}++impl<K, V> NodeTypeTrait<K, V> for marker::Internal {+    type E = BoxedNode<K, V>;++    unsafe fn correct_childrens_parent_links<R: Iterator<Item = usize>>(+        node: &mut Node<K, V, Self>,+        idx_range: R,+    ) {+        unsafe { node.correct_childrens_parent_links(idx_range) }     } } -/// A managed, non-null pointer to a node. This is either an owned pointer to-/// `LeafNode<K, V>` or an owned pointer to `InternalNode<K, V>`.+// This acts as a type alias that is externally visible,+// allowing gdb_providers.py to introspect.+#[repr(transparent)]+struct InternalNode<K, V> {+    // gdb_providers.py uses this field name for introspection.+    _wraps: Node<K, V, marker::Internal>,+}++/// A managed, non-null pointer to a leaf or internal `Node`. /// /// However, `BoxedNode` contains no information as to which of the two types /// of nodes it actually contains, and, partially due to this lack of information, /// has no destructor.-struct BoxedNode<K, V> {+pub struct BoxedNode<K, V> {     ptr: Unique<LeafNode<K, V>>, }  impl<K, V> BoxedNode<K, V> {-    fn from_leaf(node: Box<LeafNode<K, V>>) -> Self {-        BoxedNode { ptr: Box::into_unique(node) }-    }--    fn from_internal(node: Box<InternalNode<K, V>>) -> Self {+    fn from_new<Type>(node: Box<Node<K, V, Type>>) -> BoxedNode<K, V>+    where+        Type: NodeTypeTrait<K, V>,+    {         BoxedNode { ptr: Box::into_unique(node).cast() }

That was caused by another stupid mistake.

ssomers

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentrust-lang/rust

BTreeMap: consider leaf nodes to have empty edges

 struct LeafNode<K, V> {     vals: [MaybeUninit<V>; CAPACITY], } -impl<K, V> LeafNode<K, V> {-    /// Creates a new `LeafNode`. Unsafe because all nodes should really be hidden behind-    /// `BoxedNode`, preventing accidental dropping of uninitialized keys and values.-    unsafe fn new() -> Self {-        LeafNode {-            // As a general policy, we leave fields uninitialized if they can be, as this should-            // be both slightly faster and easier to track in Valgrind.-            keys: MaybeUninit::uninit_array(),-            vals: MaybeUninit::uninit_array(),-            parent: None,-            parent_idx: MaybeUninit::uninit(),-            len: 0,-        }-    }-}--/// The underlying representation of internal nodes. As with `LeafNode`s, these should be hidden-/// behind `BoxedNode`s to prevent dropping uninitialized keys and values. Any pointer to an-/// `InternalNode` can be directly casted to a pointer to the underlying `LeafNode` portion of the-/// node, allowing code to act on leaf and internal nodes generically without having to even check+/// The actual representation of leaf or internal nodes. These should be hidden behind+/// `BoxedNode`s to prevent dropping uninitialized keys and values. Any pointer to a+/// `UniversalNode` can be directly casted to or from a pointer to its `LeafData`,+/// allowing code to act on leaf and internal nodes generically without having to even check /// which of the two a pointer is pointing at. This property is enabled by the use of `repr(C)`. #[repr(C)]-// gdb_providers.py uses this type name for introspection.-struct InternalNode<K, V> {+pub struct UniversalNode<K, V, E> {     // gdb_providers.py uses this field name for introspection.-    data: LeafNode<K, V>,+    leaf: LeafNode<K, V>, -    /// The pointers to the children of this node. `len + 1` of these are considered+    /// The contents of the edges delimiting each key/value pair.+    /// For leaf nodes, these are empty. For internal nodes, these are+    /// pointers to the children of this node. `len + 1` of these are considered     /// initialized and valid. Although during the process of `into_iter` or `drop`,     /// some pointers are dangling while others still need to be traversed.-    edges: [MaybeUninit<BoxedNode<K, V>>; 2 * B],+    edges: [MaybeUninit<E>; 2 * B], } -impl<K, V> InternalNode<K, V> {-    /// Creates a new `InternalNode`.+type Node<K, V, Type> = UniversalNode<K, V, <Type as NodeTypeTrait<K, V>>::E>;++impl<K, V, E> UniversalNode<K, V, E> {+    /// Creates a new `Node`. Unsafe because all nodes should really be hidden behind+    /// `BoxedNode`, preventing accidental dropping of uninitialized keys and values.+    unsafe fn new() -> Box<Self> {

I think the unsafe (that I transplanted from LeafNode::new) is silly. The function does nothing unsafe. The value returned does not own any keys or values yet. I'm pretty sure that after wrapping it in BoxedNode, you could still wreak havoc without invoking any unsafe function.

ssomers

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentrust-lang/rust

BTreeMap: consider leaf nodes to have empty edges

 struct LeafNode<K, V> {     vals: [MaybeUninit<V>; CAPACITY], } -impl<K, V> LeafNode<K, V> {-    /// Creates a new `LeafNode`. Unsafe because all nodes should really be hidden behind-    /// `BoxedNode`, preventing accidental dropping of uninitialized keys and values.-    unsafe fn new() -> Self {-        LeafNode {-            // As a general policy, we leave fields uninitialized if they can be, as this should-            // be both slightly faster and easier to track in Valgrind.-            keys: MaybeUninit::uninit_array(),-            vals: MaybeUninit::uninit_array(),-            parent: None,-            parent_idx: MaybeUninit::uninit(),-            len: 0,-        }-    }-}--/// The underlying representation of internal nodes. As with `LeafNode`s, these should be hidden-/// behind `BoxedNode`s to prevent dropping uninitialized keys and values. Any pointer to an-/// `InternalNode` can be directly casted to a pointer to the underlying `LeafNode` portion of the-/// node, allowing code to act on leaf and internal nodes generically without having to even check+/// The actual representation of leaf or internal nodes. These should be hidden behind+/// `BoxedNode`s to prevent dropping uninitialized keys and values. Any pointer to a+/// `UniversalNode` can be directly casted to or from a pointer to its `LeafData`,+/// allowing code to act on leaf and internal nodes generically without having to even check /// which of the two a pointer is pointing at. This property is enabled by the use of `repr(C)`. #[repr(C)]-// gdb_providers.py uses this type name for introspection.-struct InternalNode<K, V> {+pub struct UniversalNode<K, V, E> {     // gdb_providers.py uses this field name for introspection.-    data: LeafNode<K, V>,+    leaf: LeafNode<K, V>, -    /// The pointers to the children of this node. `len + 1` of these are considered+    /// The contents of the edges delimiting each key/value pair.+    /// For leaf nodes, these are empty. For internal nodes, these are+    /// pointers to the children of this node. `len + 1` of these are considered     /// initialized and valid. Although during the process of `into_iter` or `drop`,     /// some pointers are dangling while others still need to be traversed.-    edges: [MaybeUninit<BoxedNode<K, V>>; 2 * B],+    edges: [MaybeUninit<E>; 2 * B], } -impl<K, V> InternalNode<K, V> {-    /// Creates a new `InternalNode`.+type Node<K, V, Type> = UniversalNode<K, V, <Type as NodeTypeTrait<K, V>>::E>;++impl<K, V, E> UniversalNode<K, V, E> {+    /// Creates a new `Node`. Unsafe because all nodes should really be hidden behind+    /// `BoxedNode`, preventing accidental dropping of uninitialized keys and values.+    unsafe fn new() -> Box<Self> {+        box Self {+            leaf: LeafNode {+                // As a general policy, we leave fields uninitialized if they can be, as this should+                // be both slightly faster and easier to track in Valgrind.+                keys: MaybeUninit::uninit_array(),+                vals: MaybeUninit::uninit_array(),+                parent: None,+                parent_idx: MaybeUninit::uninit(),+                len: 0,+            },+            edges: MaybeUninit::uninit_array(),+        }+    }+}++impl<K, V> Node<K, V, marker::Internal> {+    /// Fixes the parent pointer and index in some of the child nodes. This is useful+    /// when the ordering of edges has been changed, such as in the various `insert` methods.     ///-    /// This is unsafe for two reasons. First, it returns an `InternalNode` by value, risking-    /// dropping of uninitialized fields. Second, an invariant of internal nodes is that `len + 1`-    /// edges are initialized and valid, meaning that even when the node is empty (having a-    /// `len` of 0), there must be one initialized and valid edge. This function does not set up-    /// such an edge.-    unsafe fn new() -> Self {-        InternalNode { data: unsafe { LeafNode::new() }, edges: MaybeUninit::uninit_array() }+    /// # Safety+    /// Every item returned by `range` is a valid edge index for the node.+    unsafe fn correct_childrens_parent_links<R: Iterator<Item = usize>>(&mut self, idx_range: R) {+        let ptr = NonNull::new(self);+        for idx in idx_range {+            let child = unsafe { self.edges.get_unchecked_mut(idx).assume_init_mut().ptr.as_mut() };+            child.parent = ptr;+            child.parent_idx = MaybeUninit::new(idx as u16);+        }+    }+}++pub trait NodeTypeTrait<K, V>+where+    Self: Sized,+{+    type E;++    /// Wrapper for the `correct_childrens_parent_links` method on internal nodes,+    /// doing nothing on leaf nodes.+    ///+    /// # Safety+    /// Every item returned by `range` is a valid edge index for the node.+    unsafe fn correct_childrens_parent_links<R: Iterator<Item = usize>>(+        _node: &mut Node<K, V, Self>,+        _idx_range: R,+    ) {+    }+}++impl<K, V> NodeTypeTrait<K, V> for marker::Leaf {+    type E = ();+}++impl<K, V> NodeTypeTrait<K, V> for marker::Internal {+    type E = BoxedNode<K, V>;++    unsafe fn correct_childrens_parent_links<R: Iterator<Item = usize>>(+        node: &mut Node<K, V, Self>,+        idx_range: R,+    ) {+        unsafe { node.correct_childrens_parent_links(idx_range) }     } } -/// A managed, non-null pointer to a node. This is either an owned pointer to-/// `LeafNode<K, V>` or an owned pointer to `InternalNode<K, V>`.+// This acts as a type alias that is externally visible,+// allowing gdb_providers.py to introspect.+#[repr(transparent)]+struct InternalNode<K, V> {+    // gdb_providers.py uses this field name for introspection.+    _wraps: Node<K, V, marker::Internal>,+}++/// A managed, non-null pointer to a leaf or internal `Node`. /// /// However, `BoxedNode` contains no information as to which of the two types /// of nodes it actually contains, and, partially due to this lack of information, /// has no destructor.-struct BoxedNode<K, V> {+pub struct BoxedNode<K, V> {     ptr: Unique<LeafNode<K, V>>, }  impl<K, V> BoxedNode<K, V> {-    fn from_leaf(node: Box<LeafNode<K, V>>) -> Self {-        BoxedNode { ptr: Box::into_unique(node) }-    }--    fn from_internal(node: Box<InternalNode<K, V>>) -> Self {+    fn from_new<Type>(node: Box<Node<K, V, Type>>) -> BoxedNode<K, V>+    where+        Type: NodeTypeTrait<K, V>,+    {         BoxedNode { ptr: Box::into_unique(node).cast() }

I hoped to get rid of this cast, just boxing the address of the leaf, but whatever I do, I get runtime errors, reproducible but depending on the exact code, sometimes only in one unit test. So inexplicable I worry that the old and/or the proposed code still has undefined behaviour.

ssomers

comment created time in 4 days

PullRequestReviewEvent

push eventssomers/rust

Vali Schneider

commit sha 459969f88ff95c94b7b34043a7f0e13de91de4f8

added restriction lint that prohibits the usage of unimplemented, unreachable or panic in a function of type result or option

view details

Vali Schneider

commit sha ceab1a9167655eba9f9556f8766f8702e49dfef3

removed unnecessary comment

view details

Vali Schneider

commit sha 8462cce96081b87eba7a5bc89130a1a09fe1f6d0

edited documentation

view details

Vali Schneider

commit sha b2d8ca9a766703469178ea37d4d46067bb6fa926

ran cargo dev update lints

view details

Vali Schneider

commit sha b006522393a3c3c2656e1ccdfbb0076ff1bd7e99

added lint for todo and removed option

view details

Vali Schneider

commit sha a424a2c1676a29c147252873037e8943d54941d3

changed check_impl_item to check_fn and added a few more test cases

view details

Vali Schneider

commit sha 73a3288282e733bfc5893e9920d29f1de5a21591

uncommented fn

view details

Erik Desjardins

commit sha d3b9ece4c0028ff7e36e34df2d2b26366f9c0648

add tests related to tuple scalar layout with ZST in last field

view details

Erik Desjardins

commit sha e5d85f917b8965a5e62513c17cbb887366b152bc

allow reordering of the last field of a MaybeUnsized struct if it's a ZST

view details

Erik Desjardins

commit sha e9bc3ddb073f2261ac46832d985efe8db863ed6a

test that we do not change the offset of ZST tuple fields when unsizing

view details

Erik Desjardins

commit sha 68217c9e0f1269d29b4c1c72d08fb1b95bf441cd

ignore zst offsets instead

view details

Erik Desjardins

commit sha 6fc1d8bc13124bb134d7ab54e56237821a55912e

add codegen test

view details

Erik Desjardins

commit sha 24e0913e37cc6fc363b37d13bf519db212f175a2

handle vector layout

view details

Vali Schneider

commit sha f9fcbbea03edb735c22311522b55d7b854bd6ac0

fixed bug

view details

Ricky

commit sha e49a29933be3bd988ccb75b053f480d9c99a7ff5

Working map_err_ignore lint

view details

Ricky

commit sha 202a80c927412a548180eca5990ee764d76ed643

Added tests for map_err, ignored map_err lint on drop_ref tests

view details

Ricky

commit sha 337729137bdec31b55665653ef0cf7dc124b0eaa

Ran cargo dev update_lints

view details

Ricky

commit sha 2387f68e437bf2ff5f117f63936257ce64052cfa

Removed map_err suggestion in lint, and updated lint documentation example

view details

Jane Lusby

commit sha c31d4730b0d40c62934839405d0c25e2ffa3fad1

update example to be more idiomatic

view details

Ricky

commit sha 4f1c4a99d4d98f1acea3c9c7cc55355aa46119aa

Fixed typo in lint and test

view details

push time in 4 days

push eventssomers/rust

Stein Somers

commit sha 1e64d98761c4713f739656bcff218dbdb1b08ad9

BTreeMap: refactor correct_childrens_parent_links

view details

Stein Somers

commit sha 396552457033925010df3eccbee21bdff2aa1122

BTreeMap: introduce edge methods similar to those of keys and values

view details

Stein Somers

commit sha 55fa8afe94019cb1da29d5fab7fd7ad5795b2c39

BTreeMap: various tweaks

view details

Stein Somers

commit sha 3479bf64702f17dedcdf386d8aa663494b05fab0

BTreeMap: consider leaf nodes to have empty edges

view details

push time in 5 days

Pull request review commentrust-lang/rust

BTreeMap: consider leaf nodes to have empty edges

 struct LeafNode<K, V> {     vals: [MaybeUninit<V>; CAPACITY], } -impl<K, V> LeafNode<K, V> {-    /// Creates a new `LeafNode`. Unsafe because all nodes should really be hidden behind-    /// `BoxedNode`, preventing accidental dropping of uninitialized keys and values.-    unsafe fn new() -> Self {-        LeafNode {-            // As a general policy, we leave fields uninitialized if they can be, as this should-            // be both slightly faster and easier to track in Valgrind.-            keys: MaybeUninit::uninit_array(),-            vals: MaybeUninit::uninit_array(),-            parent: None,-            parent_idx: MaybeUninit::uninit(),-            len: 0,-        }-    }-}--/// The underlying representation of internal nodes. As with `LeafNode`s, these should be hidden-/// behind `BoxedNode`s to prevent dropping uninitialized keys and values. Any pointer to an-/// `InternalNode` can be directly casted to a pointer to the underlying `LeafNode` portion of the-/// node, allowing code to act on leaf and internal nodes generically without having to even check+/// The actual representation of leaf or internal nodes. These should be hidden behind+/// `BoxedNode`s to prevent dropping uninitialized keys and values. Any pointer to an+/// internal node can be directly casted from and to a pointer to the underlying leaf portion,+/// allowing code to act on leaf and internal nodes generically without having to even check /// which of the two a pointer is pointing at. This property is enabled by the use of `repr(C)`. #[repr(C)]-struct InternalNode<K, V> {-    data: LeafNode<K, V>,+pub struct UniversalNode<K, V, E> {+    // gdb_providers.py uses this field name for introspection.+    leaf: LeafNode<K, V>, -    /// The pointers to the children of this node. `len + 1` of these are considered+    /// The contents of the edges delimiting each key/value pair.+    /// For leaf nodes, these are empty. For internal nodes, these are+    /// pointers to the children of this node. `len + 1` of these are considered     /// initialized and valid. Although during the process of `into_iter` or `drop`,     /// some pointers are dangling while others still need to be traversed.-    edges: [MaybeUninit<BoxedNode<K, V>>; 2 * B],+    edges: [MaybeUninit<E>; 2 * B], } -impl<K, V> InternalNode<K, V> {-    /// Creates a new `InternalNode`.+type Node<K, V, Type> = UniversalNode<K, V, <Type as NodeTypeTrait<K, V>>::E>;++// This acts as a type alias that is externally visible. The type isn't actually instantiated.+// gdb_providers.py uses this type name for introspection.+#[repr(C)]

Oh, misinterpreted... simply needed a leading underscore.

ssomers

comment created time in 5 days

PullRequestReviewEvent

pull request commentrust-lang/rust

BTreeMap: consider leaf nodes to have empty edges

And I'll wait for #77005 to land to rebase.

ssomers

comment created time in 5 days

push eventssomers/rust

Stein Somers

commit sha 1e64d98761c4713f739656bcff218dbdb1b08ad9

BTreeMap: refactor correct_childrens_parent_links

view details

Stein Somers

commit sha 396552457033925010df3eccbee21bdff2aa1122

BTreeMap: introduce edge methods similar to those of keys and values

view details

Stein Somers

commit sha 55fa8afe94019cb1da29d5fab7fd7ad5795b2c39

BTreeMap: various tweaks

view details

push time in 5 days

push eventssomers/rust

Ivan Tham

commit sha c5975e9b6c5781b3b7300b7921c14b060086e1c1

Reduce duplicate in liballoc reserve error handling

view details

Federico Ponzi

commit sha 27c90b881df93b53fd3f24dcbfed116379c2fc69

initial implementation of OpenOptions to c_int

view details

Federico Ponzi

commit sha eb3906be4ad375cc6b83cd6a6e0116817db22575

Fix typo get openoptions function name Co-authored-by: Ivan Tham <pickfire@riseup.net>

view details

Federico Ponzi

commit sha 1bc0627607262cc60a7692b16e205f30fc88b89f

Add as_flag function to the OpenOptionsExt struct

view details

Federico Ponzi

commit sha 2c9e27b759a9e9feeb943fb855e32d7383d1dcc6

Merge branch 'convert-openoptions-cint' of github.com:FedericoPonzi/rust into convert-openoptions-cint

view details

Federico Ponzi

commit sha 7c1e5c1dcd25c945f619eda289f639dbe2b002da

Update OpenOptions::as_flags docs, and minor styling

view details

Federico Ponzi

commit sha 321b680fe66d1be04cd67fac75ff7f148fd117fe

Update docs of OpenOptions::as_flags

view details

Federico Ponzi

commit sha 28db5214d2c48e7a58cf79b9e272097260910a33

More implementations of Write for immutable refs Fixes #73836

view details

Federico Ponzi

commit sha ec7f9b927f1896c7f29c602d6b0f961c891d0941

Deduplicates io::Write implementations

view details

Christiaan Dirkx

commit sha 8f27e3cb1b4140d9124d60df0850ef734e73b884

Make some methods of `Pin` unstable const Make the following methods unstable const under the `const_pin` feature: - `new` - `new_unchecked` - `into_inner` - `into_inner_unchecked` - `get_ref` - `into_ref` Also adds tests for these methods in a const context. Tracking issue: #76654

view details

Simon Vandel Sillesen

commit sha e5447a22222ecc6a650e75282cb9931b910854b2

Fix #76432 Only insert StorageDeads if we actually removed one. Fixes an issue where we added StorageDead to a place with no StorageLive

view details

Manish Goregaokar

commit sha c100e726c10fe9d212a58a5494126409e7d0e10b

Stabilize intra-doc links

view details

Manish Goregaokar

commit sha 63d5beec43ff7721928821cd83f9790188b03276

Move intra-doc-links documentation out of unstable section

view details

Manish Goregaokar

commit sha bc06674774e6457046e41a48dc3e8be8c5496f11

Mention super/crate/self in docs

view details

Manish Goregaokar

commit sha f072e4a7322e8e2b16410e3225e1afc15d132e36

Mention URL fragments

view details

Manish Goregaokar

commit sha 2a98409634ec38547d03512898192b5bdce15f3d

Fill out docs on intra-doc resolution failure lint

view details

Manish Goregaokar

commit sha 4e0eb0b73ba2defaf0f3c2152e9daa5c18d1603f

Update src/doc/rustdoc/src/linking-to-items-by-name.md Co-authored-by: Joshua Nelson <joshua@yottadb.com>

view details

Manish Goregaokar

commit sha 175e30539d5ee9364a26f89f8a03a60b53690684

Update src/doc/rustdoc/src/linking-to-items-by-name.md Co-authored-by: Joshua Nelson <joshua@yottadb.com>

view details

Manish Goregaokar

commit sha 51c1351f7b9366a295dce5d63c2fd387170d5c34

Resolve some conflicts

view details

Manish Goregaokar

commit sha 6f1fa2b16376f586285453045788519df527a1b2

Fix lint name in docs

view details

push time in 5 days

Pull request review commentrust-lang/rust

BtreeMap: refactoring around edges

 const KV_IDX_CENTER: usize = B - 1; const EDGE_IDX_LEFT_OF_CENTER: usize = B - 1; const EDGE_IDX_RIGHT_OF_CENTER: usize = B; -/// The underlying representation of leaf nodes.-#[repr(C)]

Well, I'm pretty confident it is not. The introduction of the empty root node (#50352) made it necessary, but you simplified that away, so we don't need to constrain leaf layout. For a particular K and V, whatever layout the compiler chooses , the field in InternalNode has the same layout and the repr(C) on that guarantees that the internal node's alignment is at least as coarse as the leaf node's. The unit test test_iter_mut_mutation covers alignment of internal nodes. And from voluntary and involuntary experiments, I can tell the compiler is eager to reorder fields if you let your guard down.

ssomers

comment created time in 5 days

PullRequestReviewEvent

Pull request review commentrust-lang/rust

BTreeMap: consider leaf nodes to have empty edges

 struct LeafNode<K, V> {     vals: [MaybeUninit<V>; CAPACITY], } -impl<K, V> LeafNode<K, V> {-    /// Creates a new `LeafNode`. Unsafe because all nodes should really be hidden behind-    /// `BoxedNode`, preventing accidental dropping of uninitialized keys and values.-    unsafe fn new() -> Self {-        LeafNode {-            // As a general policy, we leave fields uninitialized if they can be, as this should-            // be both slightly faster and easier to track in Valgrind.-            keys: MaybeUninit::uninit_array(),-            vals: MaybeUninit::uninit_array(),-            parent: None,-            parent_idx: MaybeUninit::uninit(),-            len: 0,-        }-    }-}--/// The underlying representation of internal nodes. As with `LeafNode`s, these should be hidden-/// behind `BoxedNode`s to prevent dropping uninitialized keys and values. Any pointer to an-/// `InternalNode` can be directly casted to a pointer to the underlying `LeafNode` portion of the-/// node, allowing code to act on leaf and internal nodes generically without having to even check+/// The actual representation of leaf or internal nodes. These should be hidden behind+/// `BoxedNode`s to prevent dropping uninitialized keys and values. Any pointer to an+/// internal node can be directly casted from and to a pointer to the underlying leaf portion,+/// allowing code to act on leaf and internal nodes generically without having to even check /// which of the two a pointer is pointing at. This property is enabled by the use of `repr(C)`. #[repr(C)]-struct InternalNode<K, V> {-    data: LeafNode<K, V>,+pub struct UniversalNode<K, V, E> {+    // gdb_providers.py uses this field name for introspection.+    leaf: LeafNode<K, V>, -    /// The pointers to the children of this node. `len + 1` of these are considered+    /// The contents of the edges delimiting each key/value pair.+    /// For leaf nodes, these are empty. For internal nodes, these are+    /// pointers to the children of this node. `len + 1` of these are considered     /// initialized and valid. Although during the process of `into_iter` or `drop`,     /// some pointers are dangling while others still need to be traversed.-    edges: [MaybeUninit<BoxedNode<K, V>>; 2 * B],+    edges: [MaybeUninit<E>; 2 * B], } -impl<K, V> InternalNode<K, V> {-    /// Creates a new `InternalNode`.+type Node<K, V, Type> = UniversalNode<K, V, <Type as NodeTypeTrait<K, V>>::E>;++// This acts as a type alias that is externally visible. The type isn't actually instantiated.+// gdb_providers.py uses this type name for introspection.+#[repr(C)]

Seems like a good candidate for repr(transparent), but this motivates the compiler to dig its heels in screaming "field is never read: provided_node"

ssomers

comment created time in 6 days

PullRequestReviewEvent

pull request commentrust-lang/rust

BTreeMap: consider leaf nodes to have empty edges

Found tricks to simplify the gdb introspection. The result is still a bit disappointing but acceptable to me.

ssomers

comment created time in 6 days

push eventssomers/rust

Ivan Tham

commit sha c5975e9b6c5781b3b7300b7921c14b060086e1c1

Reduce duplicate in liballoc reserve error handling

view details

Federico Ponzi

commit sha 27c90b881df93b53fd3f24dcbfed116379c2fc69

initial implementation of OpenOptions to c_int

view details

Federico Ponzi

commit sha eb3906be4ad375cc6b83cd6a6e0116817db22575

Fix typo get openoptions function name Co-authored-by: Ivan Tham <pickfire@riseup.net>

view details

Federico Ponzi

commit sha 1bc0627607262cc60a7692b16e205f30fc88b89f

Add as_flag function to the OpenOptionsExt struct

view details

Federico Ponzi

commit sha 2c9e27b759a9e9feeb943fb855e32d7383d1dcc6

Merge branch 'convert-openoptions-cint' of github.com:FedericoPonzi/rust into convert-openoptions-cint

view details

Federico Ponzi

commit sha 7c1e5c1dcd25c945f619eda289f639dbe2b002da

Update OpenOptions::as_flags docs, and minor styling

view details

Federico Ponzi

commit sha 321b680fe66d1be04cd67fac75ff7f148fd117fe

Update docs of OpenOptions::as_flags

view details

Federico Ponzi

commit sha 28db5214d2c48e7a58cf79b9e272097260910a33

More implementations of Write for immutable refs Fixes #73836

view details

Federico Ponzi

commit sha ec7f9b927f1896c7f29c602d6b0f961c891d0941

Deduplicates io::Write implementations

view details

Christiaan Dirkx

commit sha 8f27e3cb1b4140d9124d60df0850ef734e73b884

Make some methods of `Pin` unstable const Make the following methods unstable const under the `const_pin` feature: - `new` - `new_unchecked` - `into_inner` - `into_inner_unchecked` - `get_ref` - `into_ref` Also adds tests for these methods in a const context. Tracking issue: #76654

view details

Simon Vandel Sillesen

commit sha e5447a22222ecc6a650e75282cb9931b910854b2

Fix #76432 Only insert StorageDeads if we actually removed one. Fixes an issue where we added StorageDead to a place with no StorageLive

view details

Manish Goregaokar

commit sha c100e726c10fe9d212a58a5494126409e7d0e10b

Stabilize intra-doc links

view details

Manish Goregaokar

commit sha 63d5beec43ff7721928821cd83f9790188b03276

Move intra-doc-links documentation out of unstable section

view details

Manish Goregaokar

commit sha bc06674774e6457046e41a48dc3e8be8c5496f11

Mention super/crate/self in docs

view details

Manish Goregaokar

commit sha f072e4a7322e8e2b16410e3225e1afc15d132e36

Mention URL fragments

view details

Manish Goregaokar

commit sha 2a98409634ec38547d03512898192b5bdce15f3d

Fill out docs on intra-doc resolution failure lint

view details

Manish Goregaokar

commit sha 4e0eb0b73ba2defaf0f3c2152e9daa5c18d1603f

Update src/doc/rustdoc/src/linking-to-items-by-name.md Co-authored-by: Joshua Nelson <joshua@yottadb.com>

view details

Manish Goregaokar

commit sha 175e30539d5ee9364a26f89f8a03a60b53690684

Update src/doc/rustdoc/src/linking-to-items-by-name.md Co-authored-by: Joshua Nelson <joshua@yottadb.com>

view details

Manish Goregaokar

commit sha 51c1351f7b9366a295dce5d63c2fd387170d5c34

Resolve some conflicts

view details

Manish Goregaokar

commit sha 6f1fa2b16376f586285453045788519df527a1b2

Fix lint name in docs

view details

push time in 6 days

pull request commentrust-lang/rust

BtreeMap: refactoring around edges

Rebased & some more minor and comment tweaks added

ssomers

comment created time in 6 days

push eventssomers/rust

Ivan Tham

commit sha c5975e9b6c5781b3b7300b7921c14b060086e1c1

Reduce duplicate in liballoc reserve error handling

view details

Federico Ponzi

commit sha 27c90b881df93b53fd3f24dcbfed116379c2fc69

initial implementation of OpenOptions to c_int

view details

Federico Ponzi

commit sha eb3906be4ad375cc6b83cd6a6e0116817db22575

Fix typo get openoptions function name Co-authored-by: Ivan Tham <pickfire@riseup.net>

view details

Federico Ponzi

commit sha 1bc0627607262cc60a7692b16e205f30fc88b89f

Add as_flag function to the OpenOptionsExt struct

view details

Federico Ponzi

commit sha 2c9e27b759a9e9feeb943fb855e32d7383d1dcc6

Merge branch 'convert-openoptions-cint' of github.com:FedericoPonzi/rust into convert-openoptions-cint

view details

Federico Ponzi

commit sha 7c1e5c1dcd25c945f619eda289f639dbe2b002da

Update OpenOptions::as_flags docs, and minor styling

view details

Federico Ponzi

commit sha 321b680fe66d1be04cd67fac75ff7f148fd117fe

Update docs of OpenOptions::as_flags

view details

Federico Ponzi

commit sha 28db5214d2c48e7a58cf79b9e272097260910a33

More implementations of Write for immutable refs Fixes #73836

view details

Federico Ponzi

commit sha ec7f9b927f1896c7f29c602d6b0f961c891d0941

Deduplicates io::Write implementations

view details

Christiaan Dirkx

commit sha 8f27e3cb1b4140d9124d60df0850ef734e73b884

Make some methods of `Pin` unstable const Make the following methods unstable const under the `const_pin` feature: - `new` - `new_unchecked` - `into_inner` - `into_inner_unchecked` - `get_ref` - `into_ref` Also adds tests for these methods in a const context. Tracking issue: #76654

view details

Simon Vandel Sillesen

commit sha e5447a22222ecc6a650e75282cb9931b910854b2

Fix #76432 Only insert StorageDeads if we actually removed one. Fixes an issue where we added StorageDead to a place with no StorageLive

view details

Manish Goregaokar

commit sha c100e726c10fe9d212a58a5494126409e7d0e10b

Stabilize intra-doc links

view details

Manish Goregaokar

commit sha 63d5beec43ff7721928821cd83f9790188b03276

Move intra-doc-links documentation out of unstable section

view details

Manish Goregaokar

commit sha bc06674774e6457046e41a48dc3e8be8c5496f11

Mention super/crate/self in docs

view details

Manish Goregaokar

commit sha f072e4a7322e8e2b16410e3225e1afc15d132e36

Mention URL fragments

view details

Manish Goregaokar

commit sha 2a98409634ec38547d03512898192b5bdce15f3d

Fill out docs on intra-doc resolution failure lint

view details

Manish Goregaokar

commit sha 4e0eb0b73ba2defaf0f3c2152e9daa5c18d1603f

Update src/doc/rustdoc/src/linking-to-items-by-name.md Co-authored-by: Joshua Nelson <joshua@yottadb.com>

view details

Manish Goregaokar

commit sha 175e30539d5ee9364a26f89f8a03a60b53690684

Update src/doc/rustdoc/src/linking-to-items-by-name.md Co-authored-by: Joshua Nelson <joshua@yottadb.com>

view details

Manish Goregaokar

commit sha 51c1351f7b9366a295dce5d63c2fd387170d5c34

Resolve some conflicts

view details

Manish Goregaokar

commit sha 6f1fa2b16376f586285453045788519df527a1b2

Fix lint name in docs

view details

push time in 6 days

pull request commentrust-lang/rust

BTreeMap: consider leaf nodes to have empty edges

Some of the stuff split off into #77005. The rest is a little disappointing. The only way I found to make gdb_providers work is obnoxious. I couldn't python to access the InternalNode type, no matter how I try to wrap it.

Performance of insertion may be better for reasonably sized key/values.

 name                                           r3 ns/iter  r4 ns/iter  diff ns/iter   diff %  speedup
 btree::map::clone_fat_100                      45,305      52,676             7,371   16.27%   x 0.86
 btree::map::clone_fat_100_and_clear            45,755      51,880             6,125   13.39%   x 0.88
 btree::map::clone_fat_val_100                  23,963      27,126             3,163   13.20%   x 0.88
 btree::map::clone_fat_val_100_and_clear        23,618      27,295             3,677   15.57%   x 0.87
 btree::map::clone_fat_val_100_and_into_iter    34,394      38,174             3,780   10.99%   x 0.90
 btree::map::clone_slim_10k                     231,170     207,235          -23,935  -10.35%   x 1.12
 btree::map::clone_slim_10k_and_into_iter       230,603     207,045          -23,558  -10.22%   x 1.11
 btree::map::first_and_last_10k                 68          59                    -9  -13.24%   x 1.15
 btree::map::range_included_included            473,273     418,305          -54,968  -11.61%   x 1.13
 btree::set::difference_staggered_100_vs_100    694         905                  211   30.40%   x 0.77
 btree::set::difference_staggered_10k_vs_10k    68,588      85,926            17,338   25.28%   x 0.80
 btree::set::intersection_staggered_10k_vs_10k  61,094      68,490             7,396   12.11%   x 0.89
 btree::set::is_subset_100_vs_10k               1,197       1,338                141   11.78%   x 0.89
ssomers

comment created time in 8 days

PR opened rust-lang/rust

BTreeMap: consider leaf nodes to have empty edges

Tried to make internal and leaf nodes more alike, because:

  • The btree code is ambiguous about leaf edges (i.e., edges within leaf nodes). Iteration relies on them heavily, but some of the comments in node.rs suggest there are no leaf edges. In my definition of edges, internal edges contain a pointer to a child node, leaf edges don't.
  • The btree code splits up / repeats some methods according to whether the node is leaf or internal, while the only difference is the kind of leaf edge contents.

r? @Mark-Simulacrum

+367 -422

0 comment

2 changed files

pr created time in 8 days

push eventssomers/rust

Guillaume Gomez

commit sha 69ffed763d1540c387db3b578848184026da0484

Add error explanation for E0755

view details

Tavian Barnes

commit sha a06edda3ad9abd4f07d07bbe46cb488efeebbbd0

Fix segfault if pthread_getattr_np fails glibc destroys[1] the passed pthread_attr_t if pthread_getattr_np() fails. Destroying it again leads to a segfault. Fix it by only destroying it on success for glibc. [1]: https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_getattr_np.c;h=ce437205e41dc05653e435f6188768cccdd91c99;hb=HEAD#l205

view details

Tavian Barnes

commit sha a684153f2920729f9fc3ea27ddb77d7cc3543214

Only call pthread_attr_destroy() after getattr_np() succeeds on all libcs The calling convention of pthread_getattr_np() is to initialize the pthread_attr_t, so _destroy() is only necessary on success (and _init() isn't necessary beforehand). On the other hand, FreeBSD wants the attr_t to be initialized before pthread_attr_get_np(), and therefore it should always be destroyed afterwards.

view details

Juan Aguilar Santillana

commit sha 7b5d9836c47509e16900a274ed0b552a2e30a36a

Remove redundant to_string

view details

Matthias Krüger

commit sha 026922ad60a9529f16b792e8c2fe805ab3906259

make replace_prefix only take &str as arguments https://github.com/rust-lang/rust/pull/76828#issuecomment-694078200

view details

Juan Aguilar Santillana

commit sha 28cfa9730eec41314dee99323f7d20aaadde9e0e

Simplify panic_if_treat_err_as_bug avoiding allocations

view details

Alexis Bourget

commit sha 4675a3104b3ace025560337c5d164e330f6b9d68

Use intra-doc links in core/src/iter when possible

view details

Alexis Bourget

commit sha bffd2111f7b033902e60889da5d3fa7a033a7d5e

Finish moving to intra doc links for std::sync

view details

Alexis Bourget

commit sha 982ec0d0c9ed93d806340502d48de190e1558a64

Fix broken link

view details

Alexis Bourget

commit sha b534d9f6e1e2b3e77842c5ededa62f6bcfb2ea58

Fix broken link

view details

khyperia

commit sha 0bc405e3521d84cfaef7d94f1ae40c6c16796c8b

Remove DeclareMethods

view details

Tomasz Miąsko

commit sha 65edf54c256e5369fdf9c0a972cd83d2414d5bb5

Add a regression test for copy propagation miscompilation

view details

est31

commit sha cebbd9fcd35a63569b8fb5c836b5a26089861c41

Use as_nanos in bench.rs and base.rs

view details

est31

commit sha 43193dcb882466163436057e50c96bb74d9bf50f

Use as_secs_f64 in profiling.rs

view details

est31

commit sha 4bc0e55ac4280be80d8cd0f9bc26bd0949f75494

Replace write_fmt with write! Latter is simpler

view details

Dániel Buga

commit sha b2c5f99883bf7ba348c9e9c03e7592b18ef59665

Add test for issue #34634

view details

est31

commit sha 812ff668032e5feb8cd702ecd9f4b5be21513f10

Use const_cstr macro in consts.rs

view details

est31

commit sha c2dad1c6b9f9636198d7c561b47a2974f5103f6d

Remove unused static_assert macro

view details

Mara Bos

commit sha 5ef1db3622c373883571868cbdafbfbd568cddcb

Revert adding Atomic::from_mut. This made too many assumptions about platforms, breaking some things. Will need to be added later with a better way of gating on proper alignment, without hardcoding cfg(target_arch)s.

view details

Alexis Bourget

commit sha 08b85a6fc88b4c7b5e02742b5df825b62e168f81

use iter:: before free functions

view details

push time in 8 days

push eventssomers/rust

Guillaume Gomez

commit sha 69ffed763d1540c387db3b578848184026da0484

Add error explanation for E0755

view details

Tavian Barnes

commit sha a06edda3ad9abd4f07d07bbe46cb488efeebbbd0

Fix segfault if pthread_getattr_np fails glibc destroys[1] the passed pthread_attr_t if pthread_getattr_np() fails. Destroying it again leads to a segfault. Fix it by only destroying it on success for glibc. [1]: https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_getattr_np.c;h=ce437205e41dc05653e435f6188768cccdd91c99;hb=HEAD#l205

view details

Tavian Barnes

commit sha a684153f2920729f9fc3ea27ddb77d7cc3543214

Only call pthread_attr_destroy() after getattr_np() succeeds on all libcs The calling convention of pthread_getattr_np() is to initialize the pthread_attr_t, so _destroy() is only necessary on success (and _init() isn't necessary beforehand). On the other hand, FreeBSD wants the attr_t to be initialized before pthread_attr_get_np(), and therefore it should always be destroyed afterwards.

view details

Juan Aguilar Santillana

commit sha 7b5d9836c47509e16900a274ed0b552a2e30a36a

Remove redundant to_string

view details

Matthias Krüger

commit sha 026922ad60a9529f16b792e8c2fe805ab3906259

make replace_prefix only take &str as arguments https://github.com/rust-lang/rust/pull/76828#issuecomment-694078200

view details

Juan Aguilar Santillana

commit sha 28cfa9730eec41314dee99323f7d20aaadde9e0e

Simplify panic_if_treat_err_as_bug avoiding allocations

view details

Alexis Bourget

commit sha 4675a3104b3ace025560337c5d164e330f6b9d68

Use intra-doc links in core/src/iter when possible

view details

Alexis Bourget

commit sha bffd2111f7b033902e60889da5d3fa7a033a7d5e

Finish moving to intra doc links for std::sync

view details

Alexis Bourget

commit sha 982ec0d0c9ed93d806340502d48de190e1558a64

Fix broken link

view details

Alexis Bourget

commit sha b534d9f6e1e2b3e77842c5ededa62f6bcfb2ea58

Fix broken link

view details

khyperia

commit sha 0bc405e3521d84cfaef7d94f1ae40c6c16796c8b

Remove DeclareMethods

view details

Tomasz Miąsko

commit sha 65edf54c256e5369fdf9c0a972cd83d2414d5bb5

Add a regression test for copy propagation miscompilation

view details

est31

commit sha cebbd9fcd35a63569b8fb5c836b5a26089861c41

Use as_nanos in bench.rs and base.rs

view details

est31

commit sha 43193dcb882466163436057e50c96bb74d9bf50f

Use as_secs_f64 in profiling.rs

view details

est31

commit sha 4bc0e55ac4280be80d8cd0f9bc26bd0949f75494

Replace write_fmt with write! Latter is simpler

view details

Dániel Buga

commit sha b2c5f99883bf7ba348c9e9c03e7592b18ef59665

Add test for issue #34634

view details

est31

commit sha 812ff668032e5feb8cd702ecd9f4b5be21513f10

Use const_cstr macro in consts.rs

view details

est31

commit sha c2dad1c6b9f9636198d7c561b47a2974f5103f6d

Remove unused static_assert macro

view details

Mara Bos

commit sha 5ef1db3622c373883571868cbdafbfbd568cddcb

Revert adding Atomic::from_mut. This made too many assumptions about platforms, breaking some things. Will need to be added later with a better way of gating on proper alignment, without hardcoding cfg(target_arch)s.

view details

Alexis Bourget

commit sha 08b85a6fc88b4c7b5e02742b5df825b62e168f81

use iter:: before free functions

view details

push time in 8 days

push eventssomers/rust

Guillaume Gomez

commit sha 69ffed763d1540c387db3b578848184026da0484

Add error explanation for E0755

view details

Tavian Barnes

commit sha a06edda3ad9abd4f07d07bbe46cb488efeebbbd0

Fix segfault if pthread_getattr_np fails glibc destroys[1] the passed pthread_attr_t if pthread_getattr_np() fails. Destroying it again leads to a segfault. Fix it by only destroying it on success for glibc. [1]: https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_getattr_np.c;h=ce437205e41dc05653e435f6188768cccdd91c99;hb=HEAD#l205

view details

Tavian Barnes

commit sha a684153f2920729f9fc3ea27ddb77d7cc3543214

Only call pthread_attr_destroy() after getattr_np() succeeds on all libcs The calling convention of pthread_getattr_np() is to initialize the pthread_attr_t, so _destroy() is only necessary on success (and _init() isn't necessary beforehand). On the other hand, FreeBSD wants the attr_t to be initialized before pthread_attr_get_np(), and therefore it should always be destroyed afterwards.

view details

Juan Aguilar Santillana

commit sha 7b5d9836c47509e16900a274ed0b552a2e30a36a

Remove redundant to_string

view details

Matthias Krüger

commit sha 026922ad60a9529f16b792e8c2fe805ab3906259

make replace_prefix only take &str as arguments https://github.com/rust-lang/rust/pull/76828#issuecomment-694078200

view details

Juan Aguilar Santillana

commit sha 28cfa9730eec41314dee99323f7d20aaadde9e0e

Simplify panic_if_treat_err_as_bug avoiding allocations

view details

Alexis Bourget

commit sha 4675a3104b3ace025560337c5d164e330f6b9d68

Use intra-doc links in core/src/iter when possible

view details

Alexis Bourget

commit sha bffd2111f7b033902e60889da5d3fa7a033a7d5e

Finish moving to intra doc links for std::sync

view details

Alexis Bourget

commit sha 982ec0d0c9ed93d806340502d48de190e1558a64

Fix broken link

view details

Alexis Bourget

commit sha b534d9f6e1e2b3e77842c5ededa62f6bcfb2ea58

Fix broken link

view details

khyperia

commit sha 0bc405e3521d84cfaef7d94f1ae40c6c16796c8b

Remove DeclareMethods

view details

Tomasz Miąsko

commit sha 65edf54c256e5369fdf9c0a972cd83d2414d5bb5

Add a regression test for copy propagation miscompilation

view details

est31

commit sha cebbd9fcd35a63569b8fb5c836b5a26089861c41

Use as_nanos in bench.rs and base.rs

view details

est31

commit sha 43193dcb882466163436057e50c96bb74d9bf50f

Use as_secs_f64 in profiling.rs

view details

est31

commit sha 4bc0e55ac4280be80d8cd0f9bc26bd0949f75494

Replace write_fmt with write! Latter is simpler

view details

Dániel Buga

commit sha b2c5f99883bf7ba348c9e9c03e7592b18ef59665

Add test for issue #34634

view details

est31

commit sha 812ff668032e5feb8cd702ecd9f4b5be21513f10

Use const_cstr macro in consts.rs

view details

est31

commit sha c2dad1c6b9f9636198d7c561b47a2974f5103f6d

Remove unused static_assert macro

view details

Mara Bos

commit sha 5ef1db3622c373883571868cbdafbfbd568cddcb

Revert adding Atomic::from_mut. This made too many assumptions about platforms, breaking some things. Will need to be added later with a better way of gating on proper alignment, without hardcoding cfg(target_arch)s.

view details

Alexis Bourget

commit sha 08b85a6fc88b4c7b5e02742b5df825b62e168f81

use iter:: before free functions

view details

push time in 8 days

delete branch ssomers/rust

delete branch : btree_extra_test

delete time in 8 days

push eventssomers/rust

Stein Somers

commit sha 46b21a74021a32284c1bf6d5bfadee19517254a4

BTreeMap: consider leaf nodes to have empty edges

view details

push time in 8 days

delete branch ssomers/rust

delete branch : btree_NodeTypeTraits_experiment

delete time in 8 days

push eventssomers/rust

CDirkx

commit sha 518f1ccb728aa03665e51710c12973a74cc98df5

Stabilize some Result methods as const Stabilize the following methods of `Result` as const: - `is_ok` - `is_err` - `as_ref` Possible because of stabilization of #49146 (Allow if and match in constants).

view details

Christiaan Dirkx

commit sha 787b2707a77fa1a98f512a4905662a1a16daf13c

Move const tests for `Result` to `library\core` Part of #76268

view details

David Wood

commit sha f8376b59d1391a5191a561c44067355f1a99c7c0

shim: monomorphic `FnPtrShim`s during construction This commit adjusts MIR shim construction so that substitutions are applied to function pointer shims during construction, rather than during codegen (as determined by `substs_for_mir_body`) - as substitutions will no longer occur during codegen, function pointer shims can now be polymorphic without incurring double substitutions. Signed-off-by: David Wood <david@davidtw.co>

view details

Camelid

commit sha fd79ed42254d7483569ccc48ef35a79635ed5881

Add docs for `BasicBlock`

view details

Camelid

commit sha a872ec47145ce3a82c39bedaca21b99e867d9be2

Clarify how branching works in a CFG

view details

Stein Somers

commit sha 176956c115c2b797471a3f59eef3e17789229007

Test and fix Sync & Send traits of BTreeMap artefacts

view details

Camelid

commit sha c051f61d3c078343db70e355feea808892deed75

Improve wording Co-authored-by: Joshua Nelson <joshua@yottadb.com>

view details

khyperia

commit sha 21b0c1286a1f01cb8a21bda0973833ca11889364

Extract some intrinsics out of rustc_codegen_llvm A significant amount of intrinsics do not actually need backend-specific behaviors to be implemented, instead relying on methods already in rustc_codegen_ssa. So, extract those methods out to rustc_codegen_ssa, so that each backend doesn't need to reimplement the same code.

view details

Joshua Nelson

commit sha c35ce3ff170333d11ccf89e75dc87c49f44a570a

Don't generate bootstrap usage unless it's needed Previously, `x.py` would unconditionally run `x.py build` to get the help message. After https://github.com/rust-lang/rust/issues/76165, when checking the CI stage was moved into `Config`, that would cause an assertion failure (but only only in CI!): ``` thread 'main' panicked at 'assertion failed: `(left == right)` left: `1`, right: `2`', src/bootstrap/config.rs:619:49 ``` This changes bootstrap to only generate a help message when it needs to (when someone passes `--help`).

view details

Jethro Beekman

commit sha 1d2290ffb0f8f85c8de56c17e6be748d84dcfb04

Update LLVM

view details

Matthias Krüger

commit sha 94dae6004035c356b00dac8764c1b4808d740928

simplfy condition in ItemLowerer::with_trait_impl_ref()

view details

Camelid

commit sha 57eb29cd2dc30c47b613ced135422a4120bc6a78

Update based on review suggestions

view details

Ivan Tham

commit sha b7c8bea6cbf0aff4cbb36b127edc0bb4c66c4cf9

Fix wording in mir doc

view details

Hanif Bin Ariffin

commit sha f4a7149f499a4b91d296678002f0bce4ded85038

Don't compile regex at every function call. Use `SyncOnceCell` to only compile it once. I believe this still adds some kind of locking mechanism?

view details

est31

commit sha b47913962097874257ad10227b943ef7af85d49f

Remove intrinsics::arith_offset use from libarena The use of arith_offset was added in 803e9ae67b770d8500c4ab5862e988d29118356a before the stable wrapper of the intrinsic was available. https://doc.rust-lang.org/stable/std/intrinsics/fn.arith_offset.html

view details

est31

commit sha 4fe6ca37898bcd65488764f2679e27c936879ade

Replace const_generics feature gate with min_const_generics The latter is on the path to stabilization.

view details

est31

commit sha ebdea011436dfea810ff1bbd827636ac75f6f092

Remove redundant #![feature(...)] 's from compiler/

view details

Bastian Kauschke

commit sha 5f58e00ca565c8964dbf89f510236f72951d0bab

fix array_windows docs

view details

Matthias Krüger

commit sha 012974da7ad3737b296af4a401dfed2e8dcc22df

use strip_prefix over starts_with and manual slicing based on pattern length (clippy::manual_strip)

view details

Bastian Kauschke

commit sha 764d307963db8c50a47a9828a4c2eeea74d54007

docs `array` -> `slice` Co-authored-by: est31 <est31@users.noreply.github.com>

view details

push time in 9 days

push eventssomers/rust

Marcel Hellwig

commit sha 00d537dcd03f9ff5ebdf8b86e039dbdb0a7f850c

deny(unsafe_op_in_unsafe_fn) in libstd/path.rs

view details

David Wood

commit sha 0f2bd56b29857453835e47abbe96a80b175632d1

lint/ty: move fns to avoid abstraction violation This commit moves `transparent_newtype_field` and `is_zst` to `LateContext` where they are used, rather than being on the `VariantDef` and `TyS` types. Signed-off-by: David Wood <david@davidtw.co>

view details

CDirkx

commit sha 518f1ccb728aa03665e51710c12973a74cc98df5

Stabilize some Result methods as const Stabilize the following methods of `Result` as const: - `is_ok` - `is_err` - `as_ref` Possible because of stabilization of #49146 (Allow if and match in constants).

view details

Christiaan Dirkx

commit sha 787b2707a77fa1a98f512a4905662a1a16daf13c

Move const tests for `Result` to `library\core` Part of #76268

view details

Scott McMurray

commit sha 6092828d1f432bb313818e7cfab961c0e494f69e

Add `[T; N]: TryFrom<Vec<T>>` This is very similar to the existing `Box<[T; N]>: TryFrom<Box<[T]>>`, but allows avoiding the `shrink_to_fit` if you have a vector and not a boxed slice.

view details

David Wood

commit sha f8376b59d1391a5191a561c44067355f1a99c7c0

shim: monomorphic `FnPtrShim`s during construction This commit adjusts MIR shim construction so that substitutions are applied to function pointer shims during construction, rather than during codegen (as determined by `substs_for_mir_body`) - as substitutions will no longer occur during codegen, function pointer shims can now be polymorphic without incurring double substitutions. Signed-off-by: David Wood <david@davidtw.co>

view details

kadmin

commit sha 6cb671628393e292d5e68e6367f80488ace46532

Add test for checking if-let or-patterns

view details

scottmcm

commit sha 2c8a4c8f73e8b36e72b15e7f97ef29ad36c15e17

Nightly is currently 1.48

view details

Ivan Tham

commit sha 685f04220ee584f00f60e5ff9d7aca16351c5399

Clean up vec benches bench_in_place style

view details

scottmcm

commit sha 3d89ee9586354e736cfe4a472d8aaa507d10f77c

Typo fix Thanks, Amanieu Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>

view details

Ralf Jung

commit sha caeb5544ecd9dba4d67b68b8c1b32d8132c6d5f2

do not inline black_box when building for Miri

view details

Ralf Jung

commit sha 4b5cd544d1268df8f95424a7dc77ce6c852bac56

use black_box instead of local optimziation barriers in const tests where possible

view details

Ralf Jung

commit sha 47668edb64ed1f8676cfcb4c9ccb6fe018f660c5

Separate feature flags Co-authored-by: Ivan Tham <pickfire@riseup.net>

view details

Ralf Jung

commit sha 284b16913aa6fccdf7b14edc3bb2693aadd39919

add missing feature flag

view details

Mara Bos

commit sha daa62d9081bfeeb0f438f88eb69082c227a5c221

Add as_str() and AsRef to string::Drain.

view details

Mara Bos

commit sha 673284058b53992cfd66c04b9db8e551a0dc9996

Show remaining data in string::Drain's Debug impl.

view details

Mara Bos

commit sha f5bb523e94b431c35b495b6ad6ae94495b653a5f

Add AsRef<[u8]> for String's Drain.

view details

Mara Bos

commit sha f2a32909e0649eb589406ddac63597ba34273c95

Mark AsRef impls for String's Drain as stable. Trait implementations effectively can't be #[unstable].

view details

Mara Bos

commit sha 829019d4043a6e9dd1305113f43b30fc8415893d

Disable AsRef implementations for String's Drain. Since trait implementations cannot be unstable, we should only add them when the as_str feature gets stabilized. Until then, only `.as_str()` is available (behind a feature gate).

view details

Ralf Jung

commit sha 91f7d761e762d0d9f47cf61cf5d942fd93eaf2a8

also assert ScalarMaybeUninit size

view details

push time in 9 days

Pull request review commentrust-lang/rust

BtreeMap: refactoring around edges

 impl<'a, K, V, Type> NodeRef<marker::Mut<'a>, K, V, Type> {         unsafe { self.reborrow_mut().into_val_mut_at(idx) }     } -    fn keys_mut(&mut self) -> &mut [K] {+    fn keys_mut(&mut self) -> &mut [K]+    where+        K: 'a,+        V: 'a,

The need for this bound is created by inlining into_key_slice_mut, but don't ask me why.

ssomers

comment created time in 9 days

PullRequestReviewEvent

PR opened rust-lang/rust

BtreeMap: refactoring around edges

Parts chipped off a more daring effort, that the btree benchmarks judge to be performance-neutral.

r? @Mark-Simulacrum

+103 -97

0 comment

2 changed files

pr created time in 9 days

delete branch ssomers/rust

delete branch : btree_cleanup_2

delete time in 9 days

delete branch ssomers/rust

delete branch : btree_send_sync

delete time in 9 days

delete branch ssomers/rust

delete branch : btree_cleanup_1

delete time in 9 days

create barnchssomers/rust

branch : btree_cleanup_3

created branch time in 9 days

PR opened rust-lang/rust

BTreeMap: extra testing & fixed comments

r? @Mark-Simulacrum

+25 -6

0 comment

2 changed files

pr created time in 9 days

create barnchssomers/rust

branch : btree_extra_test

created branch time in 9 days

push eventssomers/rust

Marcel Hellwig

commit sha 00d537dcd03f9ff5ebdf8b86e039dbdb0a7f850c

deny(unsafe_op_in_unsafe_fn) in libstd/path.rs

view details

David Wood

commit sha 0f2bd56b29857453835e47abbe96a80b175632d1

lint/ty: move fns to avoid abstraction violation This commit moves `transparent_newtype_field` and `is_zst` to `LateContext` where they are used, rather than being on the `VariantDef` and `TyS` types. Signed-off-by: David Wood <david@davidtw.co>

view details

Scott McMurray

commit sha 6092828d1f432bb313818e7cfab961c0e494f69e

Add `[T; N]: TryFrom<Vec<T>>` This is very similar to the existing `Box<[T; N]>: TryFrom<Box<[T]>>`, but allows avoiding the `shrink_to_fit` if you have a vector and not a boxed slice.

view details

kadmin

commit sha 6cb671628393e292d5e68e6367f80488ace46532

Add test for checking if-let or-patterns

view details

scottmcm

commit sha 2c8a4c8f73e8b36e72b15e7f97ef29ad36c15e17

Nightly is currently 1.48

view details

Ivan Tham

commit sha 685f04220ee584f00f60e5ff9d7aca16351c5399

Clean up vec benches bench_in_place style

view details

scottmcm

commit sha 3d89ee9586354e736cfe4a472d8aaa507d10f77c

Typo fix Thanks, Amanieu Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>

view details

Ralf Jung

commit sha caeb5544ecd9dba4d67b68b8c1b32d8132c6d5f2

do not inline black_box when building for Miri

view details

Ralf Jung

commit sha 4b5cd544d1268df8f95424a7dc77ce6c852bac56

use black_box instead of local optimziation barriers in const tests where possible

view details

Ralf Jung

commit sha 47668edb64ed1f8676cfcb4c9ccb6fe018f660c5

Separate feature flags Co-authored-by: Ivan Tham <pickfire@riseup.net>

view details

Ralf Jung

commit sha 284b16913aa6fccdf7b14edc3bb2693aadd39919

add missing feature flag

view details

Mara Bos

commit sha daa62d9081bfeeb0f438f88eb69082c227a5c221

Add as_str() and AsRef to string::Drain.

view details

Mara Bos

commit sha 673284058b53992cfd66c04b9db8e551a0dc9996

Show remaining data in string::Drain's Debug impl.

view details

Mara Bos

commit sha f5bb523e94b431c35b495b6ad6ae94495b653a5f

Add AsRef<[u8]> for String's Drain.

view details

Mara Bos

commit sha f2a32909e0649eb589406ddac63597ba34273c95

Mark AsRef impls for String's Drain as stable. Trait implementations effectively can't be #[unstable].

view details

Mara Bos

commit sha 829019d4043a6e9dd1305113f43b30fc8415893d

Disable AsRef implementations for String's Drain. Since trait implementations cannot be unstable, we should only add them when the as_str feature gets stabilized. Until then, only `.as_str()` is available (behind a feature gate).

view details

Ralf Jung

commit sha 91f7d761e762d0d9f47cf61cf5d942fd93eaf2a8

also assert ScalarMaybeUninit size

view details

Matthias Krüger

commit sha f567287f9f35e4d4781213bddc5770e270f48d0a

don't convert types to the same type with try_into (clippy::useless_conversion)

view details

Alistair Francis

commit sha de0d55cb3c197b13d90922c8998bf90399f3b8a2

library/panic_unwind: Add UNWIND_DATA_REG for RISC-V 32-bit Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

view details

Alistair Francis

commit sha 84fe26c4d33924d2195af4324f036b64709baba2

library/std: linux: Add support for RISC-V 32-bit Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

view details

push time in 10 days

Pull request review commentrust-lang/rust

BTreeMap: wrap node's raw parent pointer in NonNull

 impl<BorrowType, K, V, Type> NodeRef<BorrowType, K, V, Type> {     ) -> Result<Handle<NodeRef<BorrowType, K, V, marker::Internal>, marker::Edge>, Self> {         // We need to use raw pointers to nodes because, if BorrowType is marker::ValMut,         // there might be outstanding mutable references to values that we must not invalidate.-        let parent_as_leaf = unsafe { (*self.as_leaf_ptr()).parent as *const LeafNode<K, V> };-        if let Some(non_zero) = NonNull::new(parent_as_leaf as *mut _) {+        let leaf_ptr = self.as_leaf_ptr();+        if let &Some(non_zero) = &unsafe { (*leaf_ptr).parent } {

Also straigthened out the conversions to usize.

ssomers

comment created time in 10 days

PullRequestReviewEvent

Pull request review commentrust-lang/rust

BTreeMap: wrap node's raw parent pointer in NonNull

 impl<BorrowType, K, V, Type> NodeRef<BorrowType, K, V, Type> {     ) -> Result<Handle<NodeRef<BorrowType, K, V, marker::Internal>, marker::Edge>, Self> {         // We need to use raw pointers to nodes because, if BorrowType is marker::ValMut,         // there might be outstanding mutable references to values that we must not invalidate.-        let parent_as_leaf = unsafe { (*self.as_leaf_ptr()).parent as *const LeafNode<K, V> };-        if let Some(non_zero) = NonNull::new(parent_as_leaf as *mut _) {+        let leaf_ptr = self.as_leaf_ptr();+        if let &Some(non_zero) = &unsafe { (*leaf_ptr).parent } {

How about this fancy one?

ssomers

comment created time in 10 days

PullRequestReviewEvent

push eventssomers/rust

Stein Somers

commit sha 0661b0a36d483dfb7041a3526b07eeec2b67b2d0

BTreeMap: wrap node's raw parent pointer in NonNull

view details

push time in 10 days

Pull request review commentrust-lang/rust

BTreeMap: wrap node's raw parent pointer in NonNull

 impl<BorrowType, K, V, Type> NodeRef<BorrowType, K, V, Type> {     ) -> Result<Handle<NodeRef<BorrowType, K, V, marker::Internal>, marker::Edge>, Self> {         // We need to use raw pointers to nodes because, if BorrowType is marker::ValMut,         // there might be outstanding mutable references to values that we must not invalidate.-        let parent_as_leaf = unsafe { (*self.as_leaf_ptr()).parent as *const LeafNode<K, V> };-        if let Some(non_zero) = NonNull::new(parent_as_leaf as *mut _) {+        let leaf_ptr = self.as_leaf_ptr();+        if let &Some(non_zero) = &unsafe { (*leaf_ptr).parent } {

But then it's moved out of the option. Before this I had: if let Some(non_zero) = unsafe { (*leaf_ptr).parent.as_ref() } {

ssomers

comment created time in 10 days

PullRequestReviewEvent

create barnchssomers/rust

branch : btree_NodeTypeTrait

created branch time in 10 days

PR opened rust-lang/rust

BTreeMap: wrap node's raw parent pointer in NonNull

Now that the other *const (root) is gone, seemed like a small step forward.

r? @Mark-Simulacrum

+13 -13

0 comment

1 changed file

pr created time in 10 days

create barnchssomers/rust

branch : btree_cleanup_2

created branch time in 10 days

PR opened rust-lang/rust

BTreeMap: code readability tweaks

Gathered over the past months

r? @Mark-Simulacrum

+7 -7

0 comment

3 changed files

pr created time in 10 days

push eventssomers/rust

Stein Somers

commit sha c6a8cfbde848352271ee143fe5d458dcac7c397f

BTreeMap: code readability tweaks

view details

push time in 10 days

create barnchssomers/rust

branch : btree_cleanup_1

created branch time in 10 days

delete branch ssomers/rust

delete branch : btree_testing_74834

delete time in 10 days

delete branch ssomers/rust

delete branch : btree_fix_74762

delete time in 10 days

delete branch ssomers/rust

delete branch : btree_respect_min_len_easy

delete time in 10 days

delete branch ssomers/rust

delete branch : btree_fix_75257_standalone

delete time in 10 days

delete branch ssomers/rust

delete branch : btree_cleanup_4

delete time in 10 days

push eventssomers/rust

Stein Somers

commit sha 40d58258c832a549605d6d4447438a5f0a17d781

BTreeMap: generalize the type of edge

view details

push time in 11 days

push eventssomers/rust

Marcel Hellwig

commit sha 73e27b3e18dcbbef3a36620c4a44306e2bbdcd13

deny(unsafe_op_in_unsafe_fn) in libstd/process.rs

view details

Ivan Tham

commit sha a7468705cbf0fb551b8b1d8b420123262f7d92b2

Use translated variable for test string Test should be educative, added english translation and pronounciation.

view details

Ivan Tham

commit sha ba4c4988161abbe58e973b792c7e271785b4bc4d

Add more info for Vec Drain doc See its documentation for more

view details

Ivan Tham

commit sha 71484121001b69aefdc41fd7192b7095250517a7

Vec slice example fix style and show type elision

view details

CDirkx

commit sha ea5dc0909ea1ed4135f1bdecbaa3423051be578d

Make some Ordering methods const Constify the following methods of `core::cmp::Ordering`: - `reverse` - `then` Stabilizes these methods as const under the `const_ordering` feature. Also adds a test for these methods in a const context. Possible because of #49146 (Allow `if` and `match` in constants).

view details

Howard Su

commit sha a80d39041e2d5cd58a846c9ef9e01ee9d691a7ed

Use inline(never) instead of cold inline(never) is better way to avoid optimizer to inline the function instead of cold.

view details

Christiaan Dirkx

commit sha 79d563c819483eaf6e67b6aaaef9d0ca6030337d

Move const tests for `Ordering` to `library\core` Part of #76268

view details

Tomasz Miąsko

commit sha b54386ab7a9da8a4f22db3a35a9ec7b0f2b98b6c

Detect overflow in proc_macro_server subspan

view details

Tomasz Miąsko

commit sha d98bac4e4e3cc87ec9b848c173d570ebe2aa30b6

Add tests for overflow in Vec::drain

view details

Tomasz Miąsko

commit sha f8cfb2f5ad847b871399dfef9b8b8ff4e84a75cb

Add tests for overflow in String / VecDeque operations using ranges

view details

Ayush Kumar Mishra

commit sha 941dca8ed238a04a55741127165e9ad80671ed8a

Add Arith Tests in Library

view details

Ayush Kumar Mishra

commit sha dc37b553accd4fb2f8d0c59f69c701b524361cc2

Minor refactoring

view details

Ayush Kumar Mishra

commit sha 7d834c87d2ebb3d8dd4895bc5fabc4d44a1d2b52

Move Various str tests in library

view details

Jens Reidel

commit sha 78097d96828c16a259fa9b5c2430e8d9ff1820b3

initial attempt to add aarch64-unknown-linux-musl to dist-linux-arm

view details

Michael Howell

commit sha d85db82960db80132a10d25e0fe7dfd5f4736d0f

Add documentation for `impl<T> From<T> for Poll<T>`

view details

Michael Howell

commit sha 8b0d0a0cadbaaf0e7f4114e289a71981872c8587

Add documentation for `impl<T> From<BinaryHeap<T>> for Vec<T>`

view details

Aaron Hill

commit sha d18b4bb7a735add53cad717fd96ec5f4b89d752d

Note when a a move/borrow error is caused by a deref coercion Fixes #73268 When a deref coercion occurs, we may end up with a move error if the base value has been partially moved out of. However, we do not indicate anywhere that a deref coercion is occuring, resulting in an error message with a confusing span. This PR adds an explicit note to move errors when a deref coercion is involved. We mention the name of the type that the deref-coercion resolved to, as well as the `Deref::Target` associated type being used.

view details

aticu

commit sha 1c1bb1309f5b2e15438711b701f6ab59f04fd633

Improve E0118 description

view details

Joshua Nelson

commit sha 85ab152be78ffaf7dd97f60ececceda28f4e4802

Update bootstrap readme - Reflect changes in x.py defaults - Remove recommendation to use nightly for incremental; it works fine on beta - Remove note that incremental chooses stage 1 by default; stage 1 is already the default - Update Discord -> Zulip

view details

Ralf Jung

commit sha c32127675a4a4b3fdf23d06602187accf584b687

move guaranteed{ne,eq} implementation to compile-time machine

view details

push time in 11 days

push eventssomers/rust

Stein Somers

commit sha 75b323ce3f23a4bc97e30c7ba942ed395a3952e7

BTreeMap: generalize the type of edge

view details

push time in 11 days

push eventssomers/rust

Marcel Hellwig

commit sha 73e27b3e18dcbbef3a36620c4a44306e2bbdcd13

deny(unsafe_op_in_unsafe_fn) in libstd/process.rs

view details

Ivan Tham

commit sha a7468705cbf0fb551b8b1d8b420123262f7d92b2

Use translated variable for test string Test should be educative, added english translation and pronounciation.

view details

Ivan Tham

commit sha ba4c4988161abbe58e973b792c7e271785b4bc4d

Add more info for Vec Drain doc See its documentation for more

view details

Ivan Tham

commit sha 71484121001b69aefdc41fd7192b7095250517a7

Vec slice example fix style and show type elision

view details

CDirkx

commit sha ea5dc0909ea1ed4135f1bdecbaa3423051be578d

Make some Ordering methods const Constify the following methods of `core::cmp::Ordering`: - `reverse` - `then` Stabilizes these methods as const under the `const_ordering` feature. Also adds a test for these methods in a const context. Possible because of #49146 (Allow `if` and `match` in constants).

view details

Howard Su

commit sha a80d39041e2d5cd58a846c9ef9e01ee9d691a7ed

Use inline(never) instead of cold inline(never) is better way to avoid optimizer to inline the function instead of cold.

view details

Christiaan Dirkx

commit sha 79d563c819483eaf6e67b6aaaef9d0ca6030337d

Move const tests for `Ordering` to `library\core` Part of #76268

view details

Tomasz Miąsko

commit sha b54386ab7a9da8a4f22db3a35a9ec7b0f2b98b6c

Detect overflow in proc_macro_server subspan

view details

Tomasz Miąsko

commit sha d98bac4e4e3cc87ec9b848c173d570ebe2aa30b6

Add tests for overflow in Vec::drain

view details

Tomasz Miąsko

commit sha f8cfb2f5ad847b871399dfef9b8b8ff4e84a75cb

Add tests for overflow in String / VecDeque operations using ranges

view details

Ayush Kumar Mishra

commit sha 941dca8ed238a04a55741127165e9ad80671ed8a

Add Arith Tests in Library

view details

Ayush Kumar Mishra

commit sha dc37b553accd4fb2f8d0c59f69c701b524361cc2

Minor refactoring

view details

Ayush Kumar Mishra

commit sha 7d834c87d2ebb3d8dd4895bc5fabc4d44a1d2b52

Move Various str tests in library

view details

Jens Reidel

commit sha 78097d96828c16a259fa9b5c2430e8d9ff1820b3

initial attempt to add aarch64-unknown-linux-musl to dist-linux-arm

view details

Michael Howell

commit sha d85db82960db80132a10d25e0fe7dfd5f4736d0f

Add documentation for `impl<T> From<T> for Poll<T>`

view details

Michael Howell

commit sha 8b0d0a0cadbaaf0e7f4114e289a71981872c8587

Add documentation for `impl<T> From<BinaryHeap<T>> for Vec<T>`

view details

Aaron Hill

commit sha d18b4bb7a735add53cad717fd96ec5f4b89d752d

Note when a a move/borrow error is caused by a deref coercion Fixes #73268 When a deref coercion occurs, we may end up with a move error if the base value has been partially moved out of. However, we do not indicate anywhere that a deref coercion is occuring, resulting in an error message with a confusing span. This PR adds an explicit note to move errors when a deref coercion is involved. We mention the name of the type that the deref-coercion resolved to, as well as the `Deref::Target` associated type being used.

view details

aticu

commit sha 1c1bb1309f5b2e15438711b701f6ab59f04fd633

Improve E0118 description

view details

Joshua Nelson

commit sha 85ab152be78ffaf7dd97f60ececceda28f4e4802

Update bootstrap readme - Reflect changes in x.py defaults - Remove recommendation to use nightly for incremental; it works fine on beta - Remove note that incremental chooses stage 1 by default; stage 1 is already the default - Update Discord -> Zulip

view details

Ralf Jung

commit sha c32127675a4a4b3fdf23d06602187accf584b687

move guaranteed{ne,eq} implementation to compile-time machine

view details

push time in 11 days

delete branch ssomers/rust

delete branch : btree_slice_slasher_returns

delete time in 12 days

push eventssomers/rust

Stein Somers

commit sha 97f062563c555b3e29768b2a04ad7bea28b04d0b

Move up other members of the trait

view details

push time in 12 days

pull request commentrust-lang/rust

BTreeMap: avoid slices even more

More timeouts, if you ask me. [ERROR] ncurses: download failed.

ssomers

comment created time in 12 days

push eventssomers/rust

Stein Somers

commit sha efd63b30188339b8467dc5cb8196ff9a2f96b327

from_box

view details

Stein Somers

commit sha d5dc4fd21b4d2dc43f23a65279674b7fede5c9c9

Reach the right definition of Node.

view details

push time in 12 days

push eventssomers/rust

Stein Somers

commit sha 3ca5b6b6bdfd5dcc9a47efa4fa2183ea379d1651

First step towards generalizing the type of edge

view details

Stein Somers

commit sha 93f407a5de94cc382fca0bee0a0ce7829ee9e2ef

Second step towards generalizing the type of edge

view details

push time in 13 days

push eventssomers/rust

Ivan Tham

commit sha 2b7f87b5fa43336ed1237747f60fd9095a41ea3d

Liballoc tweak use *const T instead of *const i8 *const T is also used in the same parts and also used for arith_offset.

view details

Ivan Tham

commit sha cc0d6345500932e8118ba65e98944a6a3bac3277

Liballoc IntoIter limit unsafe to pointer arithmethic

view details

Ivan Tham

commit sha 50315238aa8ffae08f29b260aa36511e03b5e070

Liballoc DoubleEndedIterator limit unsafe to pointer arithmethic

view details

Yoshua Wuyts

commit sha 688f4471fd553c83ae3ff0306956d89b7d7c2d28

Stabilize future readiness fns

view details

Jethro Beekman

commit sha 0b5e681f5af0d3989b49121969f09cf29f029263

Improve SGX RWLock initializer test

view details

Tomasz Miąsko

commit sha 9daf8fd5b1d369cd2f91ac919dc5d17f4fd43c0c

inliner: Emit storage markers for introduced arg temporaries When introducing argument temporaries during inlining, emit storage marker statements just before the assignment and in the beginning of the return block. This ensures that such temporaries will not be considered live across yield points after inlining inside a generator.

view details

Bastian Kauschke

commit sha ccf1f580812b25eda231d4f2ac2e20c445fe7b62

rustdoc: fix min_const_generics with ty::Param

view details

Tomasz Miąsko

commit sha 01510612ee20d14a3397427891a4042a34d53956

NRVO: Allow occurrences of the return place in var debug info The non-use occurrence of the return place in var debug info does not currently inhibit NRVO optimization, but it will fail assertion in `visit_place` when optimization is performed. Relax assertion check to allow the return place in var debug info. This case might be impossible to hit in optimization pipelines as of now, but can be encountered in customized mir-opt-level=2 pipeline with copy propagation disabled. For example in: ``` pub fn b(s: String) -> String { a(s) } #[inline] pub fn a(s: String) -> String { let x = s; let y = x; y } ```

view details

Josh Stone

commit sha f6a6d2fef6c090806e961acb89817be8329f8208

Add slice::array_chunks_mut

view details

Josh Stone

commit sha b9fd6734e8ce315f0825157c0bf3aad67521e664

Add tests for array_chunks_mut

view details

Josh Stone

commit sha 864a28e01d70cd73ef7f0b64f6793697f638b8b0

Re-export ArrayChunksMut in alloc

view details

Josh Stone

commit sha 21903532eee96a5311d08b8a9e9cc9f9231bc478

Build the slice directly in array_chunks_mut Review discussion found that the concern about aliasing was overblown, so we can simplify this to cast from one slice to another directly.

view details

Josh Stone

commit sha 86b9f710d0c90068866e736bbbb7b89ac93ff2e6

Move ArrayChunksMut::get_unchecked per #73565

view details

Joshua Nelson

commit sha 3797f29aadb51ed038e8b9eaf1b2098cfa26d547

[WIP] give better errors for broken intra doc links

view details

Joshua Nelson

commit sha f45e7b586259b795babf49231cd7de4a4534a2e7

Update .stderr

view details

Joshua Nelson

commit sha 4ace4e75201d5bfc187bd40cf918cd2df6009419

Use fewer `.to_string()`s

view details

Joshua Nelson

commit sha fcb21999a7989792c9405a89e9c788ac143e0574

Report if the thing exists in another namespace

view details

Joshua Nelson

commit sha 42bed035001b9a0bd6282326a243a926ea3d0424

Pass on the DefId so rustdoc can name it in suggestions Look at this beauty: ```rust error: unresolved link to `S::h` --> intra-link-errors.rs:51:6 | 51 | /// [type@S::h] | ^^^^^^^^^ help: to link to the associated function, use its disambiguator: `S::h()` | = note: this link resolves to the associated function `h`, which is not in the type namespace ```

view details

Joshua Nelson

commit sha f4e6ebd11aaea9fc412d78371fd3060468625056

Fix tests and improve error message if `::` isn't found

view details

Joshua Nelson

commit sha 002d3a922c06c11a45e001d2737951a00e40687a

Don't give misleading errors for `f::A`, where f is in the value namespace

view details

push time in 13 days

pull request commentrust-lang/rust

BTreeMap: avoid slices even more

The btree benchmarks of mutable behaviour rely heavily on push to implement clone and seem happy:

 name                                        old ns/iter  new ns/iter  diff ns/iter   diff %  speedup
 btree::map::clone_slim_100_and_clear        2,526        2,020                -506  -20.03%   x 1.25
 btree::map::clone_slim_100_and_drain_all    3,859        3,345                -514  -13.32%   x 1.15
 btree::map::clone_slim_100_and_drain_half   3,293        2,773                -520  -15.79%   x 1.19
 btree::map::clone_slim_100_and_into_iter    2,575        1,953                -622  -24.16%   x 1.32
 btree::map::clone_slim_100_and_pop_all      3,669        3,130                -539  -14.69%   x 1.17
 btree::map::clone_slim_100_and_remove_all   4,496        3,983                -513  -11.41%   x 1.13
 btree::map::clone_slim_100_and_remove_half  3,346        2,797                -549  -16.41%   x 1.20
 btree::map::find_seq_10_000                 38           40                      2    5.26%   x 0.95
 btree::map::range_included_excluded         422,740      449,350            26,610    6.29%   x 0.94
 btree::map::range_included_included         426,430      464,617            38,187    8.96%   x 0.92
 btree::set::is_subset_100_vs_10k            1,164        1,242                  78    6.70%   x 0.94
ssomers

comment created time in 14 days

PR opened rust-lang/rust

BTreeMap: avoid slices even more

Epilogue to #73971: it seems the compiler is unable to realize that creating a slice and get_unchecked-ing one element is a simple fetch. So try to spell it out for the only remaining but often invoked case.

Also, the previous code doesn't seem fair game to me, using get_unchecked to reach beyond the end of a slice. Although the local function slice_insert also does that.

r? @Mark-Simulacrum

+29 -16

0 comment

1 changed file

pr created time in 14 days

push eventssomers/rust

Stein Somers

commit sha 378b64392f5bdbcffbdc6506b00b6bfcfcd46d73

BTreeMap: avoid slices even more

view details

push time in 14 days

push eventssomers/rust

Pietro Albini

commit sha 730c68ead5b7597a4aced20670b76203d6549c58

Rollup merge of #75996 - tinaun:patch-2, r=jonas-schievink fix wording in release notes C-like enums are still allowed to impl drop, you just can't cast them to numbers

view details

Pietro Albini

commit sha 35496c266713a8fa00f17df7d14bb85bc4e933e7

Rollup merge of #75998 - richkadel:llvm-coverage-map-gen-6b.1, r=wesleywiser Add InstrProfilingPlatformFuchsia.c to profiler_builtins All other Platform files included in `llvm-project/compiler-rt` were present, except Fuchsia. Now that there is a functional end-to-end version of `-Zinstrument-coverage`, I need to start building and testing coverage-enabled Rust programs on Fuchsia, and this file is required. r? @tmandry FYI, @wesleywiser

view details

Pietro Albini

commit sha 0106ad4e27389671bbf411ab6cdf8faa926ce0ae

Rollup merge of #76000 - richkadel:llvm-coverage-map-gen-6b.2, r=wesleywiser Adds --bless support to test/run-make-fulldeps The ability to "bless" output for some of these tests is critical to making it practical to adapt tests to unrelated changes. This is needed for new coverage tests, as shown in PR #76004 . r? @tmandry FYI: @wesleywiser

view details

Ryan Levick

commit sha 8bcc4d617869f190c9f7fc0c301e8328f719d85a

Switch to asm! macro and use brk instruction on ARM

view details

Hirochika Matsumoto

commit sha 5574182b4d2d08c848a88a1ac5633fc194e0465e

Add a new lint to prevent `create_dir` from being used

view details

Hirochika Matsumoto

commit sha 607905d126c55422668007737c22d7a7a89c0d57

Add STD_FS_CREATE_DIR into paths

view details

bors

commit sha 3e3c552605180d739eb6c23bc657121679caa456

Auto merge of #76019 - pietroalbini:rollup-1tkgdnd, r=pietroalbini Rollup of 12 pull requests Successful merges: - #75330 (Improve rendering of crate features via doc(cfg)) - #75927 (Use intra-doc links in `core::macros`) - #75941 (Clean up E0761 explanation) - #75943 (Fix potential UB in align_offset doc examples) - #75946 (Error use explicit intra-doc link and fix text) - #75955 (Use intra-doc links in `core::future::future` and `core::num::dec2flt`) - #75967 (Fix typo in `std::hint::black_box` docs) - #75972 (Fix ICE due to carriage return w/ multibyte char) - #75989 (Rename rustdoc/test -> rustdoc/doctest) - #75996 (fix wording in release notes) - #75998 (Add InstrProfilingPlatformFuchsia.c to profiler_builtins) - #76000 (Adds --bless support to test/run-make-fulldeps) Failed merges: r? @ghost

view details

Hirochika Matsumoto

commit sha 34e302e67c08c9b97d58d062ea83cc1fd860c56e

Fix clippy error

view details

Hirochika Matsumoto

commit sha eebd2483654456e332d7cf53218b56b9cbd6f2f5

Fix errors

view details

Guillaume Gomez

commit sha 4b8ebbcc5af91decccf6153c7c0ab3075a3e391e

Clean up rustdoc front-end source code

view details

Ivan Tham

commit sha 2d6ab122b7fc4dc94912ec174082cd71c43ea557

Liballoc extend use intra doc link

view details

bors

commit sha 3d0b0e66afdfaa519d8855b338b35b4605775945

Auto merge of #5774 - ThibsG:FixNewRetNoSelf, r=ebroto Fix FP in `new_ret_no_self`: trigger in trait def instead of impl block Lint in trait def instead of impl block. Fixes: #5435 changelog: none

view details

bors

commit sha c88c6149415dd47b5f05e69d7307e0a1967c33f2

Auto merge of #5970 - ebroto:changelog_beta_1_47, r=flip1995 Update changelog to beta 1.47 [Rendered](https://github.com/ebroto/rust-clippy/blob/changelog_beta_1_47/CHANGELOG.md) changelog: none

view details

Josh Triplett

commit sha 8b501e33e5b873b66bc421cc142d4c7430d8f005

Disable ninja on the dry-run builder

view details

Denis Vasilik

commit sha 4bbed523208edf9521373498579ad63b22849a69

Use intra-doc links

view details

Denis Vasilik

commit sha c7571e60402adac4bf1b1ffa67f963a4a3f7d8b9

Use intra-doc links for bool

view details

Ryan Levick

commit sha 9e2228d2d07c77b8323a3f3e1bf82badddd7bfec

Back to opcode for 32 bit ARM __fastfail

view details

Camelid

commit sha 7be129e53a8dd2bb84fe99a9e4406099fd181eb0

Add missing hyphen reference counted pointer -> reference-counted pointer

view details

flip1995

commit sha adc7351fb027494ede35d6d3abd7ca02a11c33ce

Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup

view details

flip1995

commit sha 282c59820b8e1d8c76f440484b81a190c576f91b

Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup

view details

push time in 14 days

create barnchssomers/rust

branch : btree_slice_slasher_returns

created branch time in 14 days

pull request commentrust-lang/rust

Test and fix Send and Sync traits of BTreeMap artefacts

Also got more fine grained testing to compile and added newcomers into_keys and into_values.

r= @Mark-Simulacrum

ssomers

comment created time in 15 days

push eventssomers/rust

Stein Somers

commit sha 176956c115c2b797471a3f59eef3e17789229007

Test and fix Sync & Send traits of BTreeMap artefacts

view details

push time in 15 days

PR opened rust-lang/rust

Test and fix Send and Sync traits of BTreeMap artefacts

Fixes #76686.

I'm not quite sure what all this implies. E.g. comparing with the definitions for NodeRef in node.rs, maybe an extra bound T: 'a is useful for something. The test compiles on stable/beta (apart from drain_filter) so I bet Sync is equally desirable.

r? @Mark-Simulacrum

+25 -0

0 comment

2 changed files

pr created time in 15 days

create barnchssomers/rust

branch : btree_send_sync

created branch time in 15 days

create barnchssomers/rust

branch : btree_NodeTypeTraits_experiment

created branch time in 17 days

delete branch ssomers/rust

delete branch : btree_no_root_in_noderef

delete time in 19 days

pull request commentrust-lang/rust

BTreeMap: move up reference to map's root from NodeRef

fixed the state corruption when using mem::forget on #74762

Except that this state corruption was lightweight, and occurred even without involving mem::forget, because I messed up the implementation of the drop handler and it never did any post-processing.

ssomers

comment created time in 20 days

pull request commentrust-lang/rust

BTreeMap: move up reference to map's root from NodeRef

we resolved the leak amplification in a separate PR, right?

It's not what I understand is meant with "leak amplification", but in the end #75257 fixed the state corruption when using mem::forget on #74762, which is a split-off part of an initial version of this PR. Since then, and in the final version of this PR, the drop handler does nothing more than before, so there cannot be corruption and there is no leak at all.

That said, as Ralf reminded us, the drop handler does exist. It needs to exist to make m.drain_filter(|_, _| true);, without iterating over the drained elements, actually do anything. Obviously if you grab the iterator and mem::forget it, it will not drain any (more) elements (and not corrupt nor leak anything). Therefore, this is semi-official code to efficiently drain the first N elements of a map and any future attempt to introduce post-processing for DrainFilter (like the initial commit here and #74762) is a breaking change. Or, to turn this around, it would be better to implement leak amplification anyway to stop people from exploiting this.

ssomers

comment created time in 20 days

pull request commentrust-lang/rust

BTreeMap: move up reference to map's root from NodeRef

Rebased the 577a229 commit without checking much.

@RalfJung I suppose labels work like you write, but not everyone involved here seems to agree - I was suggested to set the label 3 times I remember (like here and here).

ssomers

comment created time in 20 days

pull request commentrust-lang/rust

Improve btree's unwrap_unchecked

Can't reopen so another 5 digit issue number sacrificed.

ssomers

comment created time in 20 days

PR opened rust-lang/rust

Document btree's unwrap_unchecked

#74693's second wind

r? @Mark-Simulacrum

+3 -0

0 comment

1 changed file

pr created time in 20 days

push eventssomers/rust

Guillaume Gomez

commit sha 9c254c18d6d32a15879cc7f57e3039b66a481340

Update how doc examples are counted

view details

Guillaume Gomez

commit sha d108bd53866aef2a3b76164352c095e898fe92db

Add documentation for --show-coverage option

view details

Guillaume Gomez

commit sha 5e9cc4e31920b72fe4f1c4a44d1a6e250e36f254

fmt

view details

Camelid

commit sha 5a307cf4bbf3cb6065b43472ab99c1dd4fdc72e5

Fix intra-doc links One of the original links was linking to the wrong thing as well. Co-authored-by: Joshua Nelson <joshua@yottadb.com>

view details

Alexis Bourget

commit sha fb3f9271311cedcc75ec45c385305e3e66f8959e

Move to intra doc links for std::thread documentation

view details

bors

commit sha e15510ca33ea15c893b78710101c962b11459963

Auto merge of #75494 - matthewjasper:defer-recursive-projection-error, r=nikomatsakis Don't immediately error for cycles during normalization #73452 meant some normalization cycles could be detected earlier, breaking some code. This PR makes defers errors for normalization cycles to fulfillment, fixing said code. Fixes #74868 r? @nikomatsakis

view details

bors

commit sha 410461191393e2339e79b33fa8baf4650b905db0

Auto merge of #5928 - mikerite:fix-5924, r=ebroto Fix false positive in `PRECEDENCE` lint Extend the lint to handle chains of methods combined with unary negation. Closes #5924 changelog: Fix false negative in `PRECEDENCE` lint

view details

LeSeulArtichaut

commit sha 1ababd87942dd3f62d6abc5fa1833fce2d5b88eb

Use intra-doc-links in `alloc`

view details

Dr. Koutheir Attouchi

commit sha 6fca004ba9645b2c1d4a51ddbbac0c89dd2133d5

Another motivation for CFG: return-oriented programming

view details

bors

commit sha d9d4d39612aae0b8398340bd83d592cafad8e4ec

Auto merge of #73565 - matthewjasper:core-min-spec, r=nagisa Use min_specialization in libcore Getting `TrustedRandomAccess` to work is the main interesting thing here. - `get_unchecked` is now an unstable, hidden method on `Iterator` - The contract for `TrustedRandomAccess` is made clearer in documentation - Fixed a bug where `Debug` would create aliasing references when using the specialized zip impl - Added tests for the side effects of `next_back` and `nth`. closes #68536

view details

Josh Triplett

commit sha 574f6bed62a205c743737c6b13e925a04a3de6bb

Switch to Snappy compression for metadata

view details

Tomasz Miąsko

commit sha 3b995ccc3f3b8e13af53f4bfc7bff072ee77169a

Extend normalization in const-eval-query-stack test Builds with debuginfo have additional information in backtrace.

view details

Lzu Tao

commit sha c4c017a18487145cd5fdcfda741acc6a2a00bef7

Suppress "const" prefix of FnDef in MIR dump

view details

bors

commit sha ff5e0f1dc8c5534406169903b3b9da029d3bada5

Auto merge of #74846 - Aaron1011:fix/pat-token-capture, r=petrochenkov Capture tokens for Pat used in macro_rules! argument This extends PR #73293 to handle patterns (Pat). Unlike expressions, patterns do not support custom attributes, so we only need to capture tokens during macro_rules! argument parsing.

view details

Michael Wright

commit sha 11efd75aeb8637bd5444104a57f1051b86c0d62b

Fix false negative in `option_as_ref_deref`

view details

bors

commit sha b51651ae9d0161967617be930415705b2e4d5faf

Auto merge of #75642 - matklad:lexer-comments, r=petrochenkov Move doc comment parsing to rustc_lexer Plain comments are trivia, while doc comments are not, so it feels like this belongs to the rustc_lexer. The specific reason to do this is the desire to use rustc_lexer in rustdoc for syntax highlighting, without duplicating "is this a doc comment?" logic there. r? @ghost

view details

Dr. Koutheir Attouchi

commit sha 5673b0e49219291acfb1c52f0c3119d266ef5ce9

Switched ROP link to Desktop layout instead of mobile layout

view details

Guillaume Gomez

commit sha 10a880d20e2593c3e67e38469604a88733586c17

Improve wording

view details

Yuki Okushi

commit sha f2d25538d4fad07dd2ded520de968dbb85e84aa9

Rollup merge of #75324 - ericseppanen:master, r=JohnTitor clarify documentation of remove_dir errors remove_dir will error if the path doesn't exist or isn't a directory. It's useful to clarify that this is "remove dir or fail" not "remove dir if it exists". I don't think this belongs in the title. "Removes an existing, empty directory" is strangely worded-- there's no such thing as a non-existing directory. Better to just say explicitly it will return an error.

view details

Yuki Okushi

commit sha 87c22f487134079cfe0294e0287f5536d8d8a67c

Rollup merge of #75532 - tmiasko:rfc-1014, r=nikomatsakis Fix RFC-1014 test Use two printlns when testing that writing to a closed stdout does not panic. Otherwise the test is ineffective, since the current implementation silently ignores the error during first println regardless.

view details

push time in 20 days

delete branch ssomers/rust

delete branch : slice_slasher

delete time in 20 days

more