Rollup merge of #150821 - remove-test, r=jackh726

tests/ui/borrowck/issue-92157.rs: Remove (bug not fixed)

The bug the test tests for is masked by the wrong `#[lang = "start"]` signature. If the signature is corrected, the test builds. But that is not because the bug is fixed, but because the test has been changed too much from the original reproducer. The original reproducer still ICE:s. See https://github.com/rust-lang/rust/issues/92157#issuecomment-3722060317.

But that's fine since in the latest compiler says:

> note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly

So let's remove the test and close the issue as "won't fix". See https://github.com/rust-lang/rust/issues/92157#issuecomment-3725036997.

r? @JohnTitor since you added the test in https://github.com/rust-lang/rust/pull/106878
This commit is contained in:
Guillaume Gomez 2026-01-09 12:00:02 +01:00 committed by GitHub
commit 19769da8f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 0 additions and 33 deletions

View file

@ -379,7 +379,6 @@ ui/borrowck/issue-88434-minimal-example.rs
ui/borrowck/issue-88434-removal-index-should-be-less.rs
ui/borrowck/issue-91206.rs
ui/borrowck/issue-92015.rs
ui/borrowck/issue-92157.rs
ui/borrowck/issue-93078.rs
ui/borrowck/issue-93093.rs
ui/borrowck/issue-95079-missing-move-in-nested-closure.rs

View file

@ -1,20 +0,0 @@
//@ add-minicore
#![feature(no_core)]
#![feature(lang_items)]
#![no_core]
#[cfg(target_os = "linux")]
#[link(name = "c")]
extern "C" {}
#[lang = "start"]
fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {
//~^ ERROR lang item `start` function has wrong type [E0308]
40+2
}
extern crate minicore;
use minicore::*;
fn main() {}

View file

@ -1,12 +0,0 @@
error[E0308]: lang item `start` function has wrong type
--> $DIR/issue-92157.rs:12:1
|
LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
|
= note: expected signature `fn(fn() -> T, isize, *const *const u8, u8) -> _`
found signature `fn(fn() -> T, isize, *const *const u8) -> _`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.