2023-08-14 04:51:19 -05:00
|
|
|
//@run-rustfix
|
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
|
|
trait Trait {}
|
|
|
|
|
2024-02-12 18:17:19 -06:00
|
|
|
fn assert_send() -> *mut (dyn Trait + Send) {
|
2023-08-14 04:51:19 -05:00
|
|
|
//~^ ERROR incorrect parentheses around trait bounds
|
2024-02-12 18:17:19 -06:00
|
|
|
loop {}
|
2023-08-14 04:51:19 -05: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() {}
|