|
| 1 | +lazy_static::lazy_static! { |
| 2 | +static ref CONFIG_NAME_REGEX: regex::Regex = |
| 3 | +regex::Regex::new(r"^## `([^`]+)`").expect("Failed creating configuration pattern"); |
| 4 | +static ref CONFIG_VALUE_REGEX: regex::Regex = regex::Regex::new(r#"^#### `"?([^`"]+)"?`"#) |
| 5 | +.expect("Failed creating configuration value pattern"); |
| 6 | +} |
| 7 | + |
| 8 | +// We need to be able to format `lazy_static::lazy_static!` without known syntax. |
| 9 | +lazy_static::lazy_static!(xxx, yyyy, zzzzz); |
| 10 | + |
| 11 | +lazy_static::lazy_static! {} |
| 12 | + |
| 13 | +// #2354 |
| 14 | +lazy_static::lazy_static! { |
| 15 | +pub static ref Sbase64_encode_string : :: lisp :: LispSubrRef = { |
| 16 | +let subr = :: remacs_sys :: Lisp_Subr { |
| 17 | +header : :: remacs_sys :: Lisp_Vectorlike_Header { |
| 18 | +size : ( |
| 19 | +( :: remacs_sys :: PseudovecType :: PVEC_SUBR as :: libc :: ptrdiff_t ) << :: |
| 20 | +remacs_sys :: PSEUDOVECTOR_AREA_BITS ) , } , function : self :: |
| 21 | +Fbase64_encode_string as * const :: libc :: c_void , min_args : 1i16 , |
| 22 | +max_args : 2i16 , symbol_name : ( b"base64-encode-string\x00" ) . as_ptr ( ) |
| 23 | +as * const :: libc :: c_char , intspec : :: std :: ptr :: null ( ) , doc : :: |
| 24 | +std :: ptr :: null ( ) , lang : :: remacs_sys :: Lisp_Subr_Lang_Rust , } ; |
| 25 | +unsafe { |
| 26 | +let ptr = :: remacs_sys :: xmalloc ( |
| 27 | +:: std :: mem :: size_of :: < :: remacs_sys :: Lisp_Subr > ( ) ) as * mut :: |
| 28 | +remacs_sys :: Lisp_Subr ; :: std :: ptr :: copy_nonoverlapping ( |
| 29 | +& subr , ptr , 1 ) ; :: std :: mem :: forget ( subr ) ; :: lisp :: ExternalPtr |
| 30 | +:: new ( ptr ) } } ; } |
| 31 | + |
| 32 | +lazy_static::lazy_static! { |
| 33 | +static ref FOO: HashMap<String, |
| 34 | +(&'static str, |
| 35 | +fn(Foo) -> Result<Box<Bar>, Either<FooError, BarError>> |
| 36 | +),> = HashMap::new(); |
| 37 | +} |
0 commit comments