mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Make transactional attribute less scope dependent (#7112)
* Make `transactional` attribute less scope dependent The old implementation expected that `frame-support` wasn't imported under a different name. Besides that the pr removes some whitespaces. * Update frame/support/procedural/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -15,9 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// tag::description[]
|
||||
//! Proc macro of Support code for the runtime.
|
||||
// end::description[]
|
||||
|
||||
#![recursion_limit="512"]
|
||||
|
||||
@@ -296,7 +294,7 @@ pub fn construct_runtime(input: TokenStream) -> TokenStream {
|
||||
/// The return type of the annotated function must be `Result`. All changes to storage performed
|
||||
/// by the annotated function are discarded if it returns `Err`, or committed if `Ok`.
|
||||
///
|
||||
/// #Example
|
||||
/// # Example
|
||||
///
|
||||
/// ```nocompile
|
||||
/// #[transactional]
|
||||
@@ -313,5 +311,5 @@ pub fn construct_runtime(input: TokenStream) -> TokenStream {
|
||||
/// ```
|
||||
#[proc_macro_attribute]
|
||||
pub fn transactional(attr: TokenStream, input: TokenStream) -> TokenStream {
|
||||
transactional::transactional(attr, input)
|
||||
transactional::transactional(attr, input).unwrap_or_else(|e| e.to_compile_error().into())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user