fn ensure_no_path_args(seg: &PathSegment) -> Result<()>