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

ices/83893.rs: fixed with errors #758

Merged
merged 1 commit into from
May 19, 2021
Merged

ices/83893.rs: fixed with errors #758

merged 1 commit into from
May 19, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#83893

#[lang = "add"]
trait Add<'a, T> {}
fn ice() {
    r + a
}
=== stdout ===
=== stderr ===
error[E0425]: cannot find value `r` in this scope
 --> /home/runner/work/glacier/glacier/ices/83893.rs:4:5
  |
4 |     r + a
  |     ^ not found in this scope

error[E0425]: cannot find value `a` in this scope
 --> /home/runner/work/glacier/glacier/ices/83893.rs:4:9
  |
4 |     r + a
  |         ^ not found in this scope

error[E0658]: language items are subject to change
 --> /home/runner/work/glacier/glacier/ices/83893.rs:1:1
  |
1 | #[lang = "add"]
  | ^^^^^^^^^^^^^^^
  |
  = help: add `#![feature(lang_items)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `83893`
 --> /home/runner/work/glacier/glacier/ices/83893.rs:1:1
  |
1 | / #[lang = "add"]
2 | | trait Add<'a, T> {}
3 | | fn ice() {
4 | |     r + a
5 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/83893.rs`

error[E0152]: found duplicate lang item `add`
 --> /home/runner/work/glacier/glacier/ices/83893.rs:2:1
  |
2 | trait Add<'a, T> {}
  | ^^^^^^^^^^^^^^^^^^^
  |
  = note: the lang item is first defined in crate `core` (which `std` depends on)
  = note: first definition in `core` loaded from /usr/share/rust/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-c8ded1707ad10767.rlib
  = note: second definition in the local crate (`83893`)

error[E0718]: `add` language item must be applied to a trait with 1 generic argument
 --> /home/runner/work/glacier/glacier/ices/83893.rs:1:1
  |
1 | #[lang = "add"]
  | ^^^^^^^^^^^^^^^
2 | trait Add<'a, T> {}
  |          ------- this trait has 2 generic arguments, not 1

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0152, E0425, E0601, E0658, E0718.
For more information about an error, try `rustc --explain E0152`.
==============

=== stdout ===
=== stderr ===
error[E0425]: cannot find value `r` in this scope
 --> /home/runner/work/glacier/glacier/ices/83893.rs:4:5
  |
4 |     r + a
  |     ^ not found in this scope

error[E0425]: cannot find value `a` in this scope
 --> /home/runner/work/glacier/glacier/ices/83893.rs:4:9
  |
4 |     r + a
  |         ^ not found in this scope

error[E0658]: language items are subject to change
 --> /home/runner/work/glacier/glacier/ices/83893.rs:1:1
  |
1 | #[lang = "add"]
  | ^^^^^^^^^^^^^^^
  |
  = help: add `#![feature(lang_items)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `83893`
 --> /home/runner/work/glacier/glacier/ices/83893.rs:1:1
  |
1 | / #[lang = "add"]
2 | | trait Add<'a, T> {}
3 | | fn ice() {
4 | |     r + a
5 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/83893.rs`

error[E0152]: found duplicate lang item `add`
 --> /home/runner/work/glacier/glacier/ices/83893.rs:2:1
  |
2 | trait Add<'a, T> {}
  | ^^^^^^^^^^^^^^^^^^^
  |
  = note: the lang item is first defined in crate `core` (which `std` depends on)
  = note: first definition in `core` loaded from /usr/share/rust/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-c8ded1707ad10767.rlib
  = note: second definition in the local crate (`83893`)

error[E0718]: `add` language item must be applied to a trait with 1 generic argument
 --> /home/runner/work/glacier/glacier/ices/83893.rs:1:1
  |
1 | #[lang = "add"]
  | ^^^^^^^^^^^^^^^
2 | trait Add<'a, T> {}
  |          ------- this trait has 2 generic arguments, not 1

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0152, E0425, E0601, E0658, E0718.
For more information about an error, try `rustc --explain E0152`.
==============
@Alexendoo Alexendoo merged commit 0cf5752 into master May 19, 2021
@Alexendoo Alexendoo deleted the autofix/ices/83893.rs branch May 19, 2021 16:12
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