]>
Commit | Line | Data |
---|---|---|
29967ef6 | 1 | error: expected one of `,` or `>`, found `3` |
5869c6ff | 2 | --> $DIR/const-expression-suggest-missing-braces.rs:6:17 |
29967ef6 XL |
3 | | |
4 | LL | foo::<BAR + 3>(); | |
5 | | ^ expected one of `,` or `>` | |
6 | | | |
7 | help: expressions must be enclosed in braces to be used as const generic arguments | |
8 | | | |
9 | LL | foo::<{ BAR + 3 }>(); | |
10 | | ^ ^ | |
11 | ||
12 | error: expressions must be enclosed in braces to be used as const generic arguments | |
17df50a5 | 13 | --> $DIR/const-expression-suggest-missing-braces.rs:19:11 |
29967ef6 XL |
14 | | |
15 | LL | foo::<3 + 3>(); | |
16 | | ^^^^^ | |
17 | | | |
18 | help: enclose the `const` expression in braces | |
19 | | | |
20 | LL | foo::<{ 3 + 3 }>(); | |
21 | | ^ ^ | |
22 | ||
23 | error: expected one of `,` or `>`, found `-` | |
17df50a5 | 24 | --> $DIR/const-expression-suggest-missing-braces.rs:22:15 |
29967ef6 XL |
25 | | |
26 | LL | foo::<BAR - 3>(); | |
27 | | ^ expected one of `,` or `>` | |
28 | | | |
29 | help: expressions must be enclosed in braces to be used as const generic arguments | |
30 | | | |
31 | LL | foo::<{ BAR - 3 }>(); | |
32 | | ^ ^ | |
33 | ||
34 | error: expected one of `,` or `>`, found `-` | |
17df50a5 | 35 | --> $DIR/const-expression-suggest-missing-braces.rs:25:15 |
29967ef6 XL |
36 | | |
37 | LL | foo::<BAR - BAR>(); | |
38 | | ^ expected one of `,` or `>` | |
39 | | | |
40 | help: expressions must be enclosed in braces to be used as const generic arguments | |
41 | | | |
42 | LL | foo::<{ BAR - BAR }>(); | |
43 | | ^ ^ | |
44 | ||
45 | error: expressions must be enclosed in braces to be used as const generic arguments | |
17df50a5 | 46 | --> $DIR/const-expression-suggest-missing-braces.rs:28:11 |
29967ef6 XL |
47 | | |
48 | LL | foo::<100 - BAR>(); | |
49 | | ^^^^^^^^^ | |
50 | | | |
51 | help: enclose the `const` expression in braces | |
52 | | | |
53 | LL | foo::<{ 100 - BAR }>(); | |
54 | | ^ ^ | |
55 | ||
56 | error: expected one of `,` or `>`, found `(` | |
17df50a5 | 57 | --> $DIR/const-expression-suggest-missing-braces.rs:31:19 |
29967ef6 XL |
58 | | |
59 | LL | foo::<bar<i32>()>(); | |
60 | | ^ expected one of `,` or `>` | |
61 | | | |
62 | help: expressions must be enclosed in braces to be used as const generic arguments | |
63 | | | |
64 | LL | foo::<{ bar<i32>() }>(); | |
65 | | ^ ^ | |
66 | ||
67 | error: expected one of `,` or `>`, found `(` | |
17df50a5 | 68 | --> $DIR/const-expression-suggest-missing-braces.rs:34:21 |
29967ef6 XL |
69 | | |
70 | LL | foo::<bar::<i32>()>(); | |
71 | | ^ expected one of `,` or `>` | |
72 | | | |
73 | help: expressions must be enclosed in braces to be used as const generic arguments | |
74 | | | |
75 | LL | foo::<{ bar::<i32>() }>(); | |
76 | | ^ ^ | |
77 | ||
78 | error: expected one of `,` or `>`, found `(` | |
17df50a5 | 79 | --> $DIR/const-expression-suggest-missing-braces.rs:37:21 |
29967ef6 XL |
80 | | |
81 | LL | foo::<bar::<i32>() + BAR>(); | |
82 | | ^ expected one of `,` or `>` | |
83 | | | |
84 | help: expressions must be enclosed in braces to be used as const generic arguments | |
85 | | | |
86 | LL | foo::<{ bar::<i32>() + BAR }>(); | |
87 | | ^ ^ | |
88 | ||
89 | error: expected one of `,` or `>`, found `(` | |
17df50a5 | 90 | --> $DIR/const-expression-suggest-missing-braces.rs:40:21 |
29967ef6 XL |
91 | | |
92 | LL | foo::<bar::<i32>() - BAR>(); | |
93 | | ^ expected one of `,` or `>` | |
94 | | | |
95 | help: expressions must be enclosed in braces to be used as const generic arguments | |
96 | | | |
97 | LL | foo::<{ bar::<i32>() - BAR }>(); | |
98 | | ^ ^ | |
99 | ||
100 | error: expected one of `,` or `>`, found `-` | |
17df50a5 | 101 | --> $DIR/const-expression-suggest-missing-braces.rs:43:15 |
29967ef6 XL |
102 | | |
103 | LL | foo::<BAR - bar::<i32>()>(); | |
104 | | ^ expected one of `,` or `>` | |
105 | | | |
106 | help: expressions must be enclosed in braces to be used as const generic arguments | |
107 | | | |
108 | LL | foo::<{ BAR - bar::<i32>() }>(); | |
109 | | ^ ^ | |
110 | ||
111 | error: expected one of `,` or `>`, found `-` | |
17df50a5 | 112 | --> $DIR/const-expression-suggest-missing-braces.rs:46:15 |
29967ef6 XL |
113 | | |
114 | LL | foo::<BAR - bar::<i32>()>(); | |
115 | | ^ expected one of `,` or `>` | |
116 | | | |
117 | help: expressions must be enclosed in braces to be used as const generic arguments | |
118 | | | |
119 | LL | foo::<{ BAR - bar::<i32>() }>(); | |
120 | | ^ ^ | |
121 | ||
122 | error[E0404]: expected trait, found constant `BAR` | |
5869c6ff | 123 | --> $DIR/const-expression-suggest-missing-braces.rs:11:11 |
29967ef6 XL |
124 | | |
125 | LL | foo::<BAR + BAR>(); | |
126 | | ^^^ not a trait | |
127 | ||
128 | error[E0404]: expected trait, found constant `BAR` | |
5869c6ff | 129 | --> $DIR/const-expression-suggest-missing-braces.rs:11:17 |
29967ef6 XL |
130 | | |
131 | LL | foo::<BAR + BAR>(); | |
132 | | ^^^ not a trait | |
133 | ||
134 | warning: trait objects without an explicit `dyn` are deprecated | |
5869c6ff | 135 | --> $DIR/const-expression-suggest-missing-braces.rs:11:11 |
29967ef6 XL |
136 | | |
137 | LL | foo::<BAR + BAR>(); | |
138 | | ^^^^^^^^^ help: use `dyn`: `dyn BAR + BAR` | |
139 | | | |
140 | = note: `#[warn(bare_trait_objects)]` on by default | |
136023e0 | 141 | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! |
17df50a5 | 142 | = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165> |
29967ef6 | 143 | |
fc512014 | 144 | error[E0747]: type provided when a constant was expected |
5869c6ff | 145 | --> $DIR/const-expression-suggest-missing-braces.rs:11:11 |
29967ef6 XL |
146 | | |
147 | LL | foo::<BAR + BAR>(); | |
fc512014 | 148 | | ^^^^^^^^^ |
29967ef6 | 149 | |
fc512014 | 150 | error: aborting due to 14 previous errors; 1 warning emitted |
29967ef6 | 151 | |
fc512014 XL |
152 | Some errors have detailed explanations: E0404, E0747. |
153 | For more information about an error, try `rustc --explain E0404`. |