Skip to content

Commit 87accdb

Browse files
committed
Try to work around 32 bit mingw issues
1 parent e8857d0 commit 87accdb

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

Diff for: tests/ui-fulldeps/stable-mir/compilation-result.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// ignore-stage1
55
// ignore-cross-compile
66
// ignore-remote
7+
// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
78
// edition: 2021
89

910
#![feature(rustc_private)]

Diff for: tests/ui-fulldeps/stable-mir/crate-info.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// ignore-stage1
55
// ignore-cross-compile
66
// ignore-remote
7+
// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
78
// edition: 2021
89

910
#![feature(rustc_private)]
@@ -130,7 +131,8 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
130131
mut args,
131132
)) => {
132133
let func = def.body();
133-
match func.locals[1].ty
134+
match func.locals[1]
135+
.ty
134136
.fold(&mut args)
135137
.continue_value()
136138
.unwrap()

Diff for: tests/ui-fulldeps/stable-mir/instance.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// ignore-stage1
55
// ignore-cross-compile
66
// ignore-remote
7+
// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
78
// edition: 2021
89

910
#![feature(rustc_private)]
@@ -13,14 +14,14 @@
1314
extern crate rustc_middle;
1415
#[macro_use]
1516
extern crate rustc_smir;
16-
extern crate stable_mir;
1717
extern crate rustc_driver;
1818
extern crate rustc_interface;
19+
extern crate stable_mir;
1920

2021
use rustc_middle::ty::TyCtxt;
2122

22-
use stable_mir::*;
2323
use rustc_smir::rustc_internal;
24+
use stable_mir::*;
2425
use std::io::Write;
2526
use std::ops::ControlFlow;
2627

@@ -31,16 +32,16 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
3132
let items = stable_mir::all_local_items();
3233

3334
// Get all items and split generic vs monomorphic items.
34-
let (generic, mono) : (Vec<_>, Vec<_>) = items.into_iter().partition(|item| {
35-
item.requires_monomorphization()
36-
});
35+
let (generic, mono): (Vec<_>, Vec<_>) =
36+
items.into_iter().partition(|item| item.requires_monomorphization());
3737
assert_eq!(mono.len(), 3, "Expected 2 mono functions and one constant");
3838
assert_eq!(generic.len(), 2, "Expected 2 generic functions");
3939

4040
// For all monomorphic items, get the correspondent instances.
41-
let instances = mono.iter().filter_map(|item| {
42-
mir::mono::Instance::try_from(*item).ok()
43-
}).collect::<Vec<mir::mono::Instance>>();
41+
let instances = mono
42+
.iter()
43+
.filter_map(|item| mir::mono::Instance::try_from(*item).ok())
44+
.collect::<Vec<mir::mono::Instance>>();
4445
assert_eq!(instances.len(), mono.len());
4546

4647
// For all generic items, try_from should fail.
@@ -49,7 +50,6 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
4950
ControlFlow::Continue(())
5051
}
5152

52-
5353
/// This test will generate and analyze a dummy crate using the stable mir.
5454
/// For that, it will first write the dummy crate into a file.
5555
/// Then it will create a `StableMir` using custom arguments and then

0 commit comments

Comments
 (0)