## find_workspace_root_with_membership_check

# Function find_workspace_root_with_membership_check

Source

    pub fn find_workspace_root_with_membership_check(
        manifest_path: &Path,
        gctx: &GlobalContext,
    ) -> CargoResult<Option<PathBuf>>

Expand description

Finds the workspace root for a manifest, with minimal verification.

This is similar to `find_workspace_root`, but additionally verifies that the package and workspace agree on each other:

- If the package has an explicit `package.workspace` pointer, it is trusted
- Otherwise, the workspace must include the package in its `members` list