File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 3
3
//! This module defines the `Closure` type which is used to pass "owned
4
4
//! closures" from Rust to JS. Some more details can be found on the `Closure`
5
5
//! type itself.
6
- //!
7
- //! The `nightly` feature is required for the `Closure` type to be used.
8
6
9
7
use std:: cell:: UnsafeCell ;
10
8
#[ cfg( feature = "nightly" ) ]
@@ -89,6 +87,10 @@ impl<T> Closure<T>
89
87
///
90
88
/// This is unfortunately pretty restrictive for now but hopefully some of
91
89
/// these restrictions can be lifted in the future!
90
+ ///
91
+ /// *This method requires the `nightly` feature of the `wasm-bindgen` crate
92
+ /// to be enabled, meaning this is a nightly-only API. Users on stable
93
+ /// should use `Closure::wrap`.*
92
94
#[ cfg( feature = "nightly" ) ]
93
95
pub fn new < F > ( t : F ) -> Closure < T >
94
96
where F : Unsize < T > + ' static
You can’t perform that action at this time.
0 commit comments