ICFP/SPLASH 2025
Sun 12 - Sat 18 October 2025 Singapore
Tue 14 Oct 2025 13:40 - 14:05 at Orchid Small - Session 2 Chair(s): Cyrus Omar

In Rust, trait implementations can introduce type parameters with trait bounds. Implementations that use type parameters may conflict, resulting in compile-time errors. In this paper, we introduce negative bounds to avoid such implementation conflicts and propose an algorithm for detecting these conflicts. Based on this algorithm, we have developed a prototype system for a subset of Rust that incorporates negative bounds, using a slightly simplified syntax for implementations. We also discuss the use of \emph{specialization}, as proposed in RFC 1210, in conjunction with negative bounds, which can reduce the number of implementations in the Rust standard library. We believe that incorporating negative bounds and specialization from RFC 1210 into the Rust compiler \texttt{rustc} will not significantly increase compilation time in typical cases.