]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/rt/backtrace.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / libstd / rt / backtrace.rs
index 58b3179a297ce747c0eb2cd6ebb6bb94e63599b7..5557ef9943b864d996a49a34824d7b3a9b9d4340 100644 (file)
@@ -138,7 +138,7 @@ macro_rules! demangle(
                         "$RP$" => ")",
                         "$C$"  => ",",
 
-                        // in theory we can demangle any unicode code point, but
+                        // in theory we can demangle any Unicode code point, but
                         // for simplicity we just catch the common ones.
                         "$x20" => " ",
                         "$x27" => "'",
@@ -461,7 +461,7 @@ fn backtrace_syminfo(state: *mut backtrace_state,
         //
         // An additionally oddity in this function is that we initialize the
         // filename via self_exe_name() to pass to libbacktrace. It turns out
-        // that on linux libbacktrace seamlessly gets the filename of the
+        // that on Linux libbacktrace seamlessly gets the filename of the
         // current executable, but this fails on freebsd. by always providing
         // it, we make sure that libbacktrace never has a reason to not look up
         // the symbols. The libbacktrace API also states that the filename must
@@ -485,7 +485,7 @@ unsafe fn init_state() -> *mut backtrace_state {
                     let bytes = path.as_vec();
                     if bytes.len() < LAST_FILENAME.len() {
                         let i = bytes.iter();
-                        for (slot, val) in LAST_FILENAME.mut_iter().zip(i) {
+                        for (slot, val) in LAST_FILENAME.iter_mut().zip(i) {
                             *slot = *val as libc::c_char;
                         }
                         LAST_FILENAME.as_ptr()
@@ -496,7 +496,7 @@ unsafe fn init_state() -> *mut backtrace_state {
                 None => ptr::null(),
             };
             STATE = backtrace_create_state(filename, 0, error_cb,
-                                           ptr::mut_null());
+                                           ptr::null_mut());
             return STATE
         }
 
@@ -543,7 +543,7 @@ fn output(w: &mut Writer, idx: int, addr: *mut libc::c_void,
     /// iOS doesn't use all of them it but adding more
     /// platform-specific configs pollutes the code too much
     #[allow(non_camel_case_types)]
-    #[allow(non_snake_case_functions)]
+    #[allow(non_snake_case)]
     #[allow(dead_code)]
     mod uw {
         use libc;
@@ -631,7 +631,7 @@ fn _Unwind_VRS_Get(ctx: *mut _Unwind_Context,
             (val & !1) as libc::uintptr_t
         }
 
-        // This function also doesn't exist on android or arm/linux, so make it
+        // This function also doesn't exist on Android or ARM/Linux, so make it
         // a no-op
         #[cfg(target_os = "android")]
         #[cfg(target_os = "linux", target_arch = "arm")]
@@ -657,7 +657,7 @@ pub unsafe fn _Unwind_FindEnclosingFunction(pc: *mut libc::c_void)
 /// copy of that function in my mingw install (maybe it was broken?). Instead,
 /// this takes the route of using StackWalk64 in order to walk the stack.
 #[cfg(windows)]
-#[allow(dead_code, uppercase_variables)]
+#[allow(dead_code, non_snake_case)]
 mod imp {
     use c_str::CString;
     use core_collections::Collection;
@@ -674,7 +674,7 @@ mod imp {
     use str::StrSlice;
     use dynamic_lib::DynamicLibrary;
 
-    #[allow(non_snake_case_functions)]
+    #[allow(non_snake_case)]
     extern "system" {
         fn GetCurrentProcess() -> libc::HANDLE;
         fn GetCurrentThread() -> libc::HANDLE;
@@ -701,30 +701,6 @@ mod imp {
     static IMAGE_FILE_MACHINE_IA64: libc::DWORD = 0x0200;
     static IMAGE_FILE_MACHINE_AMD64: libc::DWORD = 0x8664;
 
-    #[cfg(stage0)]
-    #[packed]
-    struct SYMBOL_INFO {
-        SizeOfStruct: libc::c_ulong,
-        TypeIndex: libc::c_ulong,
-        Reserved: [u64, ..2],
-        Index: libc::c_ulong,
-        Size: libc::c_ulong,
-        ModBase: u64,
-        Flags: libc::c_ulong,
-        Value: u64,
-        Address: u64,
-        Register: libc::c_ulong,
-        Scope: libc::c_ulong,
-        Tag: libc::c_ulong,
-        NameLen: libc::c_ulong,
-        MaxNameLen: libc::c_ulong,
-        // note that windows has this as 1, but it basically just means that
-        // the name is inline at the end of the struct. For us, we just bump
-        // the struct size up to MAX_SYM_NAME.
-        Name: [libc::c_char, ..MAX_SYM_NAME],
-    }
-
-    #[cfg(not(stage0))]
     #[repr(C, packed)]
     struct SYMBOL_INFO {
         SizeOfStruct: libc::c_ulong,