From 972e89fd416b4b50f408000ba406a15fcbb83b7e Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 9 Oct 2019 10:44:29 +0000 Subject: [PATCH] style: Report missing include filename in ServoBindings.toml. Differential Revision: https://phabricator.services.mozilla.com/D48625 --- components/style/build_gecko.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index 86d2098d063..a502b7d45f9 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -109,7 +109,10 @@ fn add_headers_recursively(path: PathBuf, added_paths: &mut HashSet) { fn add_include(name: &str) -> String { let mut added_paths = ADDED_PATHS.lock().unwrap(); - let file = search_include(name).expect("Include not found!"); + let file = match search_include(name) { + Some(file) => file, + None => panic!("Include not found: {}", name), + }; let result = String::from(file.to_str().unwrap()); add_headers_recursively(file, &mut *added_paths); result