mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
20 lines
442 B
Rust
20 lines
442 B
Rust
//@ check-pass
|
|
// Regression test for <https://github.com/rust-lang/rust/issues/123303>.
|
|
|
|
pub trait Trait: Supertrait {}
|
|
|
|
trait Impossible {}
|
|
impl<F: ?Sized + Impossible> Trait for F {}
|
|
|
|
pub trait Supertrait {}
|
|
|
|
impl<T: ?Sized + Trait + Impossible> Supertrait for T {}
|
|
|
|
fn needs_supertrait<T: ?Sized + Supertrait>() {}
|
|
fn needs_trait<T: ?Sized + Trait>() {}
|
|
|
|
fn main() {
|
|
needs_supertrait::<dyn Trait>();
|
|
needs_trait::<dyn Trait>();
|
|
}
|