Skip to content

Commit e477488

Browse files
committed
Rewrite core-no-fp-fmt-parse in Rust
Rewrite core-no-fp-fmt-parse in Rust fix: missing import fix: tidiness check more tidy checks remove tidy line length ignore new helper functions + arg_path generic fix: remove unused import delete arg_path, change arg_path to input
1 parent d748046 commit e477488

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

src/tools/run-make-support/src/rustc.rs

+14
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,20 @@ impl Rustc {
104104
self
105105
}
106106

107+
/// Specify the crate type.
108+
pub fn crate_type(&mut self, crate_type: &str) -> &mut Self {
109+
self.cmd.arg("--crate-type");
110+
self.cmd.arg(crate_type);
111+
self
112+
}
113+
114+
/// Specify the edition year.
115+
pub fn edition(&mut self, edition: &str) -> &mut Self {
116+
self.cmd.arg("--edition");
117+
self.cmd.arg(edition);
118+
self
119+
}
120+
107121
/// Generic command arguments provider. Use `.arg("-Zname")` over `.arg("-Z").arg("arg")`.
108122
/// This method will panic if a plain `-Z` or `-C` is passed, or if `-Z <name>` or `-C <name>`
109123
/// is passed (note the space).

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ run-make/compiler-rt-works-on-mingw/Makefile
3131
run-make/compressed-debuginfo/Makefile
3232
run-make/const-prop-lint/Makefile
3333
run-make/const_fn_mir/Makefile
34-
run-make/core-no-fp-fmt-parse/Makefile
3534
run-make/core-no-oom-handling/Makefile
3635
run-make/crate-data-smoke/Makefile
3736
run-make/crate-hash-rustc-version/Makefile

tests/run-make/core-no-fp-fmt-parse/Makefile

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// This test checks that the core library of Rust can be compiled without enabling
2+
// support for formatting and parsing floating-point numbers.
3+
4+
extern crate run_make_support;
5+
6+
use run_make_support::rustc;
7+
use std::path::PathBuf;
8+
9+
fn main() {
10+
rustc()
11+
.edition("2021")
12+
.arg("-Dwarnings")
13+
.crate_type("rlib")
14+
.input("../../../library/core/src/lib.rs")
15+
.cfg("no_fp_fmt_parse")
16+
.run();
17+
}

0 commit comments

Comments
 (0)