Skip to content

Commit 1e39d9b

Browse files
committed
change Self type error message
1 parent 8e82c21 commit 1e39d9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_resolve/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2367,7 +2367,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
23672367
maybe_qself.is_none() &&
23682368
path.segments[0].identifier.name == self_type_name;
23692369
let msg = if is_invalid_self_type_name {
2370-
"expected type name, found keyword `Self`".to_string()
2370+
"use of Self outside of an impl".to_string()
23712371
} else {
23722372
format!("use of undeclared {} `{}`",
23732373
kind, path_names_to_string(path, 0))

0 commit comments

Comments
 (0)