mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
fe0bd76a8b
if a trait is unknowable, but its super trait is definitely not implemented, then the trait itself is definitely also not implemented.
19 lines
488 B
Rust
19 lines
488 B
Rust
// Regression test for #48728, an ICE that occurred computing
|
|
// coherence "help" information.
|
|
|
|
//@ revisions: current next
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
|
//@[next] compile-flags: -Znext-solver
|
|
//@[next] check-pass
|
|
|
|
#[derive(Clone)] //[current]~ ERROR conflicting implementations of trait `Clone`
|
|
struct Node<T: ?Sized>(Box<T>);
|
|
|
|
impl<T: Clone + ?Sized> Clone for Node<[T]> {
|
|
fn clone(&self) -> Self {
|
|
Node(Box::clone(&self.0))
|
|
}
|
|
}
|
|
|
|
fn main() {}
|