Skip to content

Commit 5ec812d

Browse files
Add addl test
1 parent cec7835 commit 5ec812d

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![feature(closure_lifetime_binder, non_lifetime_binders)]
2+
//~^ WARN is incomplete and may not be safe to use
3+
4+
fn main() {
5+
for<const N: i32> || -> () {};
6+
//~^ ERROR late-bound const parameter not allowed on closures
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/const-bound.rs:1:37
3+
|
4+
LL | #![feature(closure_lifetime_binder, non_lifetime_binders)]
5+
| ^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
8+
= note: `#[warn(incomplete_features)]` on by default
9+
10+
error: late-bound const parameter not allowed on closures
11+
--> $DIR/const-bound.rs:5:9
12+
|
13+
LL | for<const N: i32> || -> () {};
14+
| ^^^^^^^^^^^^
15+
16+
error: aborting due to previous error; 1 warning emitted
17+

0 commit comments

Comments
 (0)