   (with-temp-buffer
     (rust-mode)
     (insert content)
-    (font-lock-ensure)
+    (font-lock-fontify-buffer)
     (dolist (pair pairs)
       (let* ((open-pos (nth 0 pair))
              (close-pos (nth 1 pair)))

1......................500......................50
\"#;
")
    (font-lock-ensure)
    (goto-char 530)
    (insert "#")
    ;; We have now closed the raw string.  Check that the whole string is

(ert-deftest rust-test-two-character-quotes-in-a-row ()
  (with-temp-buffer
    (rust-mode)
    (font-lock-fontify-buffer)
    (insert "'\\n','a', fn")
    (font-lock-after-change-function 1 12 0)

