Skip to content

Commit

Permalink
rewrite allocator-shim-circular-deps to ui test
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 17, 2024
1 parent dfba1b5 commit 11eded3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
run-make/allocator-shim-circular-deps/Makefile
run-make/archive-duplicate-names/Makefile
run-make/atomic-lock-free/Makefile
run-make/branch-protection-check-IBT/Makefile
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::path::{Path, PathBuf};
const ENTRY_LIMIT: u32 = 900;
// FIXME: The following limits should be reduced eventually.

const ISSUES_ENTRY_LIMIT: u32 = 1672;
const ISSUES_ENTRY_LIMIT: u32 = 1673;

const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
"rs", // test source files
Expand Down
12 changes: 0 additions & 12 deletions tests/run-make/allocator-shim-circular-deps/Makefile

This file was deleted.

5 changes: 0 additions & 5 deletions tests/run-make/allocator-shim-circular-deps/main.rs

This file was deleted.

20 changes: 20 additions & 0 deletions tests/ui/issues/allocator-shim-circular-deps.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// This test is designed to intentionally introduce a circular dependency scenario to check
// that a specific compiler bug doesn't make a resurgence.
// The bug in question arose when at least one crate
// required a global allocator, and that crate was placed after
// the one defining it in the linker order.
// The generated symbols.o should not result in any linker errors.
// See https://github.com/rust-lang/rust/issues/112715

//@ ignore-cross-compile
//@ check-pass
//@ compile-flags: --test
//@ aux-build: my_lib.rs

#[crate_type = "bin"]

extern crate my_lib;

fn main() {
my_lib::do_something();
}
File renamed without changes.

0 comments on commit 11eded3

Please sign in to comment.