]> git.lizzy.rs Git - rust.git/commitdiff
Update E0015 explanation, fix E0053.
authorNick Hamann <nick@wabbo.org>
Wed, 27 May 2015 17:55:33 +0000 (12:55 -0500)
committerNick Hamann <nick@wabbo.org>
Thu, 28 May 2015 22:54:13 +0000 (17:54 -0500)
src/librustc/diagnostics.rs
src/librustc_typeck/diagnostics.rs

index a1fa1834ef46744fccbc36ef19b654ec303378b9..499973715269d4b7db69ab58591a4ae44bcc47d1 100644 (file)
@@ -196,9 +196,13 @@ struct X { x: (), }
 "##,
 
 E0015: r##"
-The only function calls allowed in static or constant expressions are enum
-variant constructors or struct constructors (for unit or tuple structs). This
-is because Rust currently does not support compile-time function execution.
+The only function calls allowed in static or constant expressions are
+constructors for enum variants and structs, or `const fn`s. Rust currently does
+not support more general compile-time function execution.
+
+See [RFC 911] for more details on the design of `const fn`s.
+
+[RFC 911]: https://github.com/rust-lang/rfcs/pull/911
 "##,
 
 E0018: r##"
index edfad77d588df1d40a394cce1cb5b98c243e3368..a3d77bb351df120142349e946170150e07b07013 100644 (file)
@@ -241,7 +241,7 @@ impl Foo for Bar {
     fn foo(x: i16) { }
 
     // error, values differ in mutability
-    fn foo(&mut self) { }
+    fn bar(&mut self) { }
 }
 ```
 "##,