Skip to content

Commit 11eded3

Browse files
committed
rewrite allocator-shim-circular-deps to ui test
1 parent dfba1b5 commit 11eded3

File tree

6 files changed

+21
-19
lines changed

6 files changed

+21
-19
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
run-make/allocator-shim-circular-deps/Makefile
21
run-make/archive-duplicate-names/Makefile
32
run-make/atomic-lock-free/Makefile
43
run-make/branch-protection-check-IBT/Makefile

src/tools/tidy/src/ui_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::path::{Path, PathBuf};
1515
const ENTRY_LIMIT: u32 = 900;
1616
// FIXME: The following limits should be reduced eventually.
1717

18-
const ISSUES_ENTRY_LIMIT: u32 = 1672;
18+
const ISSUES_ENTRY_LIMIT: u32 = 1673;
1919

2020
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
2121
"rs", // test source files

tests/run-make/allocator-shim-circular-deps/Makefile

-12
This file was deleted.

tests/run-make/allocator-shim-circular-deps/main.rs

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// This test is designed to intentionally introduce a circular dependency scenario to check
2+
// that a specific compiler bug doesn't make a resurgence.
3+
// The bug in question arose when at least one crate
4+
// required a global allocator, and that crate was placed after
5+
// the one defining it in the linker order.
6+
// The generated symbols.o should not result in any linker errors.
7+
// See https://github.com/rust-lang/rust/issues/112715
8+
9+
//@ ignore-cross-compile
10+
//@ check-pass
11+
//@ compile-flags: --test
12+
//@ aux-build: my_lib.rs
13+
14+
#[crate_type = "bin"]
15+
16+
extern crate my_lib;
17+
18+
fn main() {
19+
my_lib::do_something();
20+
}

0 commit comments

Comments
 (0)