fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
3.1 KiB66 linesraw
1error: parenthesized type parameters may only be used with a `Fn` trait
2  --> $DIR/issue-32995.rs:4:12
3   |
4LL |     let x: usize() = 1;
5   |            ^^^^^^^
6   |
7   = note: `#[deny(parenthesized_params_in_types_and_modules)]` on by default
8   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
10
11error: parenthesized type parameters may only be used with a `Fn` trait
12  --> $DIR/issue-32995.rs:8:19
13   |
14LL |     let b: ::std::boxed()::Box<_> = Box::new(1);
15   |                   ^^^^^^^
16   |
17   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
19
20error: parenthesized type parameters may only be used with a `Fn` trait
21  --> $DIR/issue-32995.rs:12:20
22   |
23LL |     let p = ::std::str::()::from_utf8(b"foo").unwrap();
24   |                    ^^^^^^^
25   |
26   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
27   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
28
29error: parenthesized type parameters may only be used with a `Fn` trait
30  --> $DIR/issue-32995.rs:16:25
31   |
32LL |     let p = ::std::str::from_utf8::()(b"foo").unwrap();
33   |                         ^^^^^^^^^^^^^
34   |
35   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
36   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
37
38error: parenthesized type parameters may only be used with a `Fn` trait
39  --> $DIR/issue-32995.rs:20:29
40   |
41LL |     let o : Box<dyn (::std::marker()::Send)> = Box::new(1);
42   |                             ^^^^^^^^
43   |
44   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
45   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
46
47error: parenthesized type parameters may only be used with a `Fn` trait
48  --> $DIR/issue-32995.rs:24:35
49   |
50LL |     let o : Box<dyn Send + ::std::marker()::Sync> = Box::new(1);
51   |                                   ^^^^^^^^
52   |
53   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
54   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
55
56error: parenthesized type parameters may only be used with a `Fn` trait
57  --> $DIR/issue-32995.rs:30:13
58   |
59LL |     let d : X() = Default::default();
60   |             ^^^
61   |
62   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
63   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
64
65error: aborting due to 7 previous errors
66