MCPcopy Create free account
hub / github.com/dtolnay/thiserror / explicit_named_args

Function explicit_named_args

impl/src/fmt.rs:172–190  ·  view source on GitHub ↗
(input: ParseStream)

Source from the content-addressed store, hash-verified

170
171#[allow(clippy::unnecessary_wraps)]
172fn explicit_named_args(input: ParseStream) -> Result<FmtArguments> {
173 let ahead = input.fork();
174 if let Ok(set) = try_explicit_named_args(&ahead) {
175 input.advance_to(&ahead);
176 return Ok(set);
177 }
178
179 let ahead = input.fork();
180 if let Ok(set) = fallback_explicit_named_args(&ahead) {
181 input.advance_to(&ahead);
182 return Ok(set);
183 }
184
185 input.parse::<TokenStream>().unwrap();
186 Ok(FmtArguments {
187 named: BTreeSet::new(),
188 first_unnamed: None,
189 })
190}
191
192fn try_explicit_named_args(input: ParseStream) -> Result<FmtArguments> {
193 let mut syn_full = None;

Callers

nothing calls this directly

Calls 2

try_explicit_named_argsFunction · 0.85

Tested by

no test coverage detected