Skip to content

Commit 4ec984b

Browse files
committed
asd
1 parent 9fe55ae commit 4ec984b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/items/generics.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The only allowed types of const parameters are `u8`, `u16`, `u32`, `u64`, `u128`
4949
Const parameters may only be be used as standalone arguments inside
5050
of [types] and [repeat expressions] but may be freely used elsewhere:
5151

52-
```rust,should_panic
52+
```rust,compile_fail
5353
// ok: standalone argument
5454
fn foo<const N: usize>() -> [u8; N] { todo!() }
5555
@@ -60,7 +60,7 @@ fn bar<const N: usize>() -> [u8; N + 1] { todo!() }
6060
Unlike type and lifetime parameters, const parameters of types can be used without
6161
being mentioned inside of a parameterized type:
6262

63-
```rust
63+
```rust,compile_fail
6464
// ok
6565
struct Foo<const N: usize>;
6666
enum Bar<const M: usize> { A, B }

0 commit comments

Comments
 (0)