diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-10-30 12:55:38 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-11-06 10:04:23 -0800 |
| commit | a12a32ab652d63e342f482566c767042609ab1a6 (patch) | |
| tree | 43e693197ffbb8cb9711ec275bd559ae134a5fef /src/librustc_codegen_ssa | |
| parent | f545a50ee483f1d1a513ed2c73622646528236ae (diff) | |
| download | rust-a12a32ab652d63e342f482566c767042609ab1a6.tar.gz rust-a12a32ab652d63e342f482566c767042609ab1a6.zip | |
review comments
Diffstat (limited to 'src/librustc_codegen_ssa')
| -rw-r--r-- | src/librustc_codegen_ssa/debuginfo/type_names.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/librustc_codegen_ssa/debuginfo/type_names.rs b/src/librustc_codegen_ssa/debuginfo/type_names.rs index 166a74fe487..b9fa53d638f 100644 --- a/src/librustc_codegen_ssa/debuginfo/type_names.rs +++ b/src/librustc_codegen_ssa/debuginfo/type_names.rs @@ -76,9 +76,7 @@ pub fn push_debuginfo_type_name<'tcx>( if !cpp_like_names { output.push('&'); } - if mutbl == hir::MutMutable { - output.push_str("mut "); - } + output.push_str(mutbl.prefix_str()); push_debuginfo_type_name(tcx, inner_type, true, output, visited); @@ -140,9 +138,7 @@ pub fn push_debuginfo_type_name<'tcx>( let sig = t.fn_sig(tcx); - if sig.unsafety() == hir::Unsafety::Unsafe { - output.push_str("unsafe "); - } + output.push_str(sig.unsafety().prefix_str()); let abi = sig.abi(); if abi != rustc_target::spec::abi::Abi::Rust { |
