File tree Expand file tree Collapse file tree 2 files changed +9
-17
lines changed
Expand file tree Collapse file tree 2 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,15 @@ impl<'source> Environment<'source> {
8585 /// the default filters, tests and globals loaded. If you do not want any
8686 /// default configuration you can use the alternative
8787 /// [`empty`](Environment::empty) method.
88+ #[ cfg_attr(
89+ not( feature = "serde" ) ,
90+ deprecated(
91+ since = "2.0.4" ,
92+ note = "Attempted to instanciate an environment with serde. Future \
93+ versions of MiniJinja will require enabling the 'serde' feature to use \
94+ serde types. To silence this warning add 'serde' to the list of features of minijinja."
95+ )
96+ ) ]
8897 pub fn new ( ) -> Environment < ' source > {
8998 Environment {
9099 templates : TemplateStore :: new ( TemplateConfig :: new ( Arc :: new (
Original file line number Diff line number Diff line change @@ -246,23 +246,6 @@ pub use self::value::Value;
246246pub use self :: macros:: __context;
247247pub use self :: vm:: State ;
248248
249- // forwards compatibility
250- #[ cfg( not( feature = "serde" ) ) ]
251- const _: ( ) = {
252- #[ deprecated(
253- since = "2.0.4" ,
254- note = "Future versions of MiniJinja will require enabling \
255- the 'serde' feature to use serde types. To silence this warning \
256- add 'serde' to the list of features of minijinja."
257- ) ]
258- #[ allow( unused) ]
259- fn enable_implicit_serde_support ( ) { }
260-
261- fn trigger_warning ( ) {
262- enable_implicit_serde_support ( ) ;
263- }
264- } ;
265-
266249/// This module gives access to the low level machinery.
267250///
268251/// This module is only provided by the `unstable_machinery` feature and does not
You can’t perform that action at this time.
0 commit comments