That’s not the only change.
rust:latest is now pointing at bookworm: Docker . Bookworm was released in late June and sometime in the past two month a new rust image must have been released. Previously it undoubtedly was using bullseye.
It will be a while until the next Debian release, so try:
FROM rust:bookworm as builder
. . .
FROM debian:bookworm-slim