Skip to content

Commit f607440

Browse files
author
Nick Hamann
committed
Update E0015 explanation, fix E0053.
1 parent 9c30394 commit f607440

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/librustc/diagnostics.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,13 @@ const Y: i32 = A;
196196
"##,
197197

198198
E0015: r##"
199-
The only function calls allowed in static or constant expressions are enum
200-
variant constructors or struct constructors (for unit or tuple structs). This
201-
is because Rust currently does not support compile-time function execution.
199+
The only function calls allowed in static or constant expressions are
200+
constructors for enum variants and structs, or `const fn`s. Rust currently does
201+
not support more general compile-time function execution.
202+
203+
See [RFC 911] for more details on the design of `const fn`s.
204+
205+
[RFC 911]: https://github.com/rust-lang/rfcs/pull/911
202206
"##,
203207

204208
E0018: r##"

src/librustc_typeck/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ impl Foo for Bar {
241241
fn foo(x: i16) { }
242242
243243
// error, values differ in mutability
244-
fn foo(&mut self) { }
244+
fn bar(&mut self) { }
245245
}
246246
```
247247
"##,

0 commit comments

Comments
 (0)