2023-08-14 17:51:19 +08:00
|
|
|
//@run-rustfix
|
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
|
|
trait Trait {}
|
|
|
|
|
2024-02-13 00:17:19 +00:00
|
|
|
fn assert_send() -> *mut dyn (Trait + Send) {
|
2023-08-14 17:51:19 +08:00
|
|
|
//~^ ERROR incorrect parentheses around trait bounds
|
2024-02-13 00:17:19 +00:00
|
|
|
loop {}
|
2023-08-14 17:51:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
fn foo2(_: &dyn (Trait + Send)) {}
|
|
|
|
//~^ ERROR incorrect parentheses around trait bounds
|
|
|
|
|
|
|
|
fn foo3(_: &dyn(Trait + Send)) {}
|
|
|
|
//~^ ERROR incorrect parentheses around trait bounds
|
|
|
|
|
|
|
|
fn main() {}
|