about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 7d0276ae16f..4897fed6928 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -4259,12 +4259,14 @@ impl<'a> Parser<'a> {
                     self.span_note(id_sp,
                                    format!("maybe move this module `{0}` \
                                             to its own directory via \
-                                            `{0}/mod.rs`", this_module));
+                                            `{0}/mod.rs`",
+                                           this_module).as_slice());
                     if default_exists || secondary_exists {
                         self.span_note(id_sp,
                                        format!("... or maybe `use` the module \
                                                 `{}` instead of possibly \
-                                                redeclaring it", mod_name));
+                                                redeclaring it",
+                                               mod_name).as_slice());
                     }
                     self.abort_if_errors();
                 }