]> git.lizzy.rs Git - rust.git/commitdiff
change Self type error message
authorXuefengWu <benewu@gmail.com>
Sun, 10 May 2015 09:09:56 +0000 (17:09 +0800)
committerXuefeng Wu <benewu@gmail.com>
Sat, 16 May 2015 09:22:27 +0000 (17:22 +0800)
src/librustc_resolve/lib.rs

index 6f8e70dad2e39ab9373f740e2f63a74c3e9a3fce..7347b59dd4cf6674823eb6971b7d75e83e1da934 100644 (file)
@@ -2367,7 +2367,7 @@ fn resolve_type(&mut self, ty: &Ty) {
                             maybe_qself.is_none() &&
                             path.segments[0].identifier.name == self_type_name;
                         let msg = if is_invalid_self_type_name {
-                            "expected type name, found keyword `Self`".to_string()
+                            "use of Self outside of an impl".to_string()
                         } else {
                             format!("use of undeclared {} `{}`",
                                 kind, path_names_to_string(path, 0))