Home
last modified time | relevance | path

Searched refs:borrow (Results 1 – 25 of 219) sorted by relevance

123456789

/third_party/rust/crates/rustix/tests/path/
Darg.rs6 use std::borrow::Cow;
13 use std::borrow::Borrow; in test_arg()
18 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg()
19 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg()
24 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg()
25 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg()
30 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg()
31 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg()
36 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg()
37 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg()
[all …]
/third_party/rust/crates/lazycell/src/
Dlib.rs101 self.borrow().is_some() in filled()
109 pub fn borrow(&self) -> Option<&T> { in borrow() method
132 if let Some(value) = self.borrow() { in borrow_with()
139 self.borrow().unwrap() in borrow_with()
170 if let Some(value) = self.borrow() { in try_borrow_with()
177 Ok(self.borrow().unwrap()) in try_borrow_with()
225 LazyCell { inner: UnsafeCell::new(self.borrow().map(Clone::clone) ) } in clone()
298 pub fn borrow(&self) -> Option<&T> { in borrow() method
335 self.borrow().map_or( in clone()
357 let value = lazycell.borrow(); in test_borrow_from_empty()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/marl/src/
Dpool_test.cpp42 pool.borrow(); in TEST_P()
52 pool.borrow(); in TEST_P()
62 pool.borrow(); in TEST_P()
72 pool.borrow(); in TEST_P()
99 auto loan = pool.borrow(); in TEST_P()
106 auto loan = pool.borrow(); in TEST_P()
120 auto loan = pool.borrow(); in TEST_P()
127 auto loan = pool.borrow(); in TEST_P()
141 auto loan = pool.borrow(); in TEST_P()
149 auto loan = pool.borrow(); in TEST_P()
[all …]
/third_party/rust/crates/regex/tests/
Dreplace.rs155 t!(std::borrow::Cow::<'_, str>::Borrowed("Z")),
163 t!(&std::borrow::Cow::<'_, str>::Borrowed("Z")),
171 t!(std::borrow::Cow::<'_, str>::Owned("Z".to_string())),
179 t!(&std::borrow::Cow::<'_, str>::Owned("Z".to_string())),
204 bytes!(std::borrow::Cow::<'_, [u8]>::Borrowed(&[b'Z'])),
212 bytes!(&std::borrow::Cow::<'_, [u8]>::Borrowed(&[b'Z'])),
220 bytes!(std::borrow::Cow::<'_, [u8]>::Owned(vec![b'Z'])),
228 bytes!(&std::borrow::Cow::<'_, [u8]>::Owned(vec![b'Z'])),
/third_party/skia/third_party/externals/icu/source/i18n/
Ddouble-conversion-bignum.cpp234 Chunk borrow = 0; in SubtractBignum() local
237 DOUBLE_CONVERSION_ASSERT((borrow == 0) || (borrow == 1)); in SubtractBignum()
238 const Chunk difference = RawBigit(i + offset) - other.RawBigit(i) - borrow; in SubtractBignum()
240 borrow = difference >> (kChunkSize - 1); in SubtractBignum()
242 while (borrow != 0) { in SubtractBignum()
243 const Chunk difference = RawBigit(i + offset) - borrow; in SubtractBignum()
245 borrow = difference >> (kChunkSize - 1); in SubtractBignum()
703 Chunk borrow = 0; in PlusCompare() local
711 if (sum > chunk_c + borrow) { in PlusCompare()
714 borrow = chunk_c + borrow - sum; in PlusCompare()
[all …]
/third_party/icu/vendor/double-conversion/upstream/double-conversion/
Dbignum.cc220 Chunk borrow = 0; in SubtractBignum() local
223 DOUBLE_CONVERSION_ASSERT((borrow == 0) || (borrow == 1)); in SubtractBignum()
224 const Chunk difference = RawBigit(i + offset) - other.RawBigit(i) - borrow; in SubtractBignum()
226 borrow = difference >> (kChunkSize - 1); in SubtractBignum()
228 while (borrow != 0) { in SubtractBignum()
229 const Chunk difference = RawBigit(i + offset) - borrow; in SubtractBignum()
231 borrow = difference >> (kChunkSize - 1); in SubtractBignum()
689 Chunk borrow = 0; in PlusCompare() local
697 if (sum > chunk_c + borrow) { in PlusCompare()
700 borrow = chunk_c + borrow - sum; in PlusCompare()
[all …]
/third_party/flutter/skia/third_party/externals/icu/source/i18n/
Ddouble-conversion-bignum.cpp234 Chunk borrow = 0; in SubtractBignum() local
237 ASSERT((borrow == 0) || (borrow == 1)); in SubtractBignum()
238 Chunk difference = bigits_[i + offset] - other.bigits_[i] - borrow; in SubtractBignum()
240 borrow = difference >> (kChunkSize - 1); in SubtractBignum()
242 while (borrow != 0) { in SubtractBignum()
243 Chunk difference = bigits_[i + offset] - borrow; in SubtractBignum()
245 borrow = difference >> (kChunkSize - 1); in SubtractBignum()
666 Chunk borrow = 0; in PlusCompare() local
674 if (sum > chunk_c + borrow) { in PlusCompare()
677 borrow = chunk_c + borrow - sum; in PlusCompare()
[all …]
/third_party/icu/icu4c/source/i18n/
Ddouble-conversion-bignum.cpp234 Chunk borrow = 0; in SubtractBignum() local
237 DOUBLE_CONVERSION_ASSERT((borrow == 0) || (borrow == 1)); in SubtractBignum()
238 const Chunk difference = RawBigit(i + offset) - other.RawBigit(i) - borrow; in SubtractBignum()
240 borrow = difference >> (kChunkSize - 1); in SubtractBignum()
242 while (borrow != 0) { in SubtractBignum()
243 const Chunk difference = RawBigit(i + offset) - borrow; in SubtractBignum()
245 borrow = difference >> (kChunkSize - 1); in SubtractBignum()
703 Chunk borrow = 0; in PlusCompare() local
711 if (sum > chunk_c + borrow) { in PlusCompare()
714 borrow = chunk_c + borrow - sum; in PlusCompare()
[all …]
/third_party/node/deps/icu-small/source/i18n/
Ddouble-conversion-bignum.cpp234 Chunk borrow = 0; in SubtractBignum() local
237 DOUBLE_CONVERSION_ASSERT((borrow == 0) || (borrow == 1)); in SubtractBignum()
238 const Chunk difference = RawBigit(i + offset) - other.RawBigit(i) - borrow; in SubtractBignum()
240 borrow = difference >> (kChunkSize - 1); in SubtractBignum()
242 while (borrow != 0) { in SubtractBignum()
243 const Chunk difference = RawBigit(i + offset) - borrow; in SubtractBignum()
245 borrow = difference >> (kChunkSize - 1); in SubtractBignum()
703 Chunk borrow = 0; in PlusCompare() local
711 if (sum > chunk_c + borrow) { in PlusCompare()
714 borrow = chunk_c + borrow - sum; in PlusCompare()
[all …]
/third_party/FreeBSD/contrib/gdtoa/
Dmisc.c533 ULLong borrow, y; local
535 ULong borrow, y; local
565 borrow = 0;
568 y = (ULLong)*xa++ - *xb++ - borrow;
569 borrow = y >> 32 & 1UL;
574 y = *xa++ - borrow;
575 borrow = y >> 32 & 1UL;
581 y = (*xa & 0xffff) - (*xb & 0xffff) - borrow;
582 borrow = (y & 0x10000) >> 16;
583 z = (*xa++ >> 16) - (*xb++ >> 16) - borrow;
[all …]
/third_party/python/Modules/_decimal/libmpdec/
Dbasearith.c165 mpd_uint_t borrow = 0; in _mpd_basesub() local
172 d = u[i] - (v[i] + borrow); in _mpd_basesub()
173 borrow = (u[i] < d); in _mpd_basesub()
174 w[i] = borrow ? d + MPD_RADIX : d; in _mpd_basesub()
177 for (; borrow && i < m; i++) { in _mpd_basesub()
178 d = u[i] - borrow; in _mpd_basesub()
179 borrow = (u[i] == 0); in _mpd_basesub()
180 w[i] = borrow ? MPD_RADIX-1 : d; in _mpd_basesub()
196 mpd_uint_t borrow = 0; in _mpd_basesubfrom() local
203 d = w[i] - (u[i] + borrow); in _mpd_basesubfrom()
[all …]
/third_party/rust/crates/serde/test_suite/tests/
Dtest_borrow.rs6 use std::borrow::Cow;
100 #[serde(borrow)] in test_field_identifier()
109 #[serde(borrow)] in test_field_identifier()
125 #[serde(borrow)] in test_cow()
161 #[serde(borrow)] in test_lifetimes()
175 #[serde(borrow = "'b")] in test_lifetimes()
/third_party/rust/crates/codespan/codespan-reporting/tests/snapshots/
Dterm__same_line__rich_no_color.snap5 error[E0499]: cannot borrow `v` as mutable more than once at a time
9 │ - ---- ^ second mutable borrow occurs here
11 │ │ first mutable borrow occurs here
12 │ first borrow later used by call
Dterm__same_line__rich_color.snap5 {fg:Red bold bright}error[E0499]{bold bright}: cannot borrow `v` as mutable more than once at a tim…
9 …{fg:Blue}│{/} {fg:Blue}-{/} {fg:Blue}----{/} {fg:Red}^{/} {fg:Red}second mutable borrow occurs…
11 {fg:Blue}│{/} {fg:Blue}│{/} {fg:Blue}first mutable borrow occurs here{/}
12 {fg:Blue}│{/} {fg:Blue}first borrow later used by call{/}
/third_party/rust/crates/serde/test_suite/tests/ui/borrow/
Dduplicate_variant.stderr1 error: duplicate serde attribute `borrow`
2 --> tests/ui/borrow/duplicate_variant.rs:8:13
4 8 | #[serde(borrow)]
Dno_lifetimes.stderr1 error: field `s` has no lifetimes to borrow
2 --> tests/ui/borrow/no_lifetimes.rs:5:5
4 5 | / #[serde(borrow)]
Dstruct_variant.stderr1 error: #[serde(borrow)] may only be used on newtype variants
2 --> tests/ui/borrow/struct_variant.rs:8:5
4 8 | / #[serde(borrow)]
/third_party/skia/third_party/externals/swiftshader/third_party/marl/include/marl/
Dpool.h217 MARL_NO_EXPORT inline Loan borrow() const;
224 MARL_NO_EXPORT inline void borrow(size_t count, const F& f) const;
274 typename BoundedPool<T, N, POLICY>::Loan BoundedPool<T, N, POLICY>::borrow() in borrow() function
277 borrow(1, [&](Loan&& loan) { out = std::move(loan); }); in borrow()
283 void BoundedPool<T, N, POLICY>::borrow(size_t n, const F& f) const { in borrow() function
349 MARL_NO_EXPORT inline Loan borrow() const;
356 MARL_NO_EXPORT inline void borrow(size_t n, const F& f) const;
396 Loan<T> UnboundedPool<T, POLICY>::borrow() const { in borrow() function
398 borrow(1, [&](Loan&& loan) { out = std::move(loan); }); in borrow()
404 inline void UnboundedPool<T, POLICY>::borrow(size_t n, const F& f) const { in borrow() function
/third_party/rust/crates/codespan/codespan-reporting/
DCHANGELOG.md103 │ - first borrow later used by call
104 │ ---- first mutable borrow occurs here
105 │ ^ second mutable borrow occurs here
113 │ - ---- ^ second mutable borrow occurs here
115 │ │ first mutable borrow occurs here
116 │ first borrow later used by call
255 │ - first borrow later used by call
258 │ ---- first mutable borrow occurs here
261 │ ^ second mutable borrow occurs here
269 │ - first borrow later used by call
[all …]
/third_party/openssl/crypto/bn/
Dbn_mod.c136 BN_ULONG borrow, carry, ta, tb, mask, *rp; in bn_mod_sub_fixed_top() local
146 for (i = 0, ai = 0, bi = 0, borrow = 0; i < mtop;) { in bn_mod_sub_fixed_top()
152 rp[i] = ta - tb - borrow; in bn_mod_sub_fixed_top()
154 borrow = (ta < tb); in bn_mod_sub_fixed_top()
161 for (i = 0, mask = 0 - borrow, carry = 0; i < mtop; i++) { in bn_mod_sub_fixed_top()
167 borrow -= carry; in bn_mod_sub_fixed_top()
168 for (i = 0, mask = 0 - borrow, carry = 0; i < mtop; i++) { in bn_mod_sub_fixed_top()
Dbn_add.c128 BN_ULONG t1, t2, borrow, *rp; in BN_usub() local
150 borrow = bn_sub_words(rp, ap, bp, min); in BN_usub()
157 t2 = (t1 - borrow) & BN_MASK2; in BN_usub()
159 borrow &= (t1 == 0); in BN_usub()
/third_party/rust/crates/tracing/tracing/src/
Dstdlib.rs31 pub(crate) mod borrow { module
32 pub(crate) use alloc::borrow::*;
33 pub(crate) use core::borrow::*;
/third_party/rust/crates/tracing/tracing-core/src/
Dstdlib.rs31 pub(crate) mod borrow { module
32 pub(crate) use alloc::borrow::*;
33 pub(crate) use core::borrow::*;
/third_party/rust/crates/foreign-types/foreign-types/src/
Dlib.rs256 impl ::std::borrow::ToOwned for $borrowed {
284 impl ::std::borrow::Borrow<$borrowed> for $owned {
286 fn borrow(&self) -> &$borrowed {
/third_party/rust/crates/nom/src/
Dlib.rs401 pub use core::borrow;
405 pub use alloc::{borrow, boxed, string, vec};
423 alloc, borrow, boxed, cmp, collections, convert, fmt, hash, iter, mem, ops, option, result,

123456789