rust/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.rs
Maybe Waffle bb651d358d blessings
2024-07-04 17:56:09 +02:00

18 lines
361 B
Rust

//@run-rustfix
#![allow(dead_code)]
trait Trait {}
fn assert_send() -> *mut dyn (Trait + Send) {
//~^ ERROR incorrect parentheses around trait bounds
loop {}
}
fn foo2(_: &dyn (Trait + Send)) {}
//~^ ERROR incorrect parentheses around trait bounds
fn foo3(_: &dyn(Trait + Send)) {}
//~^ ERROR incorrect parentheses around trait bounds
fn main() {}