diff --git a/src/parse_util.cpp b/src/parse_util.cpp
index f5880fe9b..32aa7fdb7 100644
--- a/src/parse_util.cpp
+++ b/src/parse_util.cpp
@@ -177,11 +177,6 @@ static int parse_util_locate_brackets_of_type(const wchar_t *in, wchar_t **begin
     return 1;
 }
 
-int parse_util_locate_cmdsubst(const wchar_t *in, wchar_t **begin, wchar_t **end,
-                               bool accept_incomplete) {
-    return parse_util_locate_brackets_of_type(in, begin, end, accept_incomplete, L'(', L')');
-}
-
 int parse_util_locate_slice(const wchar_t *in, wchar_t **begin, wchar_t **end,
                             bool accept_incomplete) {
     return parse_util_locate_brackets_of_type(in, begin, end, accept_incomplete, L'[', L']');
@@ -254,7 +249,7 @@ void parse_util_cmdsubst_extent(const wchar_t *buff, size_t cursor_pos, const wc
     const wchar_t *pos = buff;
     for (;;) {
         wchar_t *begin = nullptr, *end = nullptr;
-        if (parse_util_locate_cmdsubst(pos, &begin, &end, true) <= 0) {
+        if (parse_util_locate_brackets_of_type(pos, &begin, &end, true, L'(', L')') <= 0) {
             // No subshell found, all done.
             break;
         }
diff --git a/src/parse_util.h b/src/parse_util.h
index 17888367d..85f7e13da 100644
--- a/src/parse_util.h
+++ b/src/parse_util.h
@@ -14,16 +14,6 @@ namespace ast {
 struct argument_t;
 }
 
-/// Find the beginning and end of the first subshell in the specified string.
-///
-/// \param in the string to search for subshells
-/// \param begin the starting parenthesis of the subshell
-/// \param end the ending parenthesis of the subshell
-/// \param accept_incomplete whether to permit missing closing parenthesis
-/// \return -1 on syntax error, 0 if no subshells exist and 1 on success
-int parse_util_locate_cmdsubst(const wchar_t *in, wchar_t **begin, wchar_t **end,
-                               bool accept_incomplete);
-
 /// Same as parse_util_locate_cmdsubst, but handles square brackets [ ].
 int parse_util_locate_slice(const wchar_t *in, wchar_t **begin, wchar_t **end,
                             bool accept_incomplete);