remove const_fn from some error_code descriptions
This commit is contained in:
parent
75bab0782a
commit
8a961a5b33
2 changed files with 0 additions and 4 deletions
|
@ -3,8 +3,6 @@ A trait method was declared const.
|
||||||
Erroneous code example:
|
Erroneous code example:
|
||||||
|
|
||||||
```compile_fail,E0379
|
```compile_fail,E0379
|
||||||
#![feature(const_fn)]
|
|
||||||
|
|
||||||
trait Foo {
|
trait Foo {
|
||||||
const fn bar() -> u32; // error!
|
const fn bar() -> u32; // error!
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ A mutable reference was used in a constant.
|
||||||
Erroneous code example:
|
Erroneous code example:
|
||||||
|
|
||||||
```compile_fail,E0764
|
```compile_fail,E0764
|
||||||
#![feature(const_fn)]
|
|
||||||
#![feature(const_mut_refs)]
|
#![feature(const_mut_refs)]
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -27,7 +26,6 @@ Remember: you cannot use a function call inside a constant or static. However,
|
||||||
you can totally use it in constant functions:
|
you can totally use it in constant functions:
|
||||||
|
|
||||||
```
|
```
|
||||||
#![feature(const_fn)]
|
|
||||||
#![feature(const_mut_refs)]
|
#![feature(const_mut_refs)]
|
||||||
|
|
||||||
const fn foo(x: usize) -> usize {
|
const fn foo(x: usize) -> usize {
|
||||||
|
|
Loading…
Add table
Reference in a new issue