diff options
Diffstat (limited to 'src/librustc/middle/resolve.rs')
| -rw-r--r-- | src/librustc/middle/resolve.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs index 075d4673636..1ca3c045f57 100644 --- a/src/librustc/middle/resolve.rs +++ b/src/librustc/middle/resolve.rs @@ -1411,7 +1411,7 @@ pub impl Resolver { match view_path.node { view_path_simple(_, full_path, _, _) => { let path_len = full_path.idents.len(); - assert path_len != 0; + fail_unless!(path_len != 0); for full_path.idents.eachi |i, ident| { if i != path_len - 1 { @@ -2107,7 +2107,7 @@ pub impl Resolver { // Decrement the count of unresolved imports. match resolution_result { Success(()) => { - assert self.unresolved_imports >= 1; + fail_unless!(self.unresolved_imports >= 1); self.unresolved_imports -= 1; } _ => { @@ -2123,7 +2123,7 @@ pub impl Resolver { if !resolution_result.indeterminate() { match *import_directive.subclass { GlobImport => { - assert module_.glob_count >= 1; + fail_unless!(module_.glob_count >= 1); module_.glob_count -= 1; } SingleImport(*) => { @@ -2258,7 +2258,7 @@ pub impl Resolver { } // We've successfully resolved the import. Write the results in. - assert module_.import_resolutions.contains_key(&target); + fail_unless!(module_.import_resolutions.contains_key(&target)); let import_resolution = module_.import_resolutions.get(&target); match value_result { @@ -2320,7 +2320,7 @@ pub impl Resolver { } } - assert import_resolution.outstanding_references >= 1; + fail_unless!(import_resolution.outstanding_references >= 1); import_resolution.outstanding_references -= 1; debug!("(resolving single import) successfully resolved import"); @@ -2417,7 +2417,7 @@ pub impl Resolver { } // We've successfully resolved the import. Write the results in. - assert module_.import_resolutions.contains_key(&target); + fail_unless!(module_.import_resolutions.contains_key(&target)); let import_resolution = module_.import_resolutions.get(&target); match module_result { @@ -2442,7 +2442,7 @@ pub impl Resolver { return Failed; } - assert import_resolution.outstanding_references >= 1; + fail_unless!(import_resolution.outstanding_references >= 1); import_resolution.outstanding_references -= 1; debug!("(resolving single module import) successfully resolved \ @@ -2476,7 +2476,7 @@ pub impl Resolver { return Indeterminate; } - assert containing_module.glob_count == 0; + fail_unless!(containing_module.glob_count == 0); // Add all resolved imports from the containing module. for containing_module.import_resolutions.each @@ -2664,7 +2664,7 @@ pub impl Resolver { span: span) -> ResolveResult<@mut Module> { let module_path_len = module_path.len(); - assert module_path_len > 0; + fail_unless!(module_path_len > 0); debug!("(resolving module path for import) processing `%s` rooted at \ `%s`", @@ -3016,7 +3016,7 @@ pub impl Resolver { // If this is a search of all imports, we should be done with glob // resolution at this point. if name_search_type == SearchItemsAndAllImports { - assert module_.glob_count == 0; + fail_unless!(module_.glob_count == 0); } // Check the list of resolved imports. |
