Commit 5dd871b 1 parent d748046 commit 5dd871b Copy full SHA for 5dd871b
File tree 4 files changed +41
-5
lines changed
tests/run-make/core-no-fp-fmt-parse
4 files changed +41
-5
lines changed Original file line number Diff line number Diff line change 1
1
use std:: env;
2
2
use std:: path:: Path ;
3
+ use std:: path:: PathBuf ;
3
4
use std:: process:: { Command , Output } ;
4
5
5
6
use crate :: { handle_failed_output, tmp_dir} ;
@@ -104,6 +105,29 @@ impl Rustc {
104
105
self
105
106
}
106
107
108
+ /// Generic file path provider.
109
+ pub fn arg_path < P > ( & mut self , path : P ) -> & mut Self
110
+ where
111
+ P : AsRef < Path > ,
112
+ {
113
+ self . cmd . arg ( path. as_ref ( ) ) ;
114
+ self
115
+ }
116
+
117
+ /// Specify the crate type.
118
+ pub fn crate_type ( & mut self , crate_type : & str ) -> & mut Self {
119
+ self . cmd . arg ( "--crate-type" ) ;
120
+ self . cmd . arg ( crate_type) ;
121
+ self
122
+ }
123
+
124
+ /// Specify the edition year.
125
+ pub fn edition ( & mut self , edition : & str ) -> & mut Self {
126
+ self . cmd . arg ( "--edition" ) ;
127
+ self . cmd . arg ( edition) ;
128
+ self
129
+ }
130
+
107
131
/// Generic command arguments provider. Use `.arg("-Zname")` over `.arg("-Z").arg("arg")`.
108
132
/// This method will panic if a plain `-Z` or `-C` is passed, or if `-Z <name>` or `-C <name>`
109
133
/// is passed (note the space).
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ run-make/compiler-rt-works-on-mingw/Makefile
31
31
run-make/compressed-debuginfo/Makefile
32
32
run-make/const-prop-lint/Makefile
33
33
run-make/const_fn_mir/Makefile
34
- run-make/core-no-fp-fmt-parse/Makefile
35
34
run-make/core-no-oom-handling/Makefile
36
35
run-make/crate-data-smoke/Makefile
37
36
run-make/crate-hash-rustc-version/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
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
+ . arg_path ( "../../../library/core/src/lib.rs" )
15
+ . cfg ( "no_fp_fmt_parse" )
16
+ . run ( ) ;
17
+ }
You can’t perform that action at this time.
0 commit comments