Skip to content

run rustfmt on rtstartup folder #33950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/rtstartup/rsbegin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
#![allow(non_camel_case_types)]

#[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))]
pub mod eh_frames
{
pub mod eh_frames {
#[no_mangle]
#[link_section = ".eh_frame"]
// Marks beginning of the stack frame unwind info section
Expand All @@ -40,7 +39,7 @@ pub mod eh_frames

// Unwind info registration/deregistration routines.
// See the docs of `unwind` module in libstd.
extern {
extern "C" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why adding "C" in here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extern is extern "C" by default

fn rust_eh_register_frames(eh_frame_begin: *const u8, object: *mut u8);
fn rust_eh_unregister_frames(eh_frame_begin: *const u8, object: *mut u8);
}
Expand All @@ -58,8 +57,7 @@ pub mod eh_frames
}

// MSVC-specific init/uninit routine registration
pub mod ms_init
{
pub mod ms_init {
// .CRT$X?? sections are roughly analogous to ELF's .init_array and .fini_array,
// except that they exploit the fact that linker will sort them alphabitically,
// so e.g. sections with names between .CRT$XIA and .CRT$XIZ are guaranteed to be
Expand Down
3 changes: 1 addition & 2 deletions src/rtstartup/rsend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
#![no_std]

#[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))]
pub mod eh_frames
{
pub mod eh_frames {
// Terminate the frame unwind info section with a 0 as a sentinel;
// this would be the 'length' field in a real FDE.
#[no_mangle]
Expand Down