about summary refs log tree commit diff
path: root/src/libsyntax/codemap.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-05-26 22:46:08 -0700
committerbors <bors@rust-lang.org>2016-05-26 22:46:08 -0700
commit36d5dc7c9bcfd287b5c4e4ac3e2f0ab93bdaa0c9 (patch)
tree7e1af7784abe1ebab1c219d13e1a57439eb91996 /src/libsyntax/codemap.rs
parent97e3a2401e4b2f659d69ed0c0822cae04e3495b7 (diff)
parent63dfbdbc1bc1ace106a525682f77b3d08af9ad71 (diff)
downloadrust-36d5dc7c9bcfd287b5c4e4ac3e2f0ab93bdaa0c9.tar.gz
rust-36d5dc7c9bcfd287b5c4e4ac3e2f0ab93bdaa0c9.zip
Auto merge of #33864 - Manishearth:breaking-batch, r=Manishearth
Batch up libsyntax breaking changes

cc https://github.com/rust-lang/rust/issues/31645
Diffstat (limited to 'src/libsyntax/codemap.rs')
-rw-r--r--src/libsyntax/codemap.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index ca8708fdc83..3b13bf2fc50 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -1191,13 +1191,13 @@ impl CodeMap {
         }
     }
 
-    pub fn get_filemap(&self, filename: &str) -> Rc<FileMap> {
+    pub fn get_filemap(&self, filename: &str) -> Option<Rc<FileMap>> {
         for fm in self.files.borrow().iter() {
             if filename == fm.name {
-                return fm.clone();
+                return Some(fm.clone());
             }
         }
-        panic!("asking for {} which we don't know about", filename);
+        None
     }
 
     /// For a global BytePos compute the local offset within the containing FileMap