Closed
Description
While convoluting some code to try to find error messages, I came across a loop in the errors.
The code:
impl<T: Drop> Drop for T {
fn drop(&mut self) {}
}
The errors:
120.rs:17:1: 19:2 error: the Drop trait may only be implemented on structures [E0120]
120.rs:17 impl<T: Drop> Drop for T {
120.rs:18 fn drop(&mut self) {}
120.rs:19 }
120.rs:17:1: 19:2 error: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`); only traits defined in the current crate can be implemented for a type parameter [E0210]
120.rs:17 impl<T: Drop> Drop for T {
120.rs:18 fn drop(&mut self) {}
120.rs:19 }
120.rs:17:1: 19:2 error: conflicting implementations for trait `core::ops::Drop` [E0119]
120.rs:17 impl<T: Drop> Drop for T {
120.rs:18 fn drop(&mut self) {}
120.rs:19 }
120.rs:17:1: 19:2 help: run `rustc --explain E0119` to see a detailed explanation
120.rs:17:1: 19:2 note: conflicting implementation in crate `alloc`
120.rs:17 impl<T: Drop> Drop for T {
120.rs:18 fn drop(&mut self) {}
120.rs:19 }
120.rs:17:1: 19:2 error: conflicting implementations for trait `core::ops::Drop` [E0119]
120.rs:17 impl<T: Drop> Drop for T {
120.rs:18 fn drop(&mut self) {}
120.rs:19 }
120.rs:17:1: 19:2 help: run `rustc --explain E0119` to see a detailed explanation
120.rs:17:1: 19:2 note: conflicting implementation in crate `std`
120.rs:17 impl<T: Drop> Drop for T {
120.rs:18 fn drop(&mut self) {}
120.rs:19 }
...repeat...
error: aborting due to 55 previous errors
Obviously not an especially severe issue!