fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.8 KiB45 linesraw
1error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
2  --> $DIR/issue-32995.rs:2:12
3   |
4LL |     let x: usize() = 1;
5   |            ^^^^^^^ only `Fn` traits may use parentheses
6
7error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
8  --> $DIR/issue-32995.rs:5:19
9   |
10LL |     let b: ::std::boxed()::Box<_> = Box::new(1);
11   |                   ^^^^^^^ only `Fn` traits may use parentheses
12
13error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
14  --> $DIR/issue-32995.rs:8:20
15   |
16LL |     let p = ::std::str::()::from_utf8(b"foo").unwrap();
17   |                    ^^^^^^^ only `Fn` traits may use parentheses
18
19error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
20  --> $DIR/issue-32995.rs:11:25
21   |
22LL |     let p = ::std::str::from_utf8::()(b"foo").unwrap();
23   |                         ^^^^^^^^^^^^^ only `Fn` traits may use parentheses
24
25error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
26  --> $DIR/issue-32995.rs:14:29
27   |
28LL |     let o : Box<dyn (::std::marker()::Send)> = Box::new(1);
29   |                             ^^^^^^^^ only `Fn` traits may use parentheses
30
31error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
32  --> $DIR/issue-32995.rs:17:35
33   |
34LL |     let o : Box<dyn Send + ::std::marker()::Sync> = Box::new(1);
35   |                                   ^^^^^^^^ only `Fn` traits may use parentheses
36
37error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
38  --> $DIR/issue-32995.rs:22:13
39   |
40LL |     let d : X() = Default::default();
41   |             ^^^ only `Fn` traits may use parentheses
42
43error: aborting due to 7 previous errors
44
45For more information about this error, try `rustc --explain E0214`.