rust/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
362 B
Rust
Raw Normal View History

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