about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/debuginfo
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2019-06-12 00:11:55 +0300
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2019-06-12 13:38:28 +0300
commitfff08cb04389497d254fb40948674cbbee402908 (patch)
treeacf887abc09ef60cbd7e18e733da83c50a4f3939 /src/librustc_codegen_ssa/debuginfo
parent21ac960334485bfad6818510bc12dc65129f2c39 (diff)
downloadrust-fff08cb04389497d254fb40948674cbbee402908.tar.gz
rust-fff08cb04389497d254fb40948674cbbee402908.zip
Run `rustfmt --file-lines ...` for changes from previous commits.
Diffstat (limited to 'src/librustc_codegen_ssa/debuginfo')
-rw-r--r--src/librustc_codegen_ssa/debuginfo/type_names.rs42
1 files changed, 24 insertions, 18 deletions
diff --git a/src/librustc_codegen_ssa/debuginfo/type_names.rs b/src/librustc_codegen_ssa/debuginfo/type_names.rs
index 50847b09805..943fd254030 100644
--- a/src/librustc_codegen_ssa/debuginfo/type_names.rs
+++ b/src/librustc_codegen_ssa/debuginfo/type_names.rs
@@ -8,10 +8,11 @@ use rustc_data_structures::fx::FxHashSet;
 // any caching, i.e., calling the function twice with the same type will also do
 // the work twice. The `qualified` parameter only affects the first level of the
 // type name, further levels (i.e., type parameters) are always fully qualified.
-pub fn compute_debuginfo_type_name<'tcx>(tcx: TyCtxt<'tcx, 'tcx>,
-                                             t: Ty<'tcx>,
-                                             qualified: bool)
-                                             -> String {
+pub fn compute_debuginfo_type_name<'tcx>(
+    tcx: TyCtxt<'tcx, 'tcx>,
+    t: Ty<'tcx>,
+    qualified: bool,
+) -> String {
     let mut result = String::with_capacity(64);
     let mut visited = FxHashSet::default();
     push_debuginfo_type_name(tcx, t, qualified, &mut result, &mut visited);
@@ -20,12 +21,13 @@ pub fn compute_debuginfo_type_name<'tcx>(tcx: TyCtxt<'tcx, 'tcx>,
 
 // Pushes the name of the type as it should be stored in debuginfo on the
 // `output` String. See also compute_debuginfo_type_name().
-pub fn push_debuginfo_type_name<'tcx>(tcx: TyCtxt<'tcx, 'tcx>,
-                                          t: Ty<'tcx>,
-                                          qualified: bool,
-                                          output: &mut String,
-                                          visited: &mut FxHashSet<Ty<'tcx>>) {
-
+pub fn push_debuginfo_type_name<'tcx>(
+    tcx: TyCtxt<'tcx, 'tcx>,
+    t: Ty<'tcx>,
+    qualified: bool,
+    output: &mut String,
+    visited: &mut FxHashSet<Ty<'tcx>>,
+) {
     // When targeting MSVC, emit C++ style type names for compatibility with
     // .natvis visualizers (and perhaps other existing native debuggers?)
     let cpp_like_names = tcx.sess.target.target.options.is_like_msvc;
@@ -208,10 +210,12 @@ pub fn push_debuginfo_type_name<'tcx>(tcx: TyCtxt<'tcx, 'tcx>,
         }
     }
 
-    fn push_item_name(tcx: TyCtxt<'tcx, 'tcx>,
-                      def_id: DefId,
-                      qualified: bool,
-                      output: &mut String) {
+    fn push_item_name(
+        tcx: TyCtxt<'tcx, 'tcx>,
+        def_id: DefId,
+        qualified: bool,
+        output: &mut String,
+    ) {
         if qualified {
             output.push_str(&tcx.crate_name(def_id.krate).as_str());
             for path_element in tcx.def_path(def_id).data {
@@ -228,10 +232,12 @@ pub fn push_debuginfo_type_name<'tcx>(tcx: TyCtxt<'tcx, 'tcx>,
     // reconstructed for items from non-local crates. For local crates, this
     // would be possible but with inlining and LTO we have to use the least
     // common denominator - otherwise we would run into conflicts.
-    fn push_type_params<'tcx>(tcx: TyCtxt<'tcx, 'tcx>,
-                                  substs: SubstsRef<'tcx>,
-                                  output: &mut String,
-                                  visited: &mut FxHashSet<Ty<'tcx>>) {
+    fn push_type_params<'tcx>(
+        tcx: TyCtxt<'tcx, 'tcx>,
+        substs: SubstsRef<'tcx>,
+        output: &mut String,
+        visited: &mut FxHashSet<Ty<'tcx>>,
+    ) {
         if substs.types().next().is_none() {
             return;
         }