Emit dropped unemitted errors to aid in ICE debugging

This commit is contained in:
Esteban Küber 2019-07-11 16:59:19 -07:00
parent 4bb6b4a5ed
commit c9f7a3d206
3 changed files with 16 additions and 12 deletions

View file

@ -6666,12 +6666,13 @@ impl<'a> Parser<'a> {
}
/// Reads a module from a source file.
fn eval_src_mod(&mut self,
path: PathBuf,
directory_ownership: DirectoryOwnership,
name: String,
id_sp: Span)
-> PResult<'a, (ast::Mod, Vec<Attribute> )> {
fn eval_src_mod(
&mut self,
path: PathBuf,
directory_ownership: DirectoryOwnership,
name: String,
id_sp: Span,
) -> PResult<'a, (ast::Mod, Vec<Attribute>)> {
let mut included_mod_stack = self.sess.included_mod_stack.borrow_mut();
if let Some(i) = included_mod_stack.iter().position(|p| *p == path) {
let mut err = String::from("circular modules: ");