mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-01 13:34:38 +00:00
16 lines
428 B
Rust
16 lines
428 B
Rust
//! Check for compilation errors when a trait is used with an incorrect number of generic arguments.
|
|
|
|
fn main() {
|
|
trait Seq {}
|
|
|
|
impl<T> Seq<T> for Vec<T> {
|
|
//~^ ERROR trait takes 0 generic arguments but 1 generic argument
|
|
/* ... */
|
|
}
|
|
|
|
impl Seq<bool> for u32 {
|
|
//~^ ERROR trait takes 0 generic arguments but 1 generic argument
|
|
/* Treat the integer as a sequence of bits */
|
|
}
|
|
}
|