about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-09-18 11:19:52 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-09-18 11:29:53 -0700
commitefa6675f1d632f5d524f4a7a18838c6ee1c0c447 (patch)
tree766244783f25f9933d1b2bcc8e8d993367033bdd /src/libsyntax
parent3b013cd800ce675a445220105911bbefd2427e47 (diff)
make filetype() include the "." (fixes #3412)
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse.rs b/src/libsyntax/parse.rs
index 367be53a190..9b9d7addee2 100644
--- a/src/libsyntax/parse.rs
+++ b/src/libsyntax/parse.rs
@@ -51,9 +51,9 @@ fn new_parse_sess_special_handler(sh: span_handler, cm: codemap::codemap)
 
 fn parse_crate_from_file(input: &Path, cfg: ast::crate_cfg,
                          sess: parse_sess) -> @ast::crate {
-    if input.filetype() == Some(~"rc") {
+    if input.filetype() == Some(~".rc") {
         parse_crate_from_crate_file(input, cfg, sess)
-    } else if input.filetype() == Some(~"rs") {
+    } else if input.filetype() == Some(~".rs") {
         parse_crate_from_source_file(input, cfg, sess)
     } else {
         sess.span_diagnostic.handler().fatal(~"unknown input file type: " +