diff options
| author | lcnr <rust@lcnr.de> | 2021-08-27 18:04:57 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2021-08-30 11:00:21 +0200 |
| commit | 0c28e028b6f45f33447f24de7dd762b8599b7a4e (patch) | |
| tree | 3a573ebc79c4aefed676f4a693ebb62d32ea4e7f /compiler/rustc_error_codes/src | |
| parent | c0e853f274c42665373b719a5bd7b3f95afe10c2 (diff) | |
| download | rust-0c28e028b6f45f33447f24de7dd762b8599b7a4e.tar.gz rust-0c28e028b6f45f33447f24de7dd762b8599b7a4e.zip | |
`feature(const_generics)` -> `feature(const_param_types)`
Diffstat (limited to 'compiler/rustc_error_codes/src')
4 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0671.md b/compiler/rustc_error_codes/src/error_codes/E0671.md index a993ce826a7..d4dbfb7a5d8 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0671.md +++ b/compiler/rustc_error_codes/src/error_codes/E0671.md @@ -4,8 +4,6 @@ Const parameters cannot depend on type parameters. The following is therefore invalid: ```compile_fail,E0770 -#![feature(const_generics)] - fn const_id<T, const N: T>() -> T { // error N } diff --git a/compiler/rustc_error_codes/src/error_codes/E0741.md b/compiler/rustc_error_codes/src/error_codes/E0741.md index 91379bfe05c..510075dc779 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0741.md +++ b/compiler/rustc_error_codes/src/error_codes/E0741.md @@ -3,7 +3,7 @@ A non-structural-match type was used as the type of a const generic parameter. Erroneous code example: ```compile_fail,E0741 -#![feature(const_generics)] +#![feature(const_param_types)] struct A; @@ -16,7 +16,7 @@ may be used as the types of const generic parameters. To fix the previous code example, we derive `PartialEq` and `Eq`: ``` -#![feature(const_generics)] +#![feature(const_param_types)] #[derive(PartialEq, Eq)] // We derive both traits here. struct A; diff --git a/compiler/rustc_error_codes/src/error_codes/E0770.md b/compiler/rustc_error_codes/src/error_codes/E0770.md index b39163a9de3..cd8fc481bf0 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0770.md +++ b/compiler/rustc_error_codes/src/error_codes/E0770.md @@ -3,7 +3,6 @@ The type of a const parameter references other generic parameters. Erroneous code example: ```compile_fail,E0770 -#![feature(const_generics)] fn foo<T, const N: T>() {} // error! ``` diff --git a/compiler/rustc_error_codes/src/error_codes/E0771.md b/compiler/rustc_error_codes/src/error_codes/E0771.md index 824a955f6b3..c1e133673ca 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0771.md +++ b/compiler/rustc_error_codes/src/error_codes/E0771.md @@ -4,7 +4,7 @@ allowed. Erroneous code example: ```compile_fail,E0771 -#![feature(const_generics)] +#![feature(const_param_types)] fn function_with_str<'a, const STRING: &'a str>() {} // error! ``` @@ -13,7 +13,7 @@ To fix this issue, the lifetime in the const generic need to be changed to `'static`: ``` -#![feature(const_generics)] +#![feature(const_param_types)] fn function_with_str<const STRING: &'static str>() {} // ok! ``` |
