This repository was archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit 93c199c
committed
ices/97194.rs: fixed with errors
=== 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`.
==============1 parent 70682f8 commit 93c199cCopy full SHA for 93c199c
1 file changed
+0
-0
lines changedices/97194.rs renamed to fixed/97194.rs
Copy file name to clipboardFile renamed without changes.
0 commit comments