tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

lib.rs (2145B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
      4 
      5 /**
      6 ```
      7 extern crate malloc_size_of;
      8 extern crate servo_arc;
      9 
     10 fn sizeable<T: malloc_size_of::MallocSizeOf>() {}
     11 fn shallow_sizeable<T: malloc_size_of::MallocShallowSizeOf>() {}
     12 fn cloneable<T: Clone>() {}
     13 
     14 fn main() {
     15    cloneable::<servo_arc::Arc<i32>>();
     16    cloneable::<std::sync::Arc<i32>>();
     17    cloneable::<std::rc::Rc<i32>>();
     18 }
     19 ```
     20 */
     21 pub fn imports_ok() {}
     22 
     23 pub mod does_not_impl_malloc_size_of {
     24    /**
     25    ```compile_fail,E0277
     26    extern crate malloc_size_of;
     27    extern crate servo_arc;
     28 
     29    fn sizeable<T: malloc_size_of::MallocSizeOf>() {}
     30 
     31    fn main() {
     32        sizeable::<servo_arc::Arc<i32>>();
     33    }
     34    ```
     35    */
     36    pub fn servo_arc() {}
     37 
     38    /**
     39    ```compile_fail,E0277
     40    extern crate malloc_size_of;
     41 
     42    fn sizeable<T: malloc_size_of::MallocSizeOf>() {}
     43 
     44    fn main() {
     45        sizeable::<std::sync::Arc<i32>>();
     46    }
     47    ```
     48    */
     49    pub fn std_arc() {}
     50 
     51    /**
     52    ```compile_fail,E0277
     53    extern crate malloc_size_of;
     54 
     55    fn sizeable<T: malloc_size_of::MallocSizeOf>() {}
     56 
     57    fn main() {
     58        sizeable::<std::rc::Rc<i32>>();
     59    }
     60    ```
     61    */
     62    pub fn rc() {}
     63 }
     64 
     65 pub mod does_not_impl_malloc_shallow_size_of {
     66    /**
     67    ```compile_fail,E0277
     68    extern crate malloc_size_of;
     69    extern crate servo_arc;
     70 
     71    fn shallow_sizeable<T: malloc_size_of::MallocShallowSizeOf>() {}
     72 
     73    fn main() {
     74        shallow_sizeable::<servo_arc::Arc<i32>>();
     75    }
     76    ```
     77    */
     78    pub fn servo_arc() {}
     79 
     80    /**
     81    ```compile_fail,E0277
     82    extern crate malloc_size_of;
     83 
     84    fn shallow_sizeable<T: malloc_size_of::MallocShallowSizeOf>() {}
     85 
     86    fn main() {
     87        shallow_sizeable::<std::sync::Arc<i32>>();
     88    }
     89    ```
     90    */
     91    pub fn std_arc() {}
     92 
     93    /**
     94    ```compile_fail,E0277
     95    extern crate malloc_size_of;
     96 
     97    fn shallow_sizeable<T: malloc_size_of::MallocShallowSizeOf>() {}
     98 
     99    fn main() {
    100        shallow_sizeable::<std::rc::Rc<i32>>();
    101    }
    102    ```
    103    */
    104    pub fn rc() {}
    105 }