Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example consider adding an explicit lifetime bound... #496

Open
ruanlianjun opened this issue Jan 4, 2023 · 0 comments
Open

example consider adding an explicit lifetime bound... #496

ruanlianjun opened this issue Jan 4, 2023 · 0 comments

Comments

@ruanlianjun
Copy link

// ANCHOR: All
// ANCHOR: Use
use orbtk::prelude::*;
// ANCHOR_END: Use

// ANCHOR: Main
fn main() {
    // ANCHOR_END: Main
    // ANCHOR: Initialize
    // use this only if you want to run it as web application.
    orbtk::initialize();
    // ANCHOR_END: Initialize

    // ANCHOR: Application
    Application::new()
        // ANCHOR_END: Application
        // ANCHOR: Window
        .window(|ctx| {
            Window::new()
                .title("OrbTk - Minimal")
                .position((100.0, 100.0))
                .size(420.0, 140.0)
                // ANCHOR_END: Window
                // ANCHOR: Child
                .child(
                    TextBlock::new()
                        // ANCHOR: Properties
                        .font_size(28)
                        .h_align("center")
                        .text("Hey OrbTk!")
                        .v_align("center")
                        // ANCHOR_END: Properties
                        .build(ctx),
                )
                // ANCHOR: Build
                .build(ctx)
            // ANCHOR_END: Build
            // ANCHOR_END: Child
        })
        // ANCHOR: Run
        .run();
    // ANCHOR_END: Run
}
// ANCHOR_END: All
   |
136 | /                 self.system_store
137 | |                     .borrow_entity_system(*system)
138 | |                     .unwrap()
139 | |                     .system
140 | |                     .run_with_context(&mut self.entity_component_manager, ctx);
    | |______________________________________________________________________________^ ...so that the type `E` will meet its required lifetime bounds
    |
help: consider adding an explicit lifetime bound...
    |
39  |     E: EntityStore + 'static,
    |                    +++++++++

For more information about this error, try `rustc --explain E0310`.
error: could not compile `dces` due to 10 previous errors
warning: build failed, waiting for other jobs to finish...
Some errors have detailed explanations: E0412, E0433.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `orbtk_orbclient` due to 4 previous errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant