Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_expand/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ pub trait LintStoreExpand {

type LintStoreExpandDyn<'a> = Option<&'a (dyn LintStoreExpand + 'a)>;

#[derive(Debug, Clone, Default)]
#[derive(Debug, Default)]
pub struct ModuleData {
/// Path to the module starting from the crate name, like `my_crate::foo::bar`.
pub mod_path: Vec<Ident>,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/error_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl TypoSuggestion {
}

/// A free importable items suggested in case of resolution failure.
#[derive(Debug, Clone)]
#[derive(Debug)]
pub(crate) struct ImportSuggestion {
pub did: Option<DefId>,
pub descr: &'static str,
Expand Down
9 changes: 4 additions & 5 deletions compiler/rustc_resolve/src/imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ impl<'ra> PendingDecl<'ra> {
}

/// Contains data for specific kinds of imports.
#[derive(Clone)]
pub(crate) enum ImportKind<'ra> {
Single {
/// `source` in `use prefix::source as target`.
Expand Down Expand Up @@ -157,7 +156,7 @@ impl<'ra> std::fmt::Debug for ImportKind<'ra> {
}

/// One import.
#[derive(Debug, Clone)]
#[derive(Debug)]
pub(crate) struct ImportData<'ra> {
pub kind: ImportKind<'ra>,

Expand Down Expand Up @@ -280,7 +279,7 @@ impl<'ra> ImportData<'ra> {
}

/// Records information about the resolution of a name in a namespace of a module.
#[derive(Clone, Debug)]
#[derive(Debug)]
pub(crate) struct NameResolution<'ra> {
/// Single imports that may define the name in the namespace.
/// Imports are arena-allocated, so it's ok to use pointers as keys.
Expand Down Expand Up @@ -322,7 +321,7 @@ impl<'ra> NameResolution<'ra> {

/// An error that may be transformed into a diagnostic later. Used to combine multiple unresolved
/// import errors within the same use tree into a single diagnostic.
#[derive(Debug, Clone)]
#[derive(Debug)]
pub(crate) struct UnresolvedImportError {
pub(crate) span: Span,
pub(crate) label: Option<String>,
Expand All @@ -341,7 +340,7 @@ fn pub_use_of_private_extern_crate_hack(
import: ImportSummary,
decl: Decl<'_>,
) -> Option<LocalDefId> {
match (import.is_single, decl.kind) {
match (import.is_single, &decl.kind) {
(true, DeclKind::Import { import: decl_import, .. })
if let ImportKind::ExternCrate { def_id, .. } = decl_import.kind
&& import.vis.is_public() =>
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/late/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub(super) struct MissingLifetime {

/// Description of the lifetimes appearing in a function parameter.
/// This is used to provide a literal explanation to the elision failure.
#[derive(Clone, Debug)]
#[derive(Debug)]
pub(super) struct ElisionFnParameter {
/// The index of the argument in the original definition.
pub index: usize,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_resolve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ impl<'ra> fmt::Debug for LocalModule<'ra> {
}

/// Data associated with any name declaration.
#[derive(Clone, Debug)]
#[derive(Debug)]
struct DeclData<'ra> {
kind: DeclKind<'ra>,
ambiguity: CmCell<Option<(Decl<'ra>, bool /*warning*/)>>,
Expand Down Expand Up @@ -1026,7 +1026,7 @@ impl std::hash::Hash for DeclData<'_> {
}

/// Name declaration kind.
#[derive(Clone, Copy, Debug)]
#[derive(Debug)]
enum DeclKind<'ra> {
/// The name declaration is a definition (possibly without a `DefId`),
/// can be provided by source code or built into the language.
Expand Down
Loading