Lines Matching defs:default
1120 b.iter(|| (0..LEN).map(|_| u32::default()).collect::<Vec<_>>());
3665 fn default() -> Self {
3682 let arr: [WeirdBorrow; 3] = Default::default();
4939 use std::default::Default;
4942 let s: S = Default::default();
9647 // Sort in default order.
10396 let v: $ty = Default::default();
11017 // Set default panic hook again.
11083 // Matching slices using default binding modes (&):
11092 // Matching slices using default binding modes (&mut):
11129 // Matching arrays by default binding modes (&):
11138 // Matching arrays by default binding modes (&mut):
13012 // default formatters should work
14024 // the default implementations in libstd (`__rdl_alloc` etc. in `library/std/src/alloc.rs`)
14043 /// if there is one, or the `std` crate’s default.
14059 /// if there is one, or the `std` crate’s default.
14093 /// if there is one, or the `std` crate’s default.
14111 /// if there is one, or the `std` crate’s default.
14129 /// if there is one, or the `std` crate’s default.
14343 // default implementations below (`__rdl_oom`) otherwise.
14354 /// The default behavior of this function is to print a message to standard error
14409 default unsafe fn write_clone_into_raw(&self, target: *mut Self) {
18183 fn default() -> String {
18445 default fn to_string(&self) -> String {
19218 #[stable(feature = "default", since = "1.11.0")]
19223 /// Creates an owned Cow<'a, B> with the default value for the contained owned value.
19224 fn default() -> Self {
19225 Owned(<B as ToOwned>::Owned::default())
19350 //! default global allocator. It is not compatible with the libc allocator API.
19505 //! Shared references in Rust disallow mutation by default, and [`Rc`]
20856 default fn from_slice(v: &[T]) -> Self {
20959 /// let x: Rc<i32> = Default::default();
20963 fn default() -> Rc<T> {
20964 Rc::new(Default::default())
20977 default fn eq(&self, other: &Rc<T>) -> bool {
20982 default fn ne(&self, other: &Rc<T>) -> bool {
21391 default fn to_rc_slice(self) -> Rc<[T]> {
21415 // The default implementation would collect into a vec which would panic.
21839 /// let empty: Weak<i64> = Default::default();
21842 fn default() -> Weak<T> {
22039 //! * [`.iter`] and [`.iter_mut`] are the explicit methods to return the default
22145 default fn to_vec<A: Allocator>(s: &[Self], alloc: A) -> Vec<Self, A> {
23201 /// waker, it should override this method. By default, it clones the
23340 /// Shared references in Rust disallow mutation by default, and `Arc` is no
23352 /// [`Rc<T>`] for lower overhead. [`Rc<T>`] is a safe default, because the
24508 default fn from_slice(v: &[T]) -> Self {
25257 /// let empty: Weak<i64> = Default::default();
25260 fn default() -> Weak<T> {
25318 default fn eq(&self, other: &Arc<T>) -> bool {
25322 default fn ne(&self, other: &Arc<T>) -> bool {
25534 /// let x: Arc<i32> = Default::default();
25537 fn default() -> Arc<T> {
25538 Arc::new(Default::default())
25732 default fn to_arc_slice(self) -> Arc<[T]> {
25756 // The default implementation would collect into a vec which would panic.
25935 //! The default [fill/alignment](#fillalignment) for non-numerics is a space and
25937 //! default for numeric formatters is also a space character but with right-alignment. If
25964 //! default, and the negative sign is only printed by default for signed values.
27318 fn default() -> Self {
28625 default fn spec_extend(&mut self, iter: I) {
31767 fn default() -> BTreeMap<K, V> {
33340 fn default() -> BTreeSet<T> {
35155 /// Ensures a value is in the entry by inserting the default if empty, and returns
35169 pub fn or_insert(self, default: V) -> &'a mut V {
35172 Vacant(entry) => entry.insert(default),
35176 /// Ensures a value is in the entry by inserting the result of the default function if empty,
35192 pub fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a mut V {
35195 Vacant(entry) => entry.insert(default()),
35199 /// Ensures a value is in the entry by inserting, if empty, the result of the default function.
35200 /// This method allows for generating key-derived values for insertion by providing the default
35219 pub fn or_insert_with_key<F: FnOnce(&K) -> V>(self, default: F) -> &'a mut V {
35223 let value = default(entry.key());
35284 /// Ensures a value is in the entry by inserting the default value if empty,
35300 Vacant(entry) => entry.insert(Default::default()),
37218 v.entry(Default::default())
37222 match v.entry(Default::default()) {
37229 match v.entry(Default::default()) {
37287 v.entry(Default::default())
37291 match v.entry(Default::default()) {
37298 match v.entry(Default::default()) {
40422 /// The "default" usage of this type as a queue is to use [`push_back`] to add to
40502 fn default() -> VecDeque<T> {
42473 /// buf.resize_with(5, Default::default);
44597 fn default() -> BinaryHeap<T> {
45809 default fn spec_extend(&mut self, iter: I) {
46153 default fn spec_extend(&mut self, iter: I) {
46162 default fn spec_extend(&mut self, iterator: I) {
46208 default fn spec_extend(&mut self, iterator: I) {
46234 default fn from_elem<A: Allocator>(elem: Self, n: usize, alloc: A) -> Vec<Self, A> {
46453 default fn from_iter(mut iterator: I) -> Self {
46586 /// | Iterator (default)----------+ | | Iterator (default) |
46601 default fn from_iter(iterator: I) -> Self {
46640 default fn from_iter(iterator: I) -> Self {
46691 default fn from_iter(mut iterator: I) -> Self {
46773 default fn collect_in_place(&mut self, dst_buf: *mut T, end: *const T) -> usize {
47091 /// (as defined by the allocator Rust is configured to use by default), and its
48688 /// pass [`Default::default`] as the second argument.
48694 /// vec.resize_with(5, Default::default);
48962 // This code generalizes `extend_with_{element,default}`.
48981 Default::default()
48984 Default::default()
49076 default unsafe fn spec_extend_from_within(&mut self, src: Range<usize>) {
49484 fn default() -> Vec<T> {
51181 fn default() -> Self {
51182 box T::default()
51188 fn default() -> Self {
51195 fn default() -> Self {
51196 unsafe { from_boxed_utf8_unchecked(Default::default()) }
51670 default fn last(self) -> Option<I::Item> {
51681 /// instead of the default.