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