Skip to content

ctest: Check public API in modules #5365

Description

@tgross35

Currently ctest requires everything on the Rust side to be available at the crate root. We should check nested modules too, though, since we may have more in the future when things conflict.

I think this could be implemented by adding API to ctest like the following:

// Same for `Struct`, `Const`, etc
impl Struct {
    pub fn path() -> ItemPath;
}

pub struct ItemPath(BoxStr);

impl ItemPath {
    pub fn as_str(&self) -> &str {
        &self.0
    }

    pub fn components(&self) -> impl DoubleEndedIterator<Item = &str> {
        self.0.split("::")
    }
}

Cc @mbyx

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ctestIssues relating to the ctest crate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions