mirror of https://github.com/rust-lang/reference
Put slicing syntax behind a feature gate.
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
This commit is contained in:
parent
274d527c45
commit
714408be0f
|
@ -3837,7 +3837,7 @@ type signature of `print`, and the cast expression in `main`.
|
|||
Within the body of an item that has type parameter declarations, the names of
|
||||
its type parameters are types:
|
||||
|
||||
```
|
||||
```ignore
|
||||
fn map<A: Clone, B: Clone>(f: |A| -> B, xs: &[A]) -> Vec<B> {
|
||||
if xs.len() == 0 {
|
||||
return vec![];
|
||||
|
|
Loading…
Reference in New Issue