Skip to content

Commit e47c930

Browse files
committed
Sync from rust 8e86c95
2 parents f340c81 + d35f63e commit e47c930

File tree

16 files changed

+28
-34
lines changed

16 files changed

+28
-34
lines changed

build_system/abi_cafe.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
use crate::build_sysroot;
21
use crate::path::Dirs;
32
use crate::prepare::GitRepo;
43
use crate::utils::{spawn_and_wait, CargoProject, Compiler};
5-
use crate::{CodegenBackend, SysrootKind};
4+
use crate::{build_sysroot, CodegenBackend, SysrootKind};
65

76
static ABI_CAFE_REPO: GitRepo = GitRepo::github(
87
"Gankra",

build_system/build_sysroot.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
use std::env;
2-
use std::fs;
31
use std::path::{Path, PathBuf};
42
use std::process::Command;
3+
use std::{env, fs};
54

65
use crate::path::{Dirs, RelPath};
76
use crate::rustc_info::get_file_name;
@@ -272,7 +271,7 @@ fn build_clif_sysroot_for_triple(
272271
if channel == "release" {
273272
build_cmd.arg("--release");
274273
}
275-
build_cmd.arg("--features").arg("backtrace panic-unwind");
274+
build_cmd.arg("--features").arg("backtrace panic-unwind compiler-builtins-no-f16-f128");
276275
build_cmd.env("CARGO_PROFILE_RELEASE_DEBUG", "true");
277276
build_cmd.env("__CARGO_DEFAULT_LIB_METADATA", "cg_clif");
278277
if compiler.triple.contains("apple") {

build_system/config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use std::fs;
2-
use std::process;
1+
use std::{fs, process};
32

43
fn load_config_file() -> Vec<(String, Option<String>)> {
54
fs::read_to_string("config.txt")

build_system/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
#![warn(unused_lifetimes)]
33
#![warn(unreachable_pub)]
44

5-
use std::env;
65
use std::path::PathBuf;
7-
use std::process;
6+
use std::{env, process};
87

98
use self::utils::Compiler;
109

build_system/tests.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ use std::fs;
33
use std::path::PathBuf;
44
use std::process::Command;
55

6-
use crate::build_sysroot;
7-
use crate::config;
86
use crate::path::{Dirs, RelPath};
97
use crate::prepare::{apply_patches, GitRepo};
108
use crate::rustc_info::get_default_sysroot;
119
use crate::shared_utils::rustflags_from_env;
1210
use crate::utils::{spawn_and_wait, CargoProject, Compiler, LogGroup};
13-
use crate::{CodegenBackend, SysrootKind};
11+
use crate::{build_sysroot, config, CodegenBackend, SysrootKind};
1412

1513
static BUILD_EXAMPLE_OUT_DIR: RelPath = RelPath::BUILD.join("example");
1614

build_system/utils.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
use std::env;
2-
use std::fs;
3-
use std::io;
41
use std::path::{Path, PathBuf};
52
use std::process::{self, Command};
63
use std::sync::atomic::{AtomicBool, Ordering};
4+
use std::{env, fs, io};
75

86
use crate::path::{Dirs, RelPath};
97
use crate::shared_utils::rustflags_to_cmd_env;

example/alloc_system.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ pub struct System;
88
#[cfg(any(windows, unix, target_os = "redox"))]
99
mod realloc_fallback {
1010
use core::alloc::{GlobalAlloc, Layout};
11-
use core::cmp;
12-
use core::ptr;
11+
use core::{cmp, ptr};
1312
impl super::System {
1413
pub(crate) unsafe fn realloc_fallback(
1514
&self,
@@ -34,6 +33,7 @@ mod platform {
3433
use core::alloc::{GlobalAlloc, Layout};
3534
use core::ffi::c_void;
3635
use core::ptr;
36+
3737
use System;
3838
extern "C" {
3939
fn posix_memalign(memptr: *mut *mut c_void, align: usize, size: usize) -> i32;
@@ -71,6 +71,7 @@ mod platform {
7171
#[allow(nonstandard_style)]
7272
mod platform {
7373
use core::alloc::{GlobalAlloc, Layout};
74+
7475
use System;
7576
type LPVOID = *mut u8;
7677
type HANDLE = LPVOID;

example/arbitrary_self_types_pointers_and_wrappers.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
#![feature(arbitrary_self_types, unsize, coerce_unsized, dispatch_from_dyn)]
44

5-
use std::{
6-
marker::Unsize,
7-
ops::{CoerceUnsized, Deref, DispatchFromDyn},
8-
};
5+
use std::marker::Unsize;
6+
use std::ops::{CoerceUnsized, Deref, DispatchFromDyn};
97

108
struct Ptr<T: ?Sized>(Box<T>);
119

example/std_example.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
coroutines,
44
stmt_expr_attributes,
55
coroutine_trait,
6-
is_sorted,
76
repr_simd,
87
tuple_trait,
98
unboxed_closures

rustfmt.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ ignore = [
66
version = "Two"
77
use_small_heuristics = "Max"
88
merge_derives = false
9+
group_imports = "StdExternalCrate"
10+
imports_granularity = "Module"

0 commit comments

Comments
 (0)