This repository was archived by the owner on May 23, 2024. It is now read-only.
Conversation
=== stdout ===
=== stderr ===
error: this file contains an unclosed delimiter
--> /home/runner/work/glacier/glacier/ices/97194.rs:7:14
|
1 | extern "" {
| - unclosed delimiter
2 | fn bget(&self, index: [usize; Self::DIM]) -> bool {
| - this delimiter might not be properly closed...
...
5 | }
| - ...as it matches this but it has different indentation
6 |
7 | fn main() {}
| ^
error[E0428]: the name `T` is defined multiple times
--> /home/runner/work/glacier/glacier/ices/97194.rs:4:5
|
3 | type T;
| ------- previous definition of the type `T` here
4 | type T<'a> = &'a str;
| ^^^^^^^^^^^^^^^^^^^^^ `T` redefined here
|
= note: `T` must be defined only once in the type namespace of this block
error: incorrect function inside `extern` block
--> /home/runner/work/glacier/glacier/ices/97194.rs:2:8
|
1 | extern "" {
| --------- `extern` blocks define existing foreign functions and functions inside of them cannot have a body
2 | fn bget(&self, index: [usize; Self::DIM]) -> bool {
| ________^^^^___________________________________________-
| | |
| | cannot have a body
3 | | type T;
4 | | type T<'a> = &'a str;
5 | | }
| |_- help: remove the invalid body: `;`
|
= help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
= note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
error: `self` parameter is only allowed in associated functions
--> /home/runner/work/glacier/glacier/ices/97194.rs:2:13
|
2 | fn bget(&self, index: [usize; Self::DIM]) -> bool {
| ^^^^^ not semantically valid as function parameter
|
= note: associated functions are those in `impl` or `trait` definitions
error: free type alias without body
--> /home/runner/work/glacier/glacier/ices/97194.rs:3:5
|
3 | type T;
| ^^^^^^-
| |
| help: provide a definition for the type: `= <type>;`
error: incorrect function inside `extern` block
--> /home/runner/work/glacier/glacier/ices/97194.rs:7:4
|
1 | extern "" {
| --------- `extern` blocks define existing foreign functions and functions inside of them cannot have a body
...
7 | fn main() {}
| ^^^^ -- help: remove the invalid body: `;`
| |
| cannot have a body
|
= help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
= note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
error[E0433]: failed to resolve: use of undeclared type `Self`
--> /home/runner/work/glacier/glacier/ices/97194.rs:2:35
|
2 | fn bget(&self, index: [usize; Self::DIM]) -> bool {
| ^^^^ use of undeclared type `Self`
error[E0703]: invalid ABI: found ``
--> /home/runner/work/glacier/glacier/ices/97194.rs:1:8
|
1 | extern "" {
| ^^ invalid ABI
|
= help: valid ABIs: Rust, C, C-unwind, cdecl, cdecl-unwind, stdcall, stdcall-unwind, fastcall, fastcall-unwind, vectorcall, vectorcall-unwind, thiscall, thiscall-unwind, aapcs, aapcs-unwind, win64, win64-unwind, sysv64, sysv64-unwind, ptx-kernel, msp430-interrupt, x86-interrupt, amdgpu-kernel, efiapi, avr-interrupt, avr-non-blocking-interrupt, C-cmse-nonsecure-call, wasm, system, system-unwind, rust-intrinsic, rust-call, platform-intrinsic, unadjusted
error: the `main` function cannot be declared in an `extern` block
--> /home/runner/work/glacier/glacier/ices/97194.rs:7:1
|
7 | fn main() {}
| ^^^^^^^^^^^^
error: aborting due to 9 previous errors
Some errors have detailed explanations: E0428, E0433, E0703.
For more information about an error, try `rustc --explain E0428`.
==============
JohnTitor
approved these changes
May 23, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: rust-lang/rust#97194