Keep up with recent visibility changes in Rust

Recent commit mozilla/rust@2e7ec80bcce454d55d31c6bd335bb2ad64a7298e added stronger visibility checks to Rust. This patch aligns with that change.