mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
17 lines
381 B
Rust
17 lines
381 B
Rust
//run-rustfix
|
|
#![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() {}
|