rust/tests/ui/traits/self-implements-kinds-in-default-methods-8171.rs
2025-08-17 13:01:02 -04:00

20 lines
330 B
Rust

// https://github.com/rust-lang/rust/issues/8171
//@ check-pass
#![allow(dead_code)]
/*
#8171 Self is not recognised as implementing kinds in default method implementations
*/
fn require_send<T: Send>(_: T){}
trait TragicallySelfIsNotSend: Send + Sized {
fn x(self) {
require_send(self);
}
}
pub fn main(){}