fixed compilation errors #1
Open
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.
Fixed these errors that failed compilation:
error[E0753]: expected outer doc comment
--> crates\testypf-gui\src\main.rs:19:1
|
19 | //! This function performs the essential setup rituals before launching our
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: inner doc comments like this (starting with
//!or/*!) can only appear before itemshelp: you might have meant to write a regular comment
|
19 - //! This function performs the essential setup rituals before launching our
19 + // This function performs the essential setup rituals before launching our
|
error[E0753]: expected outer doc comment
--> crates\testypf-gui\src\main.rs:20:1
|
20 | //! font testing interface. It initializes the Python runtime for typf
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: inner doc comments like this (starting with
//!or/*!) can only appear before itemshelp: you might have meant to write a regular comment
|
20 - //! font testing interface. It initializes the Python runtime for typf
20 + // font testing interface. It initializes the Python runtime for typf
|
error[E0753]: expected outer doc comment
--> crates\testypf-gui\src\main.rs:21:1
|
21 | //! integration, sets up logging for peaceful debugging, and then hands
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: inner doc comments like this (starting with
//!or/*!) can only appear before itemshelp: you might have meant to write a regular comment
|
21 - //! integration, sets up logging for peaceful debugging, and then hands
21 + // integration, sets up logging for peaceful debugging, and then hands
|
error[E0753]: expected outer doc comment
--> crates\testypf-gui\src\main.rs:22:1
|
22 | //! control to the application module. Think of it as the gentle starter
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: inner doc comments like this (starting with
//!or/*!) can only appear before itemshelp: you might have meant to write a regular comment
|
22 - //! control to the application module. Think of it as the gentle starter
22 + // control to the application module. Think of it as the gentle starter
|
error[E0585]: found a documentation comment that doesn't document anything
--> crates\testypf-gui\src\app.rs:73:5
|
29 | pub struct TestypfApp {
| ---------- while parsing this struct
...
73 | /// Whether to render selected fonts only or embrace the entire collection
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: doc comments must come before what they document, if a comment was intended use
//error[E0585]: found a documentation comment that doesn't document anything
--> crates\testypf-gui\src\message.rs:66:52
|
22 | pub enum Message {
| ------- while parsing this enum
...
66 | None, /// Choose grace over action when appropriate
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: doc comments must come before what they document, if a comment was intended use
//= help: enum variants can be
Variant,Variant = <integer>,Variant(Type, ..., TypeN)orVariant { fields: Types }error[E0282]: type annotations needed
--> crates\testypf-gui\src\update.rs:149:34
|
149 | .render_text(font.path(), &settings)
| ^^^^ cannot infer type
error[E0282]: type annotations needed
--> crates\testypf-gui\src\update.rs:198:17
|
198 | let pending = std::mem::take(&mut app.pending_drop_paths);
| ^^^^^^^
199 | if pending.is_empty() {
| ------- type must be known at this point
|
help: consider giving
pendingan explicit type|
198 | let pending: /* Type */ = std::mem::take(&mut app.pending_drop_paths);
| ++++++++++++
error[E0282]: type annotations needed
--> crates\testypf-gui\src\update.rs:226:21
|
226 | file.file_name().unwrap_or_default().to_string_lossy()
| ^^^^ cannot infer type
error[E0282]: type annotations needed
--> crates\testypf-gui\src\update.rs:317:30
|
317 | ... &e.to_string(),
| ^ cannot infer type
error[E0282]: type annotations needed
--> crates\testypf-gui\src\update.rs:346:30
|
346 | ... &e.to_string(),
| ^ cannot infer type
error[E0277]: the size for values of type
[u8]cannot be known at compilation time--> crates\testypf-gui\src\update.rs:379:18
|
379 | Some(folder) => match export_previews_to_folder(app, &folder) {
| ^^^^^^ doesn't have a size known at compile-time
|
= help: within
Path, the traitSizedis not implemented for[u8]note: required because it appears within the type
Path--> C:\Users\XXX.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\path.rs:2303:12
|
2303 | pub struct Path {
| ^^^^
= note: all local variables must have a statically known size
error[E0282]: type annotations needed
--> crates\testypf-gui\src\update.rs:437:48
|
437 | .filter_map(|&i| app.fonts.get(i).map(|f| f.path().to_path_buf()))
| ^ - type must be known at this point
|
help: consider giving this closure parameter an explicit type
|
437 | .filter_map(|&i| app.fonts.get(i).map(|f: /* Type */| f.path().to_path_buf()))
| ++++++++++++
error[E0282]: type annotations needed
--> crates\testypf-gui\src\update.rs:474:30
|
474 | .render_text(font.path(), &app.render_settings)
| ^^^^ cannot infer type
error[E0282]: type annotations needed
--> crates\testypf-gui\src\update.rs:490:83
|
490 | app.status = helpers::friendly_render_error(&font.full_name, &e.to_string());
| ^ cannot infer type
error[E0282]: type annotations needed
--> crates\testypf-gui\src\view\main_view.rs:249:49
|
249 | let file_size = helpers::font_file_size(selected.path());
| ^^^^^^^^ cannot infer type
error[E0282]: type annotations needed
--> crates\testypf-gui\src\view\main_view.rs:395:33
|
395 | let file_name = hovered_file
| ^^^^^^^^^^^^ cannot infer type
Some errors have detailed explanations: E0277, E0282, E0585, E0753.
For more information about an error, try
rustc --explain E0277.error: could not compile
testypf-gui(bin "testypf") due to 17 previous errors