more clippy::complexity fixes

This commit is contained in:
Matthias Krüger 2022-12-15 00:06:34 +01:00
parent fbf8b937b4
commit de59844c98
13 changed files with 23 additions and 41 deletions

View file

@ -2466,7 +2466,7 @@ pub enum ModKind {
Unloaded,
}
#[derive(Copy, Clone, Encodable, Decodable, Debug)]
#[derive(Copy, Clone, Encodable, Decodable, Debug, Default)]
pub struct ModSpans {
/// `inner_span` covers the body of the module; for a file module, its the whole file.
/// For an inline module, its the span inside the `{ ... }`, not including the curly braces.
@ -2474,12 +2474,6 @@ pub struct ModSpans {
pub inject_use_span: Span,
}
impl Default for ModSpans {
fn default() -> ModSpans {
ModSpans { inner_span: Default::default(), inject_use_span: Default::default() }
}
}
/// Foreign module declaration.
///
/// E.g., `extern { .. }` or `extern "C" { .. }`.