|
1 | 1 | // Vendored from https://github.com/bytecodealliance/wasmtime/blob/b58a197d33f044193c3d608010f5e6ec394ac07e/cranelift/native/src/lib.rs |
2 | 2 | // which is licensed as |
3 | 3 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
4 | | -// unlike rustc_codegen_cranelift itself. |
| 4 | +// unlike rustc_codegen_cranelift itself. Also applies a small change to remove #![cfg_attr] that |
| 5 | +// rust's CI complains about and to fix formatting to match rustc. |
5 | 6 | // FIXME revert back to the external crate with Cranelift 0.93 |
6 | 7 | #![allow(warnings)] |
7 | 8 |
|
8 | 9 | //! Performs autodetection of the host for the purposes of running |
9 | 10 | //! Cranelift to generate code to run on the same machine. |
10 | 11 |
|
11 | | -#![deny( |
12 | | - missing_docs, |
13 | | - trivial_numeric_casts, |
14 | | - unused_extern_crates, |
15 | | - unstable_features |
16 | | -)] |
| 12 | +#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates, unstable_features)] |
17 | 13 | #![warn(unused_import_braces)] |
18 | | -#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))] |
19 | | -#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))] |
20 | | -#![cfg_attr( |
21 | | - feature = "cargo-clippy", |
22 | | - warn( |
23 | | - clippy::float_arithmetic, |
24 | | - clippy::mut_mut, |
25 | | - clippy::nonminimal_bool, |
26 | | - clippy::map_unwrap_or, |
27 | | - clippy::clippy::print_stdout, |
28 | | - clippy::unicode_not_nfc, |
29 | | - clippy::use_self |
30 | | - ) |
31 | | -)] |
32 | 14 |
|
33 | 15 | use cranelift_codegen::isa; |
34 | 16 | use target_lexicon::Triple; |
@@ -241,9 +223,7 @@ mod tests { |
241 | 223 | fn test() { |
242 | 224 | if let Ok(isa_builder) = builder() { |
243 | 225 | let flag_builder = settings::builder(); |
244 | | - let isa = isa_builder |
245 | | - .finish(settings::Flags::new(flag_builder)) |
246 | | - .unwrap(); |
| 226 | + let isa = isa_builder.finish(settings::Flags::new(flag_builder)).unwrap(); |
247 | 227 |
|
248 | 228 | if cfg!(all(target_os = "macos", target_arch = "aarch64")) { |
249 | 229 | assert_eq!(isa.default_call_conv(), CallConv::AppleAarch64); |
|
0 commit comments