diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-09-11 17:07:49 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2014-09-19 15:11:00 +1200 |
| commit | ce0907e46e8e1aa23ee39f69e4f628f68bfbb0d7 (patch) | |
| tree | 9ea529bfee7d62b85288d37b0e2bbcdd1c866e0d /src/librustc/back | |
| parent | af3889f6979647b9bd2dc5f5132d80e3e5b405a5 (diff) | |
| download | rust-ce0907e46e8e1aa23ee39f69e4f628f68bfbb0d7.tar.gz rust-ce0907e46e8e1aa23ee39f69e4f628f68bfbb0d7.zip | |
Add enum variants to the type namespace
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
Diffstat (limited to 'src/librustc/back')
| -rw-r--r-- | src/librustc/back/write.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc/back/write.rs b/src/librustc/back/write.rs index cff5ac5375d..123131f0c21 100644 --- a/src/librustc/back/write.rs +++ b/src/librustc/back/write.rs @@ -11,7 +11,7 @@ use back::lto; use back::link::{get_cc_prog, remove}; use driver::driver::{CrateTranslation, ModuleTranslation, OutputFilenames}; -use driver::config::{NoDebugInfo, Passes, AllPasses}; +use driver::config::{NoDebugInfo, Passes, SomePasses, AllPasses}; use driver::session::Session; use driver::config; use llvm; @@ -341,7 +341,7 @@ unsafe extern "C" fn diagnostic_handler(info: DiagnosticInfoRef, user: *mut c_vo let pass_name = pass_name.as_str().expect("got a non-UTF8 pass name from LLVM"); let enabled = match cgcx.remark { AllPasses => true, - Passes(ref v) => v.iter().any(|s| s.as_slice() == pass_name), + SomePasses(ref v) => v.iter().any(|s| s.as_slice() == pass_name), }; if enabled { @@ -482,14 +482,14 @@ unsafe fn optimize_and_codegen(cgcx: &CodegenContext, if config.emit_asm { let path = output_names.with_extension(format!("{}.s", name_extra).as_slice()); with_codegen(tm, llmod, config.no_builtins, |cpm| { - write_output_file(cgcx.handler, tm, cpm, llmod, &path, llvm::AssemblyFile); + write_output_file(cgcx.handler, tm, cpm, llmod, &path, llvm::AssemblyFileType); }); } if config.emit_obj { let path = output_names.with_extension(format!("{}.o", name_extra).as_slice()); with_codegen(tm, llmod, config.no_builtins, |cpm| { - write_output_file(cgcx.handler, tm, cpm, llmod, &path, llvm::ObjectFile); + write_output_file(cgcx.handler, tm, cpm, llmod, &path, llvm::ObjectFileType); }); } }); |
