Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/92157.rs: fixed with errors #1486

Merged
merged 1 commit into from
Jan 14, 2023
Merged

ices/92157.rs: fixed with errors #1486

merged 1 commit into from
Jan 14, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#92157

#![feature(no_core)]
#![feature(lang_items)]

#![no_core]
#[cfg(target_os = "linux")]
#[link(name = "c")]
extern {}

#[lang = "start"]
fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {
    40+2
}
pub fn main() { }

#[lang = "sized"]
pub trait Sized {}
#[lang = "copy"]
pub trait Copy {}

#[lang = "drop_in_place"]
#[allow(unconditional_recursion)]
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
    drop_in_place(to_drop)
}

#[lang = "add"]
trait Add<RHS> {
    type Output;
    fn add(self, other: RHS) -> Self::Output;
}

impl Add<isize> for isize {
    type Output = isize;
    fn add(self, other: isize) -> isize {
        self + other
    }
}
=== stdout ===
=== stderr ===
error: incorrect number of parameters for the `start` lang item
  --> /home/runner/work/glacier/glacier/ices/92157.rs:10:1
   |
10 | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: the `start` lang item should have four parameters, but found 3
   = note: the `start` lang item should have the signature `fn(fn() -> T, isize, *const *const u8, u8) -> isize`

error: aborting due to previous error

==============

=== stdout ===
=== stderr ===
error: incorrect number of parameters for the `start` lang item
  --> /home/runner/work/glacier/glacier/ices/92157.rs:10:1
   |
10 | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: the `start` lang item should have four parameters, but found 3
   = note: the `start` lang item should have the signature `fn(fn() -> T, isize, *const *const u8, u8) -> isize`

error: aborting due to previous error

==============
@JohnTitor JohnTitor merged commit 7beb5e5 into master Jan 14, 2023
@JohnTitor JohnTitor deleted the autofix/ices/92157.rs branch January 14, 2023 20:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants