mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Rollup merge of #123180 - Oneirical:master, r=Mark-Simulacrum
Rewrite `core-no-fp-fmt-parse` test in Rust Claiming the simple "core-no-fp-fmt-parse" test from #121876. `run_make_support` was altered with `arg_path` written in #121918 by `@abhay-51,` with additional doc comment. Preliminary GSoC contribution for the project proposal mentored by `@jieyouxu.`
This commit is contained in:
commit
17737bfece
@ -104,6 +104,20 @@ impl Rustc {
|
||||
self
|
||||
}
|
||||
|
||||
/// Specify the crate type.
|
||||
pub fn crate_type(&mut self, crate_type: &str) -> &mut Self {
|
||||
self.cmd.arg("--crate-type");
|
||||
self.cmd.arg(crate_type);
|
||||
self
|
||||
}
|
||||
|
||||
/// Specify the edition year.
|
||||
pub fn edition(&mut self, edition: &str) -> &mut Self {
|
||||
self.cmd.arg("--edition");
|
||||
self.cmd.arg(edition);
|
||||
self
|
||||
}
|
||||
|
||||
/// Generic command arguments provider. Use `.arg("-Zname")` over `.arg("-Z").arg("arg")`.
|
||||
/// This method will panic if a plain `-Z` or `-C` is passed, or if `-Z <name>` or `-C <name>`
|
||||
/// is passed (note the space).
|
||||
|
@ -31,7 +31,6 @@ run-make/compiler-rt-works-on-mingw/Makefile
|
||||
run-make/compressed-debuginfo/Makefile
|
||||
run-make/const-prop-lint/Makefile
|
||||
run-make/const_fn_mir/Makefile
|
||||
run-make/core-no-fp-fmt-parse/Makefile
|
||||
run-make/core-no-oom-handling/Makefile
|
||||
run-make/crate-data-smoke/Makefile
|
||||
run-make/crate-hash-rustc-version/Makefile
|
||||
|
@ -1,4 +0,0 @@
|
||||
include ../tools.mk
|
||||
|
||||
all:
|
||||
$(RUSTC) --edition=2021 -Dwarnings --crate-type=rlib ../../../library/core/src/lib.rs --cfg no_fp_fmt_parse
|
17
tests/run-make/core-no-fp-fmt-parse/rmake.rs
Normal file
17
tests/run-make/core-no-fp-fmt-parse/rmake.rs
Normal file
@ -0,0 +1,17 @@
|
||||
// This test checks that the core library of Rust can be compiled without enabling
|
||||
// support for formatting and parsing floating-point numbers.
|
||||
|
||||
extern crate run_make_support;
|
||||
|
||||
use run_make_support::rustc;
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
rustc()
|
||||
.edition("2021")
|
||||
.arg("-Dwarnings")
|
||||
.crate_type("rlib")
|
||||
.input("../../../library/core/src/lib.rs")
|
||||
.cfg("no_fp_fmt_parse")
|
||||
.run();
|
||||
}
|
Loading…
Reference in New Issue
Block a user