From 40584f14da6945fe877989c6b43b90866a45ef4b Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 4 May 2021 22:45:03 +0200 Subject: [PATCH 1/2] const generic parameter -> const parameter --- src/const_eval.md | 4 ++-- src/items/generics.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/const_eval.md b/src/const_eval.md index 4874a7372..5e98729e0 100644 --- a/src/const_eval.md +++ b/src/const_eval.md @@ -98,7 +98,7 @@ Notable features that const contexts have, but const fn haven't are: Conversely, the following are possible in a const function, but not in a const context: * Use of generic type and lifetime parameters. - * Const contexts do allow limited use of [const generic parameters]. + * Const contexts do allow limited use of [const parameters]. [arithmetic]: expressions/operator-expr.md#arithmetic-and-logical-binary-operators [array expressions]: expressions/array-expr.md @@ -114,7 +114,7 @@ Conversely, the following are possible in a const function, but not in a const c [comparison]: expressions/operator-expr.md#comparison-operators [const functions]: items/functions.md#const-functions [const generic argument]: items/generics.md#const-generics -[const generic parameters]: items/generics.md#const-generics +[const parameters]: items/generics.md#const-generics [constants]: items/constant-items.md [Const parameters]: items/generics.md [dereference operator]: expressions/operator-expr.md#the-dereference-operator diff --git a/src/items/generics.md b/src/items/generics.md index 946b5e9a5..c6790039b 100644 --- a/src/items/generics.md +++ b/src/items/generics.md @@ -43,7 +43,7 @@ referred to with path syntax. ### Const generics -*Const generic parameters* allow items to be generic over constant values. The +*Const parameters* allow items to be generic over constant values. The const identifier introduces a name for the constant parameter, and all instances of the item must be instantiated with a value of the given type. @@ -68,7 +68,7 @@ places: 5. As a part of the type of any fields in the item. ```rust -// Examples where const generic parameters can be used. +// Examples where const parameters can be used. // Used in the signature of the item itself. fn foo(arr: [i32; N]) { @@ -97,7 +97,7 @@ impl Trait for Foo { ``` ```rust,compile_fail -// Examples where const generic parameters cannot be used. +// Examples where const parameters cannot be used. fn foo() { // Cannot use in item definitions within a function body. const BAD_CONST: [usize; N] = [1; N]; From ac9e99d27fdc1a04290ea5b7680f5e1cb0c6ca52 Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 4 May 2021 23:11:57 +0200 Subject: [PATCH 2/2] const generic argument -> const argument --- src/const_eval.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/const_eval.md b/src/const_eval.md index 5e98729e0..ae261b969 100644 --- a/src/const_eval.md +++ b/src/const_eval.md @@ -59,7 +59,7 @@ A _const context_ is one of the following: * [constants] * [statics] * [enum discriminants] -* A [const generic argument] +* [Const arguments] ## Const Functions @@ -113,7 +113,7 @@ Conversely, the following are possible in a const function, but not in a const c [closure expressions]: expressions/closure-expr.md [comparison]: expressions/operator-expr.md#comparison-operators [const functions]: items/functions.md#const-functions -[const generic argument]: items/generics.md#const-generics +[Const arguments]: items/generics.md#const-generics [const parameters]: items/generics.md#const-generics [constants]: items/constant-items.md [Const parameters]: items/generics.md