Skip to content

Commit

Permalink
change Self type error message
Browse files Browse the repository at this point in the history
  • Loading branch information
XuefengWu committed May 16, 2015
1 parent 8e82c21 commit 1e39d9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_resolve/lib.rs
Expand Up @@ -2367,7 +2367,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
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))
Expand Down

0 comments on commit 1e39d9b

Please sign in to comment.