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

ices/87573.rs: fixed with errors #940

Merged
merged 1 commit into from
Aug 29, 2021
Merged

ices/87573.rs: fixed with errors #940

merged 1 commit into from
Aug 29, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#87573

#![crate_type = "lib"]
#![feature(no_core, lang_items)]
#![no_core]

static STATIC_BOOL: bool = true;

#[lang = "sized"]
trait Sized {}

#[lang = "copy"]
trait Copy {}

// Uncommenting avoids the second ICE
//impl Copy for bool {}

#[lang = "sync"]
trait Sync {}
impl Sync for bool {}

// Both errors occur here and are independent
#[lang = "drop_in_place"]
fn drop_fn() { // <- the drop fn expects a generic T, missing T causes index error
    while false {} // <- this expects the bool condition to be Copy, and it isn't
}

// required to make the compiler happy
#[lang = "start"]
fn start(){}
=== stdout ===
=== stderr ===
error[E0718]: `drop_in_place` language item must be applied to a function with at least 1 generic argument
  --> /home/runner/work/glacier/glacier/ices/87573.rs:21:1
   |
21 | #[lang = "drop_in_place"]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
22 | fn drop_fn() { // <- the drop fn expects a generic T, missing T causes index error
   |           - this function has 0 generic arguments

error: aborting due to previous error

For more information about this error, try `rustc --explain E0718`.
==============

=== stdout ===
=== stderr ===
error[E0718]: `drop_in_place` language item must be applied to a function with at least 1 generic argument
  --> /home/runner/work/glacier/glacier/ices/87573.rs:21:1
   |
21 | #[lang = "drop_in_place"]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
22 | fn drop_fn() { // <- the drop fn expects a generic T, missing T causes index error
   |           - this function has 0 generic arguments

error: aborting due to previous error

For more information about this error, try `rustc --explain E0718`.
==============
@Alexendoo Alexendoo merged commit 8138c3a into master Aug 29, 2021
@Alexendoo Alexendoo deleted the autofix/ices/87573.rs branch August 29, 2021 11:54
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