@@ -10,7 +10,7 @@ LL | foo::<{ BAR + 3 }>();
1010 | ^ ^
1111
1212error: expressions must be enclosed in braces to be used as const generic arguments
13- --> $DIR/const-expression-suggest-missing-braces.rs:18 :11
13+ --> $DIR/const-expression-suggest-missing-braces.rs:19 :11
1414 |
1515LL | foo::<3 + 3>();
1616 | ^^^^^
@@ -21,7 +21,7 @@ LL | foo::<{ 3 + 3 }>();
2121 | ^ ^
2222
2323error: expected one of `,` or `>`, found `-`
24- --> $DIR/const-expression-suggest-missing-braces.rs:21 :15
24+ --> $DIR/const-expression-suggest-missing-braces.rs:22 :15
2525 |
2626LL | foo::<BAR - 3>();
2727 | ^ expected one of `,` or `>`
@@ -32,7 +32,7 @@ LL | foo::<{ BAR - 3 }>();
3232 | ^ ^
3333
3434error: expected one of `,` or `>`, found `-`
35- --> $DIR/const-expression-suggest-missing-braces.rs:24 :15
35+ --> $DIR/const-expression-suggest-missing-braces.rs:25 :15
3636 |
3737LL | foo::<BAR - BAR>();
3838 | ^ expected one of `,` or `>`
@@ -43,7 +43,7 @@ LL | foo::<{ BAR - BAR }>();
4343 | ^ ^
4444
4545error: expressions must be enclosed in braces to be used as const generic arguments
46- --> $DIR/const-expression-suggest-missing-braces.rs:27 :11
46+ --> $DIR/const-expression-suggest-missing-braces.rs:28 :11
4747 |
4848LL | foo::<100 - BAR>();
4949 | ^^^^^^^^^
@@ -54,7 +54,7 @@ LL | foo::<{ 100 - BAR }>();
5454 | ^ ^
5555
5656error: expected one of `,` or `>`, found `(`
57- --> $DIR/const-expression-suggest-missing-braces.rs:30 :19
57+ --> $DIR/const-expression-suggest-missing-braces.rs:31 :19
5858 |
5959LL | foo::<bar<i32>()>();
6060 | ^ expected one of `,` or `>`
@@ -65,7 +65,7 @@ LL | foo::<{ bar<i32>() }>();
6565 | ^ ^
6666
6767error: expected one of `,` or `>`, found `(`
68- --> $DIR/const-expression-suggest-missing-braces.rs:33 :21
68+ --> $DIR/const-expression-suggest-missing-braces.rs:34 :21
6969 |
7070LL | foo::<bar::<i32>()>();
7171 | ^ expected one of `,` or `>`
@@ -76,7 +76,7 @@ LL | foo::<{ bar::<i32>() }>();
7676 | ^ ^
7777
7878error: expected one of `,` or `>`, found `(`
79- --> $DIR/const-expression-suggest-missing-braces.rs:36 :21
79+ --> $DIR/const-expression-suggest-missing-braces.rs:37 :21
8080 |
8181LL | foo::<bar::<i32>() + BAR>();
8282 | ^ expected one of `,` or `>`
@@ -87,7 +87,7 @@ LL | foo::<{ bar::<i32>() + BAR }>();
8787 | ^ ^
8888
8989error: expected one of `,` or `>`, found `(`
90- --> $DIR/const-expression-suggest-missing-braces.rs:39 :21
90+ --> $DIR/const-expression-suggest-missing-braces.rs:40 :21
9191 |
9292LL | foo::<bar::<i32>() - BAR>();
9393 | ^ expected one of `,` or `>`
@@ -98,7 +98,7 @@ LL | foo::<{ bar::<i32>() - BAR }>();
9898 | ^ ^
9999
100100error: expected one of `,` or `>`, found `-`
101- --> $DIR/const-expression-suggest-missing-braces.rs:42 :15
101+ --> $DIR/const-expression-suggest-missing-braces.rs:43 :15
102102 |
103103LL | foo::<BAR - bar::<i32>()>();
104104 | ^ expected one of `,` or `>`
@@ -109,7 +109,7 @@ LL | foo::<{ BAR - bar::<i32>() }>();
109109 | ^ ^
110110
111111error: expected one of `,` or `>`, found `-`
112- --> $DIR/const-expression-suggest-missing-braces.rs:45 :15
112+ --> $DIR/const-expression-suggest-missing-braces.rs:46 :15
113113 |
114114LL | foo::<BAR - bar::<i32>()>();
115115 | ^ expected one of `,` or `>`
@@ -138,6 +138,8 @@ LL | foo::<BAR + BAR>();
138138 | ^^^^^^^^^ help: use `dyn`: `dyn BAR + BAR`
139139 |
140140 = note: `#[warn(bare_trait_objects)]` on by default
141+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
142+ = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
141143
142144error[E0747]: type provided when a constant was expected
143145 --> $DIR/const-expression-suggest-missing-braces.rs:11:11
0 commit comments