Skip to content

rustdoc-json-types: Inconsistant spelling of type/ty #94889

Closed
@aDotInTheVoid

Description

@aDotInTheVoid

We mostly use type_: Type,

#[serde(rename = "type")]
pub type_: Type,

But sometimes use ty

Const {
ty: Type,
default: Option<String>,
},

pub enum WherePredicate {
BoundPredicate { ty: Type, bounds: Vec<GenericBound> },
RegionPredicate { lifetime: String, bounds: Vec<GenericBound> },
EqPredicate { lhs: Type, rhs: Term },
}

We should choose one and stick to it. ty is nicer to type (ha), and generaly consistant with compiller internals, but for those who don't know, type_ is much more clear, even if more ugly.

cc @CraftSpider @P1n3appl3 what do you think?

@rustbot modify labels: +A-rustdoc-json +T-rustdoc +C-discussion

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-jsonArea: Rustdoc JSON backendC-discussionCategory: Discussion or questions that doesn't represent real issues.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions