Now a REAL lib
This commit is contained in:
1
doc/proc_macro_error/all.html
Normal file
1
doc/proc_macro_error/all.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><meta name="keywords" content="rust, rustlang, rust-lang"><title>List of all items in this crate</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location">Crate proc_macro_error</h2></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">List of all items</span></h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.Diagnostic.html">Diagnostic</a></li><li><a href="struct.SpanRange.html">SpanRange</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.Level.html">Level</a></li></ul><h3 id="Traits">Traits</h3><ul class="traits docblock"><li><a href="trait.DiagnosticExt.html">DiagnosticExt</a></li><li><a href="trait.OptionExt.html">OptionExt</a></li><li><a href="trait.ResultExt.html">ResultExt</a></li></ul><h3 id="Macros">Macros</h3><ul class="macros docblock"><li><a href="macro.abort.html">abort</a></li><li><a href="macro.abort_call_site.html">abort_call_site</a></li><li><a href="macro.diagnostic.html">diagnostic</a></li><li><a href="macro.emit_call_site_error.html">emit_call_site_error</a></li><li><a href="macro.emit_call_site_warning.html">emit_call_site_warning</a></li><li><a href="macro.emit_error.html">emit_error</a></li><li><a href="macro.emit_warning.html">emit_warning</a></li></ul><h3 id="Attribute-Macros">Attribute Macros</h3><ul class="attributes docblock"><li><a href="attr.proc_macro_error.html">proc_macro_error</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="fn.abort_if_dirty.html">abort_if_dirty</a></li><li><a href="dummy/fn.append_dummy.html">dummy::append_dummy</a></li><li><a href="dummy/fn.set_dummy.html">dummy::set_dummy</a></li></ul></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
1
doc/proc_macro_error/attr.proc_macro_error.html
Normal file
1
doc/proc_macro_error/attr.proc_macro_error.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `proc_macro_error` attr in crate `proc_macro_error`."><meta name="keywords" content="rust, rustlang, rust-lang, proc_macro_error"><title>proc_macro_error in proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc attr"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In proc_macro_error</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Attribute Macro <a href="index.html">proc_macro_error</a>::<wbr><a class="attr" href="#">proc_macro_error</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error_attr/lib.rs.html#37">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust attr"><code>#[proc_macro_error]</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
11
doc/proc_macro_error/diagnostic/enum.Level.html
Normal file
11
doc/proc_macro_error/diagnostic/enum.Level.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../proc_macro_error/enum.Level.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../proc_macro_error/enum.Level.html">../../proc_macro_error/enum.Level.html</a>...</p>
|
||||
<script>location.replace("../../proc_macro_error/enum.Level.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
11
doc/proc_macro_error/diagnostic/struct.Diagnostic.html
Normal file
11
doc/proc_macro_error/diagnostic/struct.Diagnostic.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../proc_macro_error/struct.Diagnostic.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../proc_macro_error/struct.Diagnostic.html">../../proc_macro_error/struct.Diagnostic.html</a>...</p>
|
||||
<script>location.replace("../../proc_macro_error/struct.Diagnostic.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
11
doc/proc_macro_error/diagnostic/trait.DiagnosticExt.html
Normal file
11
doc/proc_macro_error/diagnostic/trait.DiagnosticExt.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../proc_macro_error/trait.DiagnosticExt.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../proc_macro_error/trait.DiagnosticExt.html">../../proc_macro_error/trait.DiagnosticExt.html</a>...</p>
|
||||
<script>location.replace("../../proc_macro_error/trait.DiagnosticExt.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
3
doc/proc_macro_error/dummy/fn.append_dummy.html
Normal file
3
doc/proc_macro_error/dummy/fn.append_dummy.html
Normal file
@ -0,0 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Same as [`set_dummy`] but, instead of resetting, appends tokens to the existing dummy (if any). Behaves as `set_dummy` if no dummy is present."><meta name="keywords" content="rust, rustlang, rust-lang, append_dummy"><title>append_dummy in proc_macro_error::dummy - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In proc_macro_error::dummy</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../proc_macro_error/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">proc_macro_error</a>::<wbr><a href="index.html">dummy</a>::<wbr><a class="fn" href="#">append_dummy</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/proc_macro_error/dummy.rs.html#136-146">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn append_dummy(dummy: <a class="struct" href="../../proc_macro2/struct.TokenStream.html" title="struct proc_macro2::TokenStream">TokenStream</a>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Same as <a href="fn.set_dummy.html" title="set_dummy"><code>set_dummy</code></a> but, instead of resetting, appends tokens to the
|
||||
existing dummy (if any). Behaves as <code>set_dummy</code> if no dummy is present.</p>
|
||||
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
4
doc/proc_macro_error/dummy/fn.set_dummy.html
Normal file
4
doc/proc_macro_error/dummy/fn.set_dummy.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Sets dummy token stream which will be appended to `compile_error!(msg);...` invocations in case you’ll emit any errors."><meta name="keywords" content="rust, rustlang, rust-lang, set_dummy"><title>set_dummy in proc_macro_error::dummy - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In proc_macro_error::dummy</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../proc_macro_error/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">proc_macro_error</a>::<wbr><a href="index.html">dummy</a>::<wbr><a class="fn" href="#">set_dummy</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/proc_macro_error/dummy.rs.html#129-132">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn set_dummy(dummy: <a class="struct" href="../../proc_macro2/struct.TokenStream.html" title="struct proc_macro2::TokenStream">TokenStream</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../proc_macro2/struct.TokenStream.html" title="struct proc_macro2::TokenStream">TokenStream</a>></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Sets dummy token stream which will be appended to <code>compile_error!(msg);...</code>
|
||||
invocations in case you’ll emit any errors.</p>
|
||||
<p>See <a href="../index.html#guide">guide</a>.</p>
|
||||
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
106
doc/proc_macro_error/dummy/index.html
Normal file
106
doc/proc_macro_error/dummy/index.html
Normal file
@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Facility to emit dummy implementations (or whatever) in case an error happen."><meta name="keywords" content="rust, rustlang, rust-lang, dummy"><title>proc_macro_error::dummy - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module dummy</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#functions">Functions</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../proc_macro_error/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">proc_macro_error</a>::<wbr><a class="mod" href="#">dummy</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/proc_macro_error/dummy.rs.html#1-150">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Facility to emit dummy implementations (or whatever) in case
|
||||
an error happen.</p>
|
||||
<p><code>compile_error!</code> does not abort a compilation right away. This means
|
||||
<code>rustc</code> doesn’t just show you the error and abort, it carries on the
|
||||
compilation process looking for other errors to report.</p>
|
||||
<p>Let’s consider an example:</p>
|
||||
|
||||
<div class='information'><div class='tooltip ignore'>ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore"><code><span class="kw">use</span> <span class="ident">proc_macro::TokenStream</span>;
|
||||
<span class="kw">use</span> <span class="ident">proc_macro_error</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="kw">trait</span> <span class="ident">MyTrait</span> {
|
||||
<span class="kw">fn</span> <span class="ident">do_thing</span>();
|
||||
}
|
||||
|
||||
<span class="comment">// this proc macro is supposed to generate MyTrait impl</span>
|
||||
<span class="attribute">#[<span class="ident">proc_macro_derive</span>(<span class="ident">MyTrait</span>)]</span>
|
||||
<span class="attribute">#[<span class="ident">proc_macro_error</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">example</span>(<span class="ident">input</span>: <span class="ident">TokenStream</span>) -> <span class="ident">TokenStream</span> {
|
||||
<span class="comment">// somewhere deep inside</span>
|
||||
<span class="macro">abort!</span>(<span class="ident">span</span>, <span class="string">"something's wrong"</span>);
|
||||
|
||||
<span class="comment">// this implementation will be generated if no error happened</span>
|
||||
<span class="macro">quote!</span> {
|
||||
<span class="kw">impl</span> <span class="ident">MyTrait</span> <span class="kw">for</span> #<span class="ident">name</span> {
|
||||
<span class="kw">fn</span> <span class="ident">do_thing</span>() {<span class="comment">/* whatever */</span>}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// ================</span>
|
||||
<span class="comment">// in main.rs</span>
|
||||
|
||||
<span class="comment">// this derive triggers an error</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">MyTrait</span>)]</span> <span class="comment">// first BOOM!</span>
|
||||
<span class="kw">struct</span> <span class="ident">Foo</span>;
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">main</span>() {
|
||||
<span class="ident">Foo::do_thing</span>(); <span class="comment">// second BOOM!</span>
|
||||
}</code></pre></div>
|
||||
<p>The problem is: the generated token stream contains only <code>compile_error!</code>
|
||||
invocation, the impl was not generated. That means user will see two compilation
|
||||
errors:</p>
|
||||
<div class="example-wrap"><pre class="language-text"><code>error: something's wrong
|
||||
--> $DIR/probe.rs:9:10
|
||||
|
|
||||
9 |#[proc_macro_derive(MyTrait)]
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0599]: no function or associated item named `do_thing` found for type `Foo` in the current scope
|
||||
--> src\main.rs:3:10
|
||||
|
|
||||
1 | struct Foo;
|
||||
| ----------- function or associated item `do_thing` not found for this
|
||||
2 | fn main() {
|
||||
3 | Foo::do_thing(); // second BOOM!
|
||||
| ^^^^^^^^ function or associated item not found in `Foo`</code></pre></div>
|
||||
<p>But the second error is meaningless! We definitely need to fix this.</p>
|
||||
<p>Most used approach in cases like this is “dummy implementation” -
|
||||
omit <code>impl MyTrait for #name</code> and fill functions bodies with <code>unimplemented!()</code>.</p>
|
||||
<p>This is how you do it:</p>
|
||||
|
||||
<div class='information'><div class='tooltip ignore'>ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore"><code><span class="kw">use</span> <span class="ident">proc_macro::TokenStream</span>;
|
||||
<span class="kw">use</span> <span class="ident">proc_macro_error</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="kw">trait</span> <span class="ident">MyTrait</span> {
|
||||
<span class="kw">fn</span> <span class="ident">do_thing</span>();
|
||||
}
|
||||
|
||||
<span class="comment">// this proc macro is supposed to generate MyTrait impl</span>
|
||||
<span class="attribute">#[<span class="ident">proc_macro_derive</span>(<span class="ident">MyTrait</span>)]</span>
|
||||
<span class="attribute">#[<span class="ident">proc_macro_error</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">example</span>(<span class="ident">input</span>: <span class="ident">TokenStream</span>) -> <span class="ident">TokenStream</span> {
|
||||
<span class="comment">// first of all - we set a dummy impl which will be appended to</span>
|
||||
<span class="comment">// `compile_error!` invocations in case a trigger does happen</span>
|
||||
<span class="ident">set_dummy</span>(<span class="macro">quote!</span> {
|
||||
<span class="kw">impl</span> <span class="ident">MyTrait</span> <span class="kw">for</span> #<span class="ident">name</span> {
|
||||
<span class="kw">fn</span> <span class="ident">do_thing</span>() { <span class="macro">unimplemented!</span>() }
|
||||
}
|
||||
});
|
||||
|
||||
<span class="comment">// somewhere deep inside</span>
|
||||
<span class="macro">abort!</span>(<span class="ident">span</span>, <span class="string">"something's wrong"</span>);
|
||||
|
||||
<span class="comment">// this implementation will be generated if no error happened</span>
|
||||
<span class="macro">quote!</span> {
|
||||
<span class="kw">impl</span> <span class="ident">MyTrait</span> <span class="kw">for</span> #<span class="ident">name</span> {
|
||||
<span class="kw">fn</span> <span class="ident">do_thing</span>() {<span class="comment">/* whatever */</span>}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// ================</span>
|
||||
<span class="comment">// in main.rs</span>
|
||||
|
||||
<span class="comment">// this derive triggers an error</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">MyTrait</span>)]</span> <span class="comment">// first BOOM!</span>
|
||||
<span class="kw">struct</span> <span class="ident">Foo</span>;
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">main</span>() {
|
||||
<span class="ident">Foo::do_thing</span>(); <span class="comment">// no more errors!</span>
|
||||
}</code></pre></div>
|
||||
</div></details><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.append_dummy.html" title="proc_macro_error::dummy::append_dummy fn">append_dummy</a></div><div class="item-right docblock-short"><p>Same as <a href="fn.set_dummy.html" title="set_dummy"><code>set_dummy</code></a> but, instead of resetting, appends tokens to the
|
||||
existing dummy (if any). Behaves as <code>set_dummy</code> if no dummy is present.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.set_dummy.html" title="proc_macro_error::dummy::set_dummy fn">set_dummy</a></div><div class="item-right docblock-short"><p>Sets dummy token stream which will be appended to <code>compile_error!(msg);...</code>
|
||||
invocations in case you’ll emit any errors.</p>
|
||||
</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
1
doc/proc_macro_error/dummy/sidebar-items.js
Normal file
1
doc/proc_macro_error/dummy/sidebar-items.js
Normal file
@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"fn":[["append_dummy","Same as [`set_dummy`] but, instead of resetting, appends tokens to the existing dummy (if any). Behaves as `set_dummy` if no dummy is present."],["set_dummy","Sets dummy token stream which will be appended to `compile_error!(msg);...` invocations in case you’ll emit any errors."]]};
|
23
doc/proc_macro_error/enum.Level.html
Normal file
23
doc/proc_macro_error/enum.Level.html
Normal file
File diff suppressed because one or more lines are too long
3
doc/proc_macro_error/fn.abort_if_dirty.html
Normal file
3
doc/proc_macro_error/fn.abort_if_dirty.html
Normal file
@ -0,0 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Abort macro execution and display all the emitted errors, if any."><meta name="keywords" content="rust, rustlang, rust-lang, abort_if_dirty"><title>abort_if_dirty in proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In proc_macro_error</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="index.html">proc_macro_error</a>::<wbr><a class="fn" href="#">abort_if_dirty</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#386-388">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn abort_if_dirty()</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Abort macro execution and display all the emitted errors, if any.</p>
|
||||
<p>Does nothing if no errors were emitted (warnings do not count).</p>
|
||||
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
222
doc/proc_macro_error/index.html
Normal file
222
doc/proc_macro_error/index.html
Normal file
@ -0,0 +1,222 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="proc-macro-error"><meta name="keywords" content="rust, rustlang, rust-lang, proc_macro_error"><title>proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="../crates.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Crate proc_macro_error</a></h2><div class="sidebar-elems"><div class="block"><ul><li class="version">Version 1.0.4</li><li><a id="all-types" href="all.html">All Items</a></li></ul></div><section><div class="block"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li><li><a href="#attributes">Attribute Macros</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">proc_macro_error</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#1-560">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="proc-macro-error"><a href="#proc-macro-error">proc-macro-error</a></h2>
|
||||
<p>This crate aims to make error reporting in proc-macros simple and easy to use.
|
||||
Migrate from <code>panic!</code>-based errors for as little effort as possible!</p>
|
||||
<p>(Also, you can explicitly <a href="dummy/index.html">append a dummy token stream</a> to your errors).</p>
|
||||
<p>To achieve his, this crate serves as a tiny shim around <code>proc_macro::Diagnostic</code> and
|
||||
<code>compile_error!</code>. It detects the best way of emitting available based on compiler’s version.
|
||||
When the underlying diagnostic type is finally stabilized, this crate will simply be
|
||||
delegating to it requiring no changes in your code!</p>
|
||||
<p>So you can just use this crate and have <em>both</em> some of <code>proc_macro::Diagnostic</code> functionality
|
||||
available on stable ahead of time <em>and</em> your error-reporting code future-proof.</p>
|
||||
<h3 id="cargo-features"><a href="#cargo-features">Cargo features</a></h3>
|
||||
<p>This crate provides <em>enabled by default</em> <code>syn-error</code> feature that gates
|
||||
<code>impl From<syn::Error> for Diagnostic</code> conversion. If you don’t use <code>syn</code> and want
|
||||
to cut off some of compilation time, you can disable it via</p>
|
||||
<div class="example-wrap"><pre class="language-toml"><code>[dependencies]
|
||||
proc-macro-error = { version = "1", default-features = false }</code></pre></div>
|
||||
<p>*<strong>Please note that disabling this feature makes sense only if you don’t depend on <code>syn</code>
|
||||
directly or indirectly, and you very likely do.</strong></p>
|
||||
<h3 id="real-world-examples"><a href="#real-world-examples">Real world examples</a></h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TeXitoi/structopt/tree/master/structopt-derive"><code>structopt-derive</code></a>
|
||||
(abort-like usage)</li>
|
||||
<li><a href="https://github.com/auto-impl-rs/auto_impl/"><code>auto-impl</code></a> (emit-like usage)</li>
|
||||
</ul>
|
||||
<h3 id="limitations"><a href="#limitations">Limitations</a></h3>
|
||||
<ul>
|
||||
<li>Warnings are emitted only on nightly, they are ignored on stable.</li>
|
||||
<li>“help” suggestions can’t have their own span info on stable,
|
||||
(essentially inheriting the parent span).</li>
|
||||
<li>If a panic occurs somewhere in your macro no errors will be displayed. This is not a
|
||||
technical limitation but rather intentional design. <code>panic</code> is not for error reporting.</li>
|
||||
</ul>
|
||||
<h4 id="proc_macro_error-attribute"><a href="#proc_macro_error-attribute"><code>#[proc_macro_error]</code> attribute</a></h4>
|
||||
<p><strong>This attribute MUST be present on the top level of your macro</strong> (the function
|
||||
annotated with any of <code>#[proc_macro]</code>, <code>#[proc_macro_derive]</code>, <code>#[proc_macro_attribute]</code>).</p>
|
||||
<p>This attribute performs the setup and cleanup necessary to make things work.</p>
|
||||
<p>In most cases you’ll need the simple <code>#[proc_macro_error]</code> form without any
|
||||
additional settings. Feel free to <a href="#macros">skip the “Syntax” section</a>.</p>
|
||||
<h5 id="syntax"><a href="#syntax">Syntax</a></h5>
|
||||
<p><code>#[proc_macro_error]</code> or <code>#[proc_macro_error(settings...)]</code>, where <code>settings...</code>
|
||||
is a comma-separated list of:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>proc_macro_hack</code>:</p>
|
||||
<p>In order to correctly cooperate with <code>#[proc_macro_hack]</code>, <code>#[proc_macro_error]</code>
|
||||
attribute must be placed <em>before</em> (above) it, like this:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attribute">#[<span class="ident">proc_macro_error</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">proc_macro_hack</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">proc_macro</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">my_macro</span>(<span class="ident">input</span>: <span class="ident">TokenStream</span>) -> <span class="ident">TokenStream</span> {
|
||||
<span class="macro">unimplemented!</span>()
|
||||
}</code></pre></div>
|
||||
<p>If, for some reason, you can’t place it like that you can use
|
||||
<code>#[proc_macro_error(proc_macro_hack)]</code> instead.</p>
|
||||
<h2 id="note"><a href="#note">Note</a></h2>
|
||||
<p>If <code>proc-macro-hack</code> was detected (by any means) <code>allow_not_macro</code>
|
||||
and <code>assert_unwind_safe</code> will be applied automatically.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>allow_not_macro</code>:</p>
|
||||
<p>By default, the attribute checks that it’s applied to a proc-macro.
|
||||
If none of <code>#[proc_macro]</code>, <code>#[proc_macro_derive]</code> nor <code>#[proc_macro_attribute]</code> are
|
||||
present it will panic. It’s the intention - this crate is supposed to be used only with
|
||||
proc-macros.</p>
|
||||
<p>This setting is made to bypass the check, useful in certain circumstances.</p>
|
||||
<p>Pay attention: the function this attribute is applied to must return
|
||||
<code>proc_macro::TokenStream</code>.</p>
|
||||
<p>This setting is implied if <code>proc-macro-hack</code> was detected.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>assert_unwind_safe</code>:</p>
|
||||
<p>By default, your code must be <a href="https://doc.rust-lang.org/std/panic/trait.UnwindSafe.html#what-is-unwind-safety">unwind safe</a>. If your code is not unwind safe,
|
||||
but you believe it’s correct, you can use this setting to bypass the check.
|
||||
You would need this for code that uses <code>lazy_static</code> or <code>thread_local</code> with
|
||||
<code>Cell/RefCell</code> inside (and the like).</p>
|
||||
<p>This setting is implied if <code>#[proc_macro_error]</code> is applied to a function
|
||||
marked as <code>#[proc_macro]</code>, <code>#[proc_macro_derive]</code> or <code>#[proc_macro_attribute]</code>.</p>
|
||||
<p>This setting is also implied if <code>proc-macro-hack</code> was detected.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h3 id="macros"><a href="#macros">Macros</a></h3>
|
||||
<p>Most of the time you want to use the macros. Syntax is described in the next section below.</p>
|
||||
<p>You’ll need to decide how you want to emit errors:</p>
|
||||
<ul>
|
||||
<li>Emit the error and abort. Very much panic-like usage. Served by <a href="macro.abort.html"><code>abort!</code></a> and
|
||||
<a href="macro.abort_call_site.html"><code>abort_call_site!</code></a>.</li>
|
||||
<li>Emit the error but do not abort right away, looking for other errors to report.
|
||||
Served by <a href="macro.emit_error.html"><code>emit_error!</code></a> and <a href="macro.emit_call_site_warning.html"><code>emit_call_site_error!</code></a>.</li>
|
||||
</ul>
|
||||
<p>You <strong>can</strong> mix these usages.</p>
|
||||
<p><code>abort</code> and <code>emit_error</code> take a “source span” as the first argument. This source
|
||||
will be used to highlight the place the error originates from. It must be one of:</p>
|
||||
<ul>
|
||||
<li><em>Something</em> that implements <a href="https://docs.rs/quote/1.0.3/quote/trait.ToTokens.html"><code>ToTokens</code></a> (most types in <code>syn</code> and <code>proc-macro2</code> do).
|
||||
This source is the preferable one since it doesn’t lose span information on multi-token
|
||||
spans, see <a href="https://gitlab.com/CreepySkeleton/proc-macro-error/-/issues/6">this issue</a>
|
||||
for details.</li>
|
||||
<li><a href="https://doc.rust-lang.org/proc_macro/struct.Span.html"><code>proc_macro::Span</code></a></li>
|
||||
<li><a href="https://docs.rs/proc-macro2/1.0.10/proc_macro2/struct.Span.html"><code>proc-macro2::Span</code></a></li>
|
||||
</ul>
|
||||
<p>The rest is your message in format-like style.</p>
|
||||
<p>See <a href="#syntax-1">the next section</a> for detailed syntax.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="macro.abort.html"><code>abort!</code></a>:</p>
|
||||
<p>Very much panic-like usage - abort right away and show the error.
|
||||
Expands to <a href="https://doc.rust-lang.org/std/primitive.never.html"><code>!</code></a> (never type).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="macro.abort_call_site.html"><code>abort_call_site!</code></a>:</p>
|
||||
<p>Shortcut for <code>abort!(Span::call_site(), ...)</code>. Expands to <a href="https://doc.rust-lang.org/std/primitive.never.html"><code>!</code></a> (never type).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="macro.emit_error.html"><code>emit_error!</code></a>:</p>
|
||||
<p><a href="https://doc.rust-lang.org/proc_macro/struct.Diagnostic.html"><code>proc_macro::Diagnostic</code></a>-like usage - emit the error but keep going,
|
||||
looking for other errors to report.
|
||||
The compilation will fail nonetheless. Expands to <a href="https://doc.rust-lang.org/std/primitive.unit.html"><code>()</code></a> (unit type).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="macro.emit_call_site_warning.html"><code>emit_call_site_error!</code></a>:</p>
|
||||
<p>Shortcut for <code>emit_error!(Span::call_site(), ...)</code>. Expands to <a href="https://doc.rust-lang.org/std/primitive.unit.html"><code>()</code></a> (unit type).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="macro.emit_warning.html"><code>emit_warning!</code></a>:</p>
|
||||
<p>Like <code>emit_error!</code> but emit a warning instead of error. The compilation won’t fail
|
||||
because of warnings.
|
||||
Expands to <a href="https://doc.rust-lang.org/std/primitive.unit.html"><code>()</code></a> (unit type).</p>
|
||||
<p><strong>Beware</strong>: warnings are nightly only, they are completely ignored on stable.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="macro.emit_call_site_error.html"><code>emit_call_site_warning!</code></a>:</p>
|
||||
<p>Shortcut for <code>emit_warning!(Span::call_site(), ...)</code>. Expands to <a href="https://doc.rust-lang.org/std/primitive.unit.html"><code>()</code></a> (unit type).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="struct.Diagnostic.html"><code>diagnostic</code></a>:</p>
|
||||
<p>Build an instance of <code>Diagnostic</code> in format-like style.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h5 id="syntax-1"><a href="#syntax-1">Syntax</a></h5>
|
||||
<p>All the macros have pretty much the same syntax:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<div class='information'><div class='tooltip ignore'>ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore"><code><span class="macro">abort!</span>(<span class="ident">single_expr</span>)</code></pre></div>
|
||||
<p>Shortcut for <code>Diagnostic::from(expr).abort()</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<div class='information'><div class='tooltip ignore'>ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore"><code><span class="macro">abort!</span>(<span class="ident">span</span>, <span class="ident">message</span>)</code></pre></div>
|
||||
<p>The first argument is an expression the span info should be taken from.</p>
|
||||
<p>The second argument is the error message, it must implement <a href="https://doc.rust-lang.org/std/string/trait.ToString.html"><code>ToString</code></a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<div class='information'><div class='tooltip ignore'>ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore"><code><span class="macro">abort!</span>(<span class="ident">span</span>, <span class="ident">format_literal</span>, <span class="ident">format_args</span>...)</code></pre></div>
|
||||
<p>This form is pretty much the same as 2, except <code>format!(format_literal, format_args...)</code>
|
||||
will be used to for the message instead of <a href="https://doc.rust-lang.org/std/string/trait.ToString.html"><code>ToString</code></a>.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p>That’s it. <code>abort!</code>, <code>emit_warning</code>, <code>emit_error</code> share this exact syntax.</p>
|
||||
<p><code>abort_call_site!</code>, <code>emit_call_site_warning</code>, <code>emit_call_site_error</code> lack 1 form
|
||||
and do not take span in 2’th and 3’th forms. Those are essentially shortcuts for
|
||||
<code>macro!(Span::call_site(), args...)</code>.</p>
|
||||
<p><code>diagnostic!</code> requires a <a href="enum.Level.html" title="Level"><code>Level</code></a> instance between <code>span</code> and second argument
|
||||
(1’th form is the same).</p>
|
||||
<blockquote>
|
||||
<p><strong>Important!</strong></p>
|
||||
<p>If you have some type from <code>proc_macro</code> or <code>syn</code> to point to, do not call <code>.span()</code>
|
||||
on it but rather use it directly:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">ty</span>: <span class="ident">syn::Type</span> <span class="op">=</span> <span class="ident">syn::parse2</span>(<span class="ident">input</span>).<span class="ident">unwrap</span>();
|
||||
<span class="macro">abort!</span>(<span class="ident">ty</span>, <span class="string">"BOOM"</span>);
|
||||
<span class="comment">// ^^ <-- avoid .span()</span></code></pre></div>
|
||||
<p><code>.span()</code> calls work too, but you may experience regressions in message quality.</p>
|
||||
</blockquote>
|
||||
<h5 id="note-attachments"><a href="#note-attachments">Note attachments</a></h5>
|
||||
<ol start="3">
|
||||
<li>Every macro can have “note” attachments (only 2 and 3 form).</li>
|
||||
</ol>
|
||||
|
||||
<div class='information'><div class='tooltip ignore'>ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore"><code><span class="kw">let</span> <span class="ident">opt_help</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">have_some_info</span> { <span class="prelude-val">Some</span>(<span class="string">"did you mean `this`?"</span>) } <span class="kw">else</span> { <span class="prelude-val">None</span> };
|
||||
|
||||
<span class="macro">abort!</span>(
|
||||
<span class="ident">span</span>, <span class="ident">message</span>; <span class="comment">// <--- attachments start with `;` (semicolon)</span>
|
||||
|
||||
<span class="ident">help</span> <span class="op">=</span> <span class="string">"format {} {}"</span>, <span class="string">"arg1"</span>, <span class="string">"arg2"</span>; <span class="comment">// <--- every attachment ends with `;`,</span>
|
||||
<span class="comment">// maybe except the last one</span>
|
||||
|
||||
<span class="ident">note</span> <span class="op">=</span> <span class="string">"to_string"</span>; <span class="comment">// <--- one arg uses `.to_string()` instead of `format!()`</span>
|
||||
|
||||
<span class="ident">yay</span> <span class="op">=</span> <span class="string">"I see what {} did here"</span>, <span class="string">"you"</span>; <span class="comment">// <--- "help =" and "hint =" are mapped</span>
|
||||
<span class="comment">// to Diagnostic::help,</span>
|
||||
<span class="comment">// anything else is Diagnostic::note</span>
|
||||
|
||||
<span class="ident">wow</span> <span class="op">=</span> <span class="ident">note_span</span> => <span class="string">"custom span"</span>; <span class="comment">// <--- attachments can have their own span</span>
|
||||
<span class="comment">// it takes effect only on nightly though</span>
|
||||
|
||||
<span class="ident">hint</span> <span class="op">=</span><span class="question-mark">?</span> <span class="ident">opt_help</span>; <span class="comment">// <-- "optional" attachment, get displayed only if `Some`</span>
|
||||
<span class="comment">// must be single `Option` expression</span>
|
||||
|
||||
<span class="ident">note</span> <span class="op">=</span><span class="question-mark">?</span> <span class="ident">note_span</span> => <span class="ident">opt_help</span> <span class="comment">// <-- optional attachments can have custom spans too</span>
|
||||
);</code></pre></div>
|
||||
<h4 id="diagnostic-type"><a href="#diagnostic-type">Diagnostic type</a></h4>
|
||||
<p><a href="struct.Diagnostic.html"><code>Diagnostic</code></a> type is intentionally designed to be API compatible with <a href="https://doc.rust-lang.org/proc_macro/struct.Diagnostic.html"><code>proc_macro::Diagnostic</code></a>.
|
||||
Not all API is implemented, only the part that can be reasonably implemented on stable.</p>
|
||||
</div></details><h2 id="reexports" class="small-section-header"><a href="#reexports">Re-exports</a></h2><div class="item-table"><div class="item-row"><div class="item-left import-item" id="reexport.append_dummy"><code>pub use crate::dummy::<a class="fn" href="dummy/fn.append_dummy.html" title="fn proc_macro_error::dummy::append_dummy">append_dummy</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item" id="reexport.set_dummy"><code>pub use crate::dummy::<a class="fn" href="dummy/fn.set_dummy.html" title="fn proc_macro_error::dummy::set_dummy">set_dummy</a>;</code></div><div class="item-right docblock-short"></div></div></div><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="dummy/index.html" title="proc_macro_error::dummy mod">dummy</a></div><div class="item-right docblock-short"><p>Facility to emit dummy implementations (or whatever) in case
|
||||
an error happen.</p>
|
||||
</div></div></div><h2 id="macros-1" class="small-section-header"><a href="#macros-1">Macros</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="macro" href="macro.abort.html" title="proc_macro_error::abort macro">abort</a></div><div class="item-right docblock-short"><p>Abort proc-macro execution right now and display the error.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="macro" href="macro.abort_call_site.html" title="proc_macro_error::abort_call_site macro">abort_call_site</a></div><div class="item-right docblock-short"><p>Shortcut for <code>abort!(Span::call_site(), msg...)</code>. This macro
|
||||
is still preferable over plain panic, panics are not for error reporting.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="macro" href="macro.diagnostic.html" title="proc_macro_error::diagnostic macro">diagnostic</a></div><div class="item-right docblock-short"><p>Build <a href="struct.Diagnostic.html"><code>Diagnostic</code></a> instance from provided arguments.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="macro" href="macro.emit_call_site_error.html" title="proc_macro_error::emit_call_site_error macro">emit_call_site_error</a></div><div class="item-right docblock-short"><p>Shortcut for <code>emit_error!(Span::call_site(), ...)</code>. This macro
|
||||
is still preferable over plain panic, panics are not for error reporting..</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="macro" href="macro.emit_call_site_warning.html" title="proc_macro_error::emit_call_site_warning macro">emit_call_site_warning</a></div><div class="item-right docblock-short"><p>Shortcut for <code>emit_warning!(Span::call_site(), ...)</code>.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="macro" href="macro.emit_error.html" title="proc_macro_error::emit_error macro">emit_error</a></div><div class="item-right docblock-short"><p>Emit an error while not aborting the proc-macro right away.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="macro" href="macro.emit_warning.html" title="proc_macro_error::emit_warning macro">emit_warning</a></div><div class="item-right docblock-short"><p>Emit a warning. Warnings are not errors and compilation won’t fail because of them.</p>
|
||||
</div></div></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Diagnostic.html" title="proc_macro_error::Diagnostic struct">Diagnostic</a></div><div class="item-right docblock-short"><p>Represents a single diagnostic message</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SpanRange.html" title="proc_macro_error::SpanRange struct">SpanRange</a></div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Level.html" title="proc_macro_error::Level enum">Level</a></div><div class="item-right docblock-short"><p>Represents a diagnostic level</p>
|
||||
</div></div></div><h2 id="traits" class="small-section-header"><a href="#traits">Traits</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.DiagnosticExt.html" title="proc_macro_error::DiagnosticExt trait">DiagnosticExt</a></div><div class="item-right docblock-short"><p>A collection of methods that do not exist in <code>proc_macro::Diagnostic</code>
|
||||
but still useful to have around.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.OptionExt.html" title="proc_macro_error::OptionExt trait">OptionExt</a></div><div class="item-right docblock-short"><p>This traits expands <code>Option</code> with some handy shortcuts.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.ResultExt.html" title="proc_macro_error::ResultExt trait">ResultExt</a></div><div class="item-right docblock-short"><p>This traits expands <code>Result<T, Into<Diagnostic>></code> with some handy shortcuts.</p>
|
||||
</div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.abort_if_dirty.html" title="proc_macro_error::abort_if_dirty fn">abort_if_dirty</a></div><div class="item-right docblock-short"><p>Abort macro execution and display all the emitted errors, if any.</p>
|
||||
</div></div></div><h2 id="attributes" class="small-section-header"><a href="#attributes">Attribute Macros</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="attr" href="attr.proc_macro_error.html" title="proc_macro_error::proc_macro_error attr">proc_macro_error</a></div><div class="item-right docblock-short"></div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
11
doc/proc_macro_error/macro.abort!.html
Normal file
11
doc/proc_macro_error/macro.abort!.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=macro.abort.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="macro.abort.html">macro.abort.html</a>...</p>
|
||||
<script>location.replace("macro.abort.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
8
doc/proc_macro_error/macro.abort.html
Normal file
8
doc/proc_macro_error/macro.abort.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Abort proc-macro execution right now and display the error."><meta name="keywords" content="rust, rustlang, rust-lang, abort"><title>abort in proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In proc_macro_error</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">proc_macro_error</a>::<wbr><a class="macro" href="#">abort</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error/macros.rs.html#109-117">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><div class="example-wrap"><pre class="rust macro"><code><span class="macro">macro_rules!</span> <span class="ident">abort</span> {
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">err</span>:<span class="ident">expr</span>) => { ... };
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">span</span>:<span class="ident">expr</span>, $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">tts</span>:<span class="ident">tt</span>)<span class="kw-2">*</span>) => { ... };
|
||||
}</code></pre></div>
|
||||
</div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Abort proc-macro execution right now and display the error.</p>
|
||||
<h2 id="syntax"><a href="#syntax">Syntax</a></h2>
|
||||
<p>See <a href="index.html#guide">the guide</a>.</p>
|
||||
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
11
doc/proc_macro_error/macro.abort_call_site!.html
Normal file
11
doc/proc_macro_error/macro.abort_call_site!.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=macro.abort_call_site.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="macro.abort_call_site.html">macro.abort_call_site.html</a>...</p>
|
||||
<script>location.replace("macro.abort_call_site.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
8
doc/proc_macro_error/macro.abort_call_site.html
Normal file
8
doc/proc_macro_error/macro.abort_call_site.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Shortcut for `abort!(Span::call_site(), msg...)`. This macro is still preferable over plain panic, panics are not for error reporting."><meta name="keywords" content="rust, rustlang, rust-lang, abort_call_site"><title>abort_call_site in proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In proc_macro_error</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">proc_macro_error</a>::<wbr><a class="macro" href="#">abort_call_site</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error/macros.rs.html#127-131">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><div class="example-wrap"><pre class="rust macro"><code><span class="macro">macro_rules!</span> <span class="ident">abort_call_site</span> {
|
||||
($(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">tts</span>:<span class="ident">tt</span>)<span class="kw-2">*</span>) => { ... };
|
||||
}</code></pre></div>
|
||||
</div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Shortcut for <code>abort!(Span::call_site(), msg...)</code>. This macro
|
||||
is still preferable over plain panic, panics are not for error reporting.</p>
|
||||
<h2 id="syntax"><a href="#syntax">Syntax</a></h2>
|
||||
<p>See <a href="index.html#guide">the guide</a>.</p>
|
||||
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
11
doc/proc_macro_error/macro.diagnostic!.html
Normal file
11
doc/proc_macro_error/macro.diagnostic!.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=macro.diagnostic.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="macro.diagnostic.html">macro.diagnostic.html</a>...</p>
|
||||
<script>location.replace("macro.diagnostic.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
15
doc/proc_macro_error/macro.diagnostic.html
Normal file
15
doc/proc_macro_error/macro.diagnostic.html
Normal file
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Build `Diagnostic` instance from provided arguments."><meta name="keywords" content="rust, rustlang, rust-lang, diagnostic"><title>diagnostic in proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In proc_macro_error</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">proc_macro_error</a>::<wbr><a class="macro" href="#">diagnostic</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error/macros.rs.html#11-101">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><div class="example-wrap"><pre class="rust macro"><code><span class="macro">macro_rules!</span> <span class="ident">diagnostic</span> {
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">err</span>:<span class="ident">expr</span>) => { ... };
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">span</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">level</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">fmt</span>:<span class="ident">expr</span>, $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">args</span>:<span class="ident">expr</span>),<span class="op">+</span> ; $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">rest</span>:<span class="ident">tt</span>)<span class="op">+</span>) => { ... };
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">span</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">level</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">msg</span>:<span class="ident">expr</span> ; $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">rest</span>:<span class="ident">tt</span>)<span class="op">+</span>) => { ... };
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">span</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">level</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">fmt</span>:<span class="ident">expr</span>, $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">args</span>:<span class="ident">expr</span>),<span class="op">+</span>) => { ... };
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">span</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">level</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">msg</span>:<span class="ident">expr</span>) => { ... };
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">span</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">level</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">fmt</span>:<span class="ident">expr</span>, $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">args</span>:<span class="ident">expr</span>),<span class="op">+</span>, ; $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">rest</span>:<span class="ident">tt</span>)<span class="op">+</span>) => { ... };
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">span</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">level</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">msg</span>:<span class="ident">expr</span>, ; $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">rest</span>:<span class="ident">tt</span>)<span class="op">+</span>) => { ... };
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">span</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">level</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">fmt</span>:<span class="ident">expr</span>, $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">args</span>:<span class="ident">expr</span>),<span class="op">+</span>,) => { ... };
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">span</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">level</span>:<span class="ident">expr</span>, <span class="macro-nonterminal">$</span><span class="macro-nonterminal">msg</span>:<span class="ident">expr</span>,) => { ... };
|
||||
}</code></pre></div>
|
||||
</div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Build <a href="struct.Diagnostic.html"><code>Diagnostic</code></a> instance from provided arguments.</p>
|
||||
<h2 id="syntax"><a href="#syntax">Syntax</a></h2>
|
||||
<p>See <a href="index.html#guide">the guide</a>.</p>
|
||||
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
11
doc/proc_macro_error/macro.emit_call_site_error!.html
Normal file
11
doc/proc_macro_error/macro.emit_call_site_error!.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=macro.emit_call_site_error.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="macro.emit_call_site_error.html">macro.emit_call_site_error.html</a>...</p>
|
||||
<script>location.replace("macro.emit_call_site_error.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
8
doc/proc_macro_error/macro.emit_call_site_error.html
Normal file
8
doc/proc_macro_error/macro.emit_call_site_error.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Shortcut for `emit_error!(Span::call_site(), ...)`. This macro is still preferable over plain panic, panics are not for error reporting.."><meta name="keywords" content="rust, rustlang, rust-lang, emit_call_site_error"><title>emit_call_site_error in proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In proc_macro_error</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">proc_macro_error</a>::<wbr><a class="macro" href="#">emit_call_site_error</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error/macros.rs.html#159-163">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><div class="example-wrap"><pre class="rust macro"><code><span class="macro">macro_rules!</span> <span class="ident">emit_call_site_error</span> {
|
||||
($(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">tts</span>:<span class="ident">tt</span>)<span class="kw-2">*</span>) => { ... };
|
||||
}</code></pre></div>
|
||||
</div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Shortcut for <code>emit_error!(Span::call_site(), ...)</code>. This macro
|
||||
is still preferable over plain panic, panics are not for error reporting..</p>
|
||||
<h2 id="syntax"><a href="#syntax">Syntax</a></h2>
|
||||
<p>See <a href="index.html#guide">the guide</a>.</p>
|
||||
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
11
doc/proc_macro_error/macro.emit_call_site_warning!.html
Normal file
11
doc/proc_macro_error/macro.emit_call_site_warning!.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=macro.emit_call_site_warning.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="macro.emit_call_site_warning.html">macro.emit_call_site_warning.html</a>...</p>
|
||||
<script>location.replace("macro.emit_call_site_warning.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
8
doc/proc_macro_error/macro.emit_call_site_warning.html
Normal file
8
doc/proc_macro_error/macro.emit_call_site_warning.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Shortcut for `emit_warning!(Span::call_site(), ...)`."><meta name="keywords" content="rust, rustlang, rust-lang, emit_call_site_warning"><title>emit_call_site_warning in proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In proc_macro_error</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">proc_macro_error</a>::<wbr><a class="macro" href="#">emit_call_site_warning</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error/macros.rs.html#189-193">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><div class="example-wrap"><pre class="rust macro"><code><span class="macro">macro_rules!</span> <span class="ident">emit_call_site_warning</span> {
|
||||
($(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">tts</span>:<span class="ident">tt</span>)<span class="kw-2">*</span>) => { ... };
|
||||
}</code></pre></div>
|
||||
</div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Shortcut for <code>emit_warning!(Span::call_site(), ...)</code>.</p>
|
||||
<p><strong>Does nothing on stable</strong></p>
|
||||
<h2 id="syntax"><a href="#syntax">Syntax</a></h2>
|
||||
<p>See <a href="index.html#guide">the guide</a>.</p>
|
||||
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
11
doc/proc_macro_error/macro.emit_error!.html
Normal file
11
doc/proc_macro_error/macro.emit_error!.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=macro.emit_error.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="macro.emit_error.html">macro.emit_error.html</a>...</p>
|
||||
<script>location.replace("macro.emit_error.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
8
doc/proc_macro_error/macro.emit_error.html
Normal file
8
doc/proc_macro_error/macro.emit_error.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Emit an error while not aborting the proc-macro right away."><meta name="keywords" content="rust, rustlang, rust-lang, emit_error"><title>emit_error in proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In proc_macro_error</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">proc_macro_error</a>::<wbr><a class="macro" href="#">emit_error</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error/macros.rs.html#140-149">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><div class="example-wrap"><pre class="rust macro"><code><span class="macro">macro_rules!</span> <span class="ident">emit_error</span> {
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">err</span>:<span class="ident">expr</span>) => { ... };
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">span</span>:<span class="ident">expr</span>, $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">tts</span>:<span class="ident">tt</span>)<span class="kw-2">*</span>) => { ... };
|
||||
}</code></pre></div>
|
||||
</div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Emit an error while not aborting the proc-macro right away.</p>
|
||||
<h2 id="syntax"><a href="#syntax">Syntax</a></h2>
|
||||
<p>See <a href="index.html#guide">the guide</a>.</p>
|
||||
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
11
doc/proc_macro_error/macro.emit_warning!.html
Normal file
11
doc/proc_macro_error/macro.emit_warning!.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=macro.emit_warning.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="macro.emit_warning.html">macro.emit_warning.html</a>...</p>
|
||||
<script>location.replace("macro.emit_warning.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
8
doc/proc_macro_error/macro.emit_warning.html
Normal file
8
doc/proc_macro_error/macro.emit_warning.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Emit a warning. Warnings are not errors and compilation won’t fail because of them."><meta name="keywords" content="rust, rustlang, rust-lang, emit_warning"><title>emit_warning in proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In proc_macro_error</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">proc_macro_error</a>::<wbr><a class="macro" href="#">emit_warning</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error/macros.rs.html#174-178">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><div class="example-wrap"><pre class="rust macro"><code><span class="macro">macro_rules!</span> <span class="ident">emit_warning</span> {
|
||||
(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">span</span>:<span class="ident">expr</span>, $(<span class="macro-nonterminal">$</span><span class="macro-nonterminal">tts</span>:<span class="ident">tt</span>)<span class="kw-2">*</span>) => { ... };
|
||||
}</code></pre></div>
|
||||
</div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Emit a warning. Warnings are not errors and compilation won’t fail because of them.</p>
|
||||
<p><strong>Does nothing on stable</strong></p>
|
||||
<h2 id="syntax"><a href="#syntax">Syntax</a></h2>
|
||||
<p>See <a href="index.html#guide">the guide</a>.</p>
|
||||
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
1
doc/proc_macro_error/sidebar-items.js
Normal file
1
doc/proc_macro_error/sidebar-items.js
Normal file
@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"attr":[["proc_macro_error",""]],"enum":[["Level","Represents a diagnostic level"]],"fn":[["abort_if_dirty","Abort macro execution and display all the emitted errors, if any."]],"macro":[["abort","Abort proc-macro execution right now and display the error."],["abort_call_site","Shortcut for `abort!(Span::call_site(), msg...)`. This macro is still preferable over plain panic, panics are not for error reporting."],["diagnostic","Build `Diagnostic` instance from provided arguments."],["emit_call_site_error","Shortcut for `emit_error!(Span::call_site(), ...)`. This macro is still preferable over plain panic, panics are not for error reporting.."],["emit_call_site_warning","Shortcut for `emit_warning!(Span::call_site(), ...)`."],["emit_error","Emit an error while not aborting the proc-macro right away."],["emit_warning","Emit a warning. Warnings are not errors and compilation won’t fail because of them."]],"mod":[["dummy","Facility to emit dummy implementations (or whatever) in case an error happen."]],"struct":[["Diagnostic","Represents a single diagnostic message"],["SpanRange",""]],"trait":[["DiagnosticExt","A collection of methods that do not exist in `proc_macro::Diagnostic` but still useful to have around."],["OptionExt","This traits expands `Option` with some handy shortcuts."],["ResultExt","This traits expands `Result<T, Into<Diagnostic>>` with some handy shortcuts."]]};
|
44
doc/proc_macro_error/struct.Diagnostic.html
Normal file
44
doc/proc_macro_error/struct.Diagnostic.html
Normal file
File diff suppressed because one or more lines are too long
32
doc/proc_macro_error/struct.SpanRange.html
Normal file
32
doc/proc_macro_error/struct.SpanRange.html
Normal file
File diff suppressed because one or more lines are too long
26
doc/proc_macro_error/trait.DiagnosticExt.html
Normal file
26
doc/proc_macro_error/trait.DiagnosticExt.html
Normal file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A collection of methods that do not exist in `proc_macro::Diagnostic` but still useful to have around."><meta name="keywords" content="rust, rustlang, rust-lang, DiagnosticExt"><title>DiagnosticExt in proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">DiagnosticExt</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><ul><li><a href="#tymethod.span_range_error">span_range_error</a></li><li><a href="#tymethod.span_range_help">span_range_help</a></li><li><a href="#tymethod.span_range_note">span_range_note</a></li><li><a href="#tymethod.spanned_range">spanned_range</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div></section><h2 class="location"><a href="index.html">In proc_macro_error</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Trait <a href="index.html">proc_macro_error</a>::<wbr><a class="trait" href="#">DiagnosticExt</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error/diagnostic.rs.html#34-67">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait DiagnosticExt: Sealed {
|
||||
fn <a href="#tymethod.spanned_range" class="fnname">spanned_range</a>(span_range: <a class="struct" href="struct.SpanRange.html" title="struct proc_macro_error::SpanRange">SpanRange</a>, level: <a class="enum" href="enum.Level.html" title="enum proc_macro_error::Level">Level</a>, message: <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> Self;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.span_range_error" class="fnname">span_range_error</a>(self, span_range: <a class="struct" href="struct.SpanRange.html" title="struct proc_macro_error::SpanRange">SpanRange</a>, msg: <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> Self;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.span_range_help" class="fnname">span_range_help</a>(self, span_range: <a class="struct" href="struct.SpanRange.html" title="struct proc_macro_error::SpanRange">SpanRange</a>, msg: <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> Self;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.span_range_note" class="fnname">span_range_note</a>(self, span_range: <a class="struct" href="struct.SpanRange.html" title="struct proc_macro_error::SpanRange">SpanRange</a>, msg: <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> Self;
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A collection of methods that do not exist in <code>proc_macro::Diagnostic</code>
|
||||
but still useful to have around.</p>
|
||||
<p>This trait is sealed and cannot be implemented outside of <code>proc_macro_error</code>.</p>
|
||||
</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.spanned_range" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/proc_macro_error/diagnostic.rs.html#39">source</a></div><h4 class="code-header">fn <a href="#tymethod.spanned_range" class="fnname">spanned_range</a>(span_range: <a class="struct" href="struct.SpanRange.html" title="struct proc_macro_error::SpanRange">SpanRange</a>, level: <a class="enum" href="enum.Level.html" title="enum proc_macro_error::Level">Level</a>, message: <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> Self</h4></div></summary><div class="docblock"><p>Create a new diagnostic message that points to the <code>span_range</code>.</p>
|
||||
<p>This function is the same as <code>Diagnostic::spanned</code> but produces considerably
|
||||
better error messages for multi-token spans on stable.</p>
|
||||
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.span_range_error" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/proc_macro_error/diagnostic.rs.html#46">source</a></div><h4 class="code-header">fn <a href="#tymethod.span_range_error" class="fnname">span_range_error</a>(self, span_range: <a class="struct" href="struct.SpanRange.html" title="struct proc_macro_error::SpanRange">SpanRange</a>, msg: <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> Self</h4></div></summary><div class="docblock"><p>Add another error message to self such that it will be emitted right after
|
||||
the main message.</p>
|
||||
<p>This function is the same as <code>Diagnostic::span_error</code> but produces considerably
|
||||
better error messages for multi-token spans on stable.</p>
|
||||
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.span_range_help" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/proc_macro_error/diagnostic.rs.html#56">source</a></div><h4 class="code-header">fn <a href="#tymethod.span_range_help" class="fnname">span_range_help</a>(self, span_range: <a class="struct" href="struct.SpanRange.html" title="struct proc_macro_error::SpanRange">SpanRange</a>, msg: <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> Self</h4></div></summary><div class="docblock"><p>Attach a “help” note to your main message, the note will have it’s own span on nightly.</p>
|
||||
<p>This function is the same as <code>Diagnostic::span_help</code> but produces considerably
|
||||
better error messages for multi-token spans on stable.</p>
|
||||
<h5 id="span"><a href="#span">Span</a></h5>
|
||||
<p>The span is ignored on stable, the note effectively inherits its parent’s (main message) span</p>
|
||||
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.span_range_note" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/proc_macro_error/diagnostic.rs.html#66">source</a></div><h4 class="code-header">fn <a href="#tymethod.span_range_note" class="fnname">span_range_note</a>(self, span_range: <a class="struct" href="struct.SpanRange.html" title="struct proc_macro_error::SpanRange">SpanRange</a>, msg: <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> Self</h4></div></summary><div class="docblock"><p>Attach a note to your main message, the note will have it’s own span on nightly.</p>
|
||||
<p>This function is the same as <code>Diagnostic::span_note</code> but produces considerably
|
||||
better error messages for multi-token spans on stable.</p>
|
||||
<h5 id="span-1"><a href="#span-1">Span</a></h5>
|
||||
<p>The span is ignored on stable, the note effectively inherits its parent’s (main message) span</p>
|
||||
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><section id="impl-DiagnosticExt-for-Diagnostic" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/proc_macro_error/diagnostic.rs.html#69-96">source</a></span><a href="#impl-DiagnosticExt-for-Diagnostic" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.DiagnosticExt.html" title="trait proc_macro_error::DiagnosticExt">DiagnosticExt</a> for <a class="struct" href="struct.Diagnostic.html" title="struct proc_macro_error::Diagnostic">Diagnostic</a></h3></section></div><script type="text/javascript" src="../implementors/proc_macro_error/diagnostic/trait.DiagnosticExt.js" data-ignore-extern-crates="" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
9
doc/proc_macro_error/trait.OptionExt.html
Normal file
9
doc/proc_macro_error/trait.OptionExt.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This traits expands `Option` with some handy shortcuts."><meta name="keywords" content="rust, rustlang, rust-lang, OptionExt"><title>OptionExt in proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">OptionExt</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#required-associated-types">Required Associated Types</a></h3><ul><li><a href="#associatedtype.Some">Some</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><ul><li><a href="#tymethod.expect_or_abort">expect_or_abort</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul><li><a href="#impl-OptionExt-for-Option%3CT%3E">Option<T></a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div></section><h2 class="location"><a href="index.html">In proc_macro_error</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Trait <a href="index.html">proc_macro_error</a>::<wbr><a class="trait" href="#">OptionExt</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#372-381">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait OptionExt {
|
||||
type <a href="#associatedtype.Some" class="associatedtype">Some</a>;
|
||||
|
||||
fn <a href="#tymethod.expect_or_abort" class="fnname">expect_or_abort</a>(self, msg: &<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>) -> Self::<a class="associatedtype" href="trait.OptionExt.html#associatedtype.Some" title="type proc_macro_error::OptionExt::Some">Some</a>;
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This traits expands <code>Option</code> with some handy shortcuts.</p>
|
||||
</div></details><h2 id="required-associated-types" class="small-section-header">Required Associated Types<a href="#required-associated-types" class="anchor"></a></h2><div class="methods"><div id="associatedtype.Some" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#373">source</a></div><h4 class="code-header">type <a href="#associatedtype.Some" class="associatedtype">Some</a></h4></div></div><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.expect_or_abort" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#380">source</a></div><h4 class="code-header">fn <a href="#tymethod.expect_or_abort" class="fnname">expect_or_abort</a>(self, msg: &<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>) -> Self::<a class="associatedtype" href="trait.OptionExt.html#associatedtype.Some" title="type proc_macro_error::OptionExt::Some">Some</a></h4></div></summary><div class="docblock"><p>Behaves like <code>Option::expect</code>: if self is <code>Some</code> yield the contained value,
|
||||
otherwise abort macro execution via <code>abort_call_site!</code>.
|
||||
If it aborts the <code>message</code> will be used for <a href="https://doc.rust-lang.org/std/macro.compile_error.html"><code>compile_error!</code></a> invocation.</p>
|
||||
</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-OptionExt-for-Option%3CT%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#412-421">source</a></span><a href="#impl-OptionExt-for-Option%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="trait.OptionExt.html" title="trait proc_macro_error::OptionExt">OptionExt</a> for <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Some-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Some-1" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Some" class="associatedtype">Some</a> = T</h4></section><section id="method.expect_or_abort" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#415-420">source</a></span><a href="#method.expect_or_abort" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.expect_or_abort" class="fnname">expect_or_abort</a>(self, message: &<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>) -> T</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><script type="text/javascript" src="../implementors/proc_macro_error/trait.OptionExt.js" data-ignore-extern-crates="core" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
12
doc/proc_macro_error/trait.ResultExt.html
Normal file
12
doc/proc_macro_error/trait.ResultExt.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This traits expands `Result<T, Into<Diagnostic>>` with some handy shortcuts."><meta name="keywords" content="rust, rustlang, rust-lang, ResultExt"><title>ResultExt in proc_macro_error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../proc_macro_error/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">ResultExt</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#required-associated-types">Required Associated Types</a></h3><ul><li><a href="#associatedtype.Ok">Ok</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><ul><li><a href="#tymethod.expect_or_abort">expect_or_abort</a></li><li><a href="#tymethod.unwrap_or_abort">unwrap_or_abort</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul><li><a href="#impl-ResultExt-for-Result%3CT%2C%20E%3E">Result<T, E></a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div></section><h2 class="location"><a href="index.html">In proc_macro_error</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../proc_macro_error/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Trait <a href="index.html">proc_macro_error</a>::<wbr><a class="trait" href="#">ResultExt</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#358-369">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait ResultExt {
|
||||
type <a href="#associatedtype.Ok" class="associatedtype">Ok</a>;
|
||||
|
||||
fn <a href="#tymethod.unwrap_or_abort" class="fnname">unwrap_or_abort</a>(self) -> Self::<a class="associatedtype" href="trait.ResultExt.html#associatedtype.Ok" title="type proc_macro_error::ResultExt::Ok">Ok</a>;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.expect_or_abort" class="fnname">expect_or_abort</a>(self, msg: &<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>) -> Self::<a class="associatedtype" href="trait.ResultExt.html#associatedtype.Ok" title="type proc_macro_error::ResultExt::Ok">Ok</a>;
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This traits expands <code>Result<T, Into<Diagnostic>></code> with some handy shortcuts.</p>
|
||||
</div></details><h2 id="required-associated-types" class="small-section-header">Required Associated Types<a href="#required-associated-types" class="anchor"></a></h2><div class="methods"><div id="associatedtype.Ok" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#359">source</a></div><h4 class="code-header">type <a href="#associatedtype.Ok" class="associatedtype">Ok</a></h4></div></div><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.unwrap_or_abort" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#363">source</a></div><h4 class="code-header">fn <a href="#tymethod.unwrap_or_abort" class="fnname">unwrap_or_abort</a>(self) -> Self::<a class="associatedtype" href="trait.ResultExt.html#associatedtype.Ok" title="type proc_macro_error::ResultExt::Ok">Ok</a></h4></div></summary><div class="docblock"><p>Behaves like <code>Result::unwrap</code>: if self is <code>Ok</code> yield the contained value,
|
||||
otherwise abort macro execution via <code>abort!</code>.</p>
|
||||
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.expect_or_abort" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#368">source</a></div><h4 class="code-header">fn <a href="#tymethod.expect_or_abort" class="fnname">expect_or_abort</a>(self, msg: &<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>) -> Self::<a class="associatedtype" href="trait.ResultExt.html#associatedtype.Ok" title="type proc_macro_error::ResultExt::Ok">Ok</a></h4></div></summary><div class="docblock"><p>Behaves like <code>Result::expect</code>: if self is <code>Ok</code> yield the contained value,
|
||||
otherwise abort macro execution via <code>abort!</code>.
|
||||
If it aborts then resulting error message will be preceded with <code>message</code>.</p>
|
||||
</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ResultExt-for-Result%3CT%2C%20E%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#390-410">source</a></span><a href="#impl-ResultExt-for-Result%3CT%2C%20E%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, E: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.Diagnostic.html" title="struct proc_macro_error::Diagnostic">Diagnostic</a>>> <a class="trait" href="trait.ResultExt.html" title="trait proc_macro_error::ResultExt">ResultExt</a> for <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, E></h3></section></summary><div class="impl-items"><section id="associatedtype.Ok-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Ok-1" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Ok" class="associatedtype">Ok</a> = T</h4></section><section id="method.unwrap_or_abort" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#393-398">source</a></span><a href="#method.unwrap_or_abort" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.unwrap_or_abort" class="fnname">unwrap_or_abort</a>(self) -> T</h4></section><section id="method.expect_or_abort" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/proc_macro_error/lib.rs.html#400-409">source</a></span><a href="#method.expect_or_abort" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.expect_or_abort" class="fnname">expect_or_abort</a>(self, message: &<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>) -> T</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><script type="text/javascript" src="../implementors/proc_macro_error/trait.ResultExt.js" data-ignore-extern-crates="core" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="proc_macro_error" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
|
Reference in New Issue
Block a user