@@ -15,7 +15,7 @@ use crate::module::{
1515 CommandCallRule , CommandCallRuleBy , CommandOffset , CycleDelegate , Module , ModuleSignature , NgxModule ,
1616 NgxModuleCommands , NgxModuleCtx , PreCycleDelegate ,
1717} ;
18- #[ cfg( feature = "static_ref" ) ]
18+ #[ cfg( static_ref_mut ) ]
1919use crate :: { module:: NgxModuleCommandsRefMut , util:: StaticRefMut } ;
2020use :: core:: marker:: PhantomData ;
2121use std:: ffi:: { c_char, c_void, CStr } ;
@@ -26,14 +26,14 @@ use super::{Merge, MergeConfigError, Request};
2626/// Wrapper of `HttpModule` implementing `Module`.
2727pub struct HttpModuleSkel < M : HttpModule > ( PhantomData < M > ) ;
2828impl < M : HttpModule > Module for HttpModuleSkel < M > {
29- #[ cfg( feature = "static_ref" ) ]
29+ #[ cfg( static_ref_mut ) ]
3030 const SELF : StaticRefMut < NgxModule < Self > > = unsafe { StaticRefMut :: from_mut ( & mut M :: SELF . to_mut ( ) . 0 ) } ;
3131 const NAME : & ' static CStr = M :: NAME ;
3232 const TYPE : ModuleSignature = unsafe { ModuleSignature :: from_ngx_uint ( NGX_HTTP_MODULE as ngx_uint_t ) } ;
3333 type Ctx = ngx_http_module_t ;
34- #[ cfg( feature = "static_ref" ) ]
34+ #[ cfg( static_ref_mut ) ]
3535 const CTX : StaticRefMut < NgxModuleCtx < Self > > = unsafe { StaticRefMut :: from_mut ( & mut M :: SELF . to_mut ( ) . 1 ) } ;
36- #[ cfg( feature = "static_ref" ) ]
36+ #[ cfg( static_ref_mut ) ]
3737 const COMMANDS : NgxModuleCommandsRefMut < Self > = M :: COMMANDS ;
3838
3939 type MasterInitializer = M :: MasterInitializer ;
@@ -47,7 +47,7 @@ pub struct NgxHttpModule<M: HttpModule>(
4747 #[ allow( dead_code) ] NgxModule < HttpModuleSkel < M > > ,
4848 NgxModuleCtx < HttpModuleSkel < M > > ,
4949) ;
50- #[ cfg( feature = "static_ref" ) ]
50+ #[ cfg( static_ref_mut ) ]
5151impl < M : HttpModule > Default for NgxHttpModule < M > {
5252 fn default ( ) -> Self {
5353 Self :: new ( )
@@ -56,7 +56,7 @@ impl<M: HttpModule> Default for NgxHttpModule<M> {
5656
5757impl < M : HttpModule > NgxHttpModule < M > {
5858 /// Construct this type.
59- #[ cfg( feature = "static_ref" ) ]
59+ #[ cfg( static_ref_mut ) ]
6060 pub const fn new ( ) -> Self {
6161 Self ( NgxModule :: new ( ) , unsafe {
6262 NgxModuleCtx :: from_raw ( ngx_http_module_t {
@@ -100,18 +100,18 @@ impl<M: HttpModule> NgxHttpModule<M> {
100100/// Type Alias of `NgxModuleCommands` for `HttpModule`.
101101pub type NgxHttpModuleCommands < M , const N : usize > = NgxModuleCommands < HttpModuleSkel < M > , N > ;
102102/// Type Alias of `NgxModuleCommandsRefMut` for `HttpModule`.
103- #[ cfg( feature = "static_ref" ) ]
103+ #[ cfg( static_ref_mut ) ]
104104pub type NgxHttpModuleCommandsRefMut < M > = NgxModuleCommandsRefMut < HttpModuleSkel < M > > ;
105105
106106/// Type safe interface expressing unique Nginx Http module.
107107pub trait HttpModule : Sized + ' static {
108108 /// Wrapper of static mutable `NgxModule` and `NgxModuleCtx` object expressing this module.
109- #[ cfg( feature = "static_ref" ) ]
109+ #[ cfg( static_ref_mut ) ]
110110 const SELF : StaticRefMut < NgxHttpModule < Self > > ;
111111 /// CStr module name expression.
112112 const NAME : & ' static CStr ;
113113 /// Wrapper of static mutable `NgxHttpModuleCommands` object bound to this module.
114- #[ cfg( feature = "static_ref" ) ]
114+ #[ cfg( static_ref_mut ) ]
115115 const COMMANDS : NgxHttpModuleCommandsRefMut < Self > ;
116116
117117 /// Type deligating `init_master` (not called now).
0 commit comments