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
4 changes: 2 additions & 2 deletions crates/wit-parser/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1686,13 +1686,13 @@ fn eat_id(tokens: &mut Tokenizer<'_>, expected: &str) -> Result<Span> {
/// [`UnresolvedPackage`].
///
/// [`UnresolvedPackage`]: crate::UnresolvedPackage
#[derive(Clone, Default, Debug)]
#[derive(Clone, Default, Debug, PartialEq, Eq)]
pub struct SourceMap {
sources: Vec<Source>,
offset: u32,
}

#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq, Eq)]
struct Source {
offset: u32,
path: String,
Expand Down
18 changes: 9 additions & 9 deletions crates/wit-parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub type TypeId = Id<TypeDef>;
/// will connect the `foreign_deps` field of this structure to packages
/// previously inserted within the [`Resolve`]. Embedders are responsible for
/// performing this resolution themselves.
#[derive(Clone)]
#[derive(Clone, PartialEq, Eq)]
pub struct UnresolvedPackage {
/// The namespace, name, and version information for this package.
pub name: PackageName,
Expand Down Expand Up @@ -175,7 +175,7 @@ impl UnresolvedPackage {
}

/// Tracks a set of packages, all pulled from the same group of WIT source files.
#[derive(Clone)]
#[derive(Clone, PartialEq, Eq)]
pub struct UnresolvedPackageGroup {
/// The "main" package in this package group which was found at the root of
/// the WIT files.
Expand All @@ -190,7 +190,7 @@ pub struct UnresolvedPackageGroup {
pub source_map: SourceMap,
}

#[derive(Debug, Copy, Clone)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Serialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "kebab-case"))]
pub enum AstItem {
Expand Down Expand Up @@ -467,7 +467,7 @@ impl UnresolvedPackageGroup {
}
}

#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Serialize))]
pub struct World {
/// The WIT identifier name of this world.
Expand Down Expand Up @@ -516,7 +516,7 @@ impl World {
}
}

#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct IncludeName {
/// The name of the item
pub name: String,
Expand All @@ -527,7 +527,7 @@ pub struct IncludeName {

/// An entry in the `includes` list of a world, representing an `include`
/// statement in WIT.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct WorldInclude {
/// The stability annotation on this include.
pub stability: Stability,
Expand Down Expand Up @@ -600,7 +600,7 @@ impl WorldKey {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Serialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "kebab-case"))]
pub enum WorldItem {
Expand Down Expand Up @@ -654,7 +654,7 @@ impl WorldItem {
}
}

#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Serialize))]
pub struct Interface {
/// Optionally listed name of this interface.
Expand Down Expand Up @@ -714,7 +714,7 @@ impl Interface {
}
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Serialize))]
pub struct TypeDef {
pub name: Option<String>,
Expand Down