diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-11-18 14:14:40 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-11-18 18:09:41 -0800 |
| commit | 74b2e9979738ce413209aa4342fc35afe68c68de (patch) | |
| tree | 1a6c24b0e8ea072cb651f60170e420e1a64686ae /src/libsyntax/parse/parser.rs | |
| parent | 72cc1aca175044ceb003a8b270940bec1da85460 (diff) | |
| download | rust-74b2e9979738ce413209aa4342fc35afe68c68de.tar.gz rust-74b2e9979738ce413209aa4342fc35afe68c68de.zip | |
Report errors better when failing to open files for sub-parsers
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 12ae135e525..9d71f83b28d 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2959,6 +2959,7 @@ impl Parser { } fn parse_item_mod(outer_attrs: ~[ast::attribute]) -> item_info { + let id_span = self.span; let id = self.parse_ident(); if self.token == token::SEMI { self.bump(); @@ -2969,7 +2970,8 @@ impl Parser { }; let prefix = Path(self.sess.cm.span_to_filename(copy self.span)); let prefix = prefix.dir_path(); - let (m, attrs) = eval::eval_src_mod(eval_ctx, &prefix, id, outer_attrs); + let (m, attrs) = eval::eval_src_mod(eval_ctx, &prefix, id, + outer_attrs, id_span); (id, m, Some(move attrs)) } else { self.expect(token::LBRACE); |
