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

ices/74599.rs: fixed with errors #755

Merged
merged 1 commit into from
May 14, 2021
Merged

ices/74599.rs: fixed with errors #755

merged 1 commit into from
May 14, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#74599

#![feature(rustc_attrs)]

extern "C" {
    #[rustc_args_required_const(0, 1)]
    pub fn print_raw(data: *const u8, len: usize);
}

pub enum Stmt {
    Print {},
    Let {},
    Loop {},
}

pub fn interpret() {
    match (Stmt::Print {}) {
        Stmt::Let {} => {
            [()].iter().find(|v| *v == &());
        }

        Stmt::Print {} => {
            print_raw(b"hello".as_ptr(), 5);
        }

        Stmt::Loop {} => {}
    }
}

fn main() {}
=== stdout ===
=== stderr ===
error: attributes starting with `rustc` are reserved for use by the `rustc` compiler
 --> /home/runner/work/glacier/glacier/ices/74599.rs:4:7
  |
4 |     #[rustc_args_required_const(0, 1)]
  |       ^^^^^^^^^^^^^^^^^^^^^^^^^

error: cannot find attribute `rustc_args_required_const` in this scope
 --> /home/runner/work/glacier/glacier/ices/74599.rs:4:7
  |
4 |     #[rustc_args_required_const(0, 1)]
  |       ^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error: attributes starting with `rustc` are reserved for use by the `rustc` compiler
 --> /home/runner/work/glacier/glacier/ices/74599.rs:4:7
  |
4 |     #[rustc_args_required_const(0, 1)]
  |       ^^^^^^^^^^^^^^^^^^^^^^^^^

error: cannot find attribute `rustc_args_required_const` in this scope
 --> /home/runner/work/glacier/glacier/ices/74599.rs:4:7
  |
4 |     #[rustc_args_required_const(0, 1)]
  |       ^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

==============
@Alexendoo Alexendoo merged commit 8e1303e into master May 14, 2021
@Alexendoo Alexendoo deleted the autofix/ices/74599.rs branch May 14, 2021 13:58
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