private void updateComment(TreeCursor cursor) {
        cursor.getTree().tokens().findFirst().ifPresent(token -> {
            CapturedToken updatedToken = token.toBuilder()
                    // Trim the first "/" from the lexeme. Note that this does make the spans inaccurate.
                    .lexeme(token.getLexeme().subSequence(1, token.getLexeme().length()))
                    .build();
            TokenTree updatedTree = TokenTree.of(TreeType.COMMENT);
            updatedTree.appendChild(TokenTree.of(updatedToken));
            cursor.getParent().getTree().replaceChild(cursor.getTree(), updatedTree);
        });
    }
Rewrites invalid documentation comments that don't come directly before a shape or member to be a normal comment.

<p>TODO: This does not remove every possible invalid documentation comment (e.g., doc comments after traits).
smithy-syntax/src/main/java/software/amazon/smithy/syntax/FixBadDocComments.java