Lines Matching defs:case

6883     fn case(a: Vec<i32>, b: Vec<i32>) {
6888 case(vec![], vec![]);
6889 case(vec![1], vec![1]);
6890 case(vec![1, 1], vec![1]);
6891 case(vec![1, 2, 3], vec![1, 2, 3]);
6892 case(vec![1, 1, 2, 3], vec![1, 2, 3]);
6893 case(vec![1, 2, 2, 3], vec![1, 2, 3]);
6894 case(vec![1, 2, 3, 3], vec![1, 2, 3]);
6895 case(vec![1, 1, 2, 2, 2, 3, 3], vec![1, 2, 3]);
6900 fn case(a: Vec<i32>, b: Vec<i32>) {
6905 case(vec![], vec![]);
6906 case(vec![10], vec![10]);
6907 case(vec![10, 11], vec![10]);
6908 case(vec![10, 20, 30], vec![10, 20, 30]);
6909 case(vec![10, 11, 20, 30], vec![10, 20, 30]);
6910 case(vec![10, 20, 21, 30], vec![10, 20, 30]);
6911 case(vec![10, 20, 30, 31], vec![10, 20, 30]);
6912 case(vec![10, 11, 20, 21, 22, 30, 31], vec![10, 20, 30]);
8236 v.extend(std::iter::once(3).filter(|_| true)); // base case
11433 // would be a failure case.
12938 for case in 0..(1 << len) {
12941 if case & (1 << bit) != 0 {
13730 // don't use 0 in the data -- we want to catch the zeroed-out case.
13809 /// This test might give a false positive in case the box realocates, but the alocator keeps the
14649 /// `Unique::dangling()` if `capacity == 0` or `T` is zero-sized. In the former case, you must
14952 // an extra guard for this in case we're running on a platform which can use
15297 /// the case, this function returns a [`String`] instead of modifying the
15323 /// Languages without case are not changed:
15382 /// the case, this function returns a [`String`] instead of modifying the
15395 /// Scripts without case are not changed:
15474 /// ASCII upper case equivalent.
15504 /// ASCII lower case equivalent.
16322 /// `example_func` takes anything that implements the trait. In this case Rust
16342 /// `example_func(&*example_string);`. In this case we are dereferencing a
19712 //! // In this case we know the allocation still exists, so we simply
20313 /// restrictions apply in this case.
20523 /// This is trivially the case if no such pointers exist,
21346 /// ## The general case
21348 /// In the general case, collecting into `Rc<[T]>` is done by first
21398 // This is the case for a `TrustedLen` iterator.
22200 /// This sort is stable (i.e., does not reorder equal elements) and *O*(*n* \* log(*n*)) worst-case.
22235 /// This sort is stable (i.e., does not reorder equal elements) and *O*(*n* \* log(*n*)) worst-case.
22290 /// worst-case, where the key function is *O*(*m*).
22333 /// worst-case, where the key function is *O*(*m*).
22342 /// which combines the fast average case of randomized quicksort with the fast worst case of
22347 /// In the worst case, the algorithm allocates temporary storage in a `Vec<(K, usize)>` the
22608 /// is mapped to its ASCII upper case equivalent.
22625 /// is mapped to its ASCII lower case equivalent.
22999 /// The invariants ensure that the total running time is *O*(*n* \* log(*n*)) worst-case.
24084 /// restrictions apply in this case.
24551 // However we need to guard against massive refcounts in case someone
24637 // dropped. Worst case, we end up allocated a new Arc unnecessarily.
24721 /// This is trivially the case if no such pointers exist,
25094 // Relaxed is fine for the failure case because we don't have any expectations about the new state.
25095 // Acquire is necessary for the success case to synchronise with `Arc::new_cyclic`, when the inner
25096 // value can be initialized after `Weak` references have already been created. In that case, we
25232 // running this code in that case).
25687 /// ## The general case
25689 /// In the general case, collecting into `Arc<[T]>` is done by first
25739 // This is the case for a `TrustedLen` iterator.
26009 //! in this case, if one uses the format string `{<arg>:<spec>.*}`, then the `<arg>` part refers
26114 //! * `x?` ⇒ [`Debug`] with lower-case hexadecimal integers
26115 //! * `X?` ⇒ [`Debug`] with upper-case hexadecimal integers
29591 /// pair of bounds for continuing the search in the child nodes, in case
35017 // special case with maximum height.
37626 // special case with maximum height.
39085 /// sibling and than its right sibling, if they exist. In that case,
41235 // * Any slice passed to `drop_in_place` is valid; the second case has
41237 // `begin <= back.len()` in the first case
41935 // - special case when tail is 0
42153 // - special case when elements are technically contiguous,
42583 // case. While we probably want to change this it
43522 // Capacity 15 should be large enough to cover every case.
43562 // insertion position is tested. Capacity 15 should be large enough to cover every case.
43690 // Another test case for #79808, taken from #80293.
43706 // removal position is tested. Capacity 15 should be large enough to cover every case.
43839 // is tested. Capacity 15 should be large enough to cover every case.
43871 // split position is tested. Capacity 15 should be large enough to cover every case.
44302 //! // In case of a tie we compare positions - this step is necessary
44445 /// // We can use peek to look at the next item in the heap. In this case,
44672 /// If the item is modified then the worst case time complexity is *O*(log(*n*)),
44697 /// The worst case cost of `pop` on a heap containing *n* elements is *O*(log(*n*)).
44735 /// ascending order. In the worst case, elements are pushed in ascending
44739 /// The worst case cost of a *single* call to `push` is *O*(*n*). The worst case
44936 // and about 2 * self.len() comparisons in the worst case
44938 // and about 1 * tail_len * log_2(start) comparisons in the worst case,
44964 // The only case when !(n < self.len()) is if
45131 /// Cost is *O*(1) in the worst case.
46163 // This is the case for a TrustedLen iterator.
46455 // expanded on this iteration in every case when the iterable is not
46608 // A common case is passing a vector into a function which immediately
47068 /// the general case, and can be correctly manipulated in primitive ways
47082 /// types inside a `Vec`, it will not allocate space for them. *Note that in this case
47125 /// * It would penalize the general case, incurring an additional branch
47149 /// (as is the case for the [`vec!`] macro), then a `Vec<T>` can be converted to
47159 /// this a side-effect that must be preserved. There is one case which we will
47715 // they are equal, so we can avoid the panic case in `RawVec::shrink_to_fit`
47831 // case avoids creating an invalid slice, and
47833 // such that no value will be dropped twice in case `drop_in_place`
48554 // set self.vec length's to start, to be safe in case Drain is leaked
49014 // Increment the length in every step in case next() panics
49300 // This is the case for a general iterator.