Skip to content

ICE in github build #80998

Closed
Closed

Activity

  1. added
    C-bugCategory: This is a bug.
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Jan 14, 2021
  2. hellow554 commented on Jan 14, 2021

    @hellow554
    Contributor

    Reduced to only use the task proc-macro:

    use embassy::executor::task;
    
    #[task]
    async fn run() {
        let a = Foo ;
    }
    

    It seems important, that Foo isn't defined, if I define a struct Foo, the ICE goes away.

  3. hellow554 commented on Jan 14, 2021

    @hellow554
    Contributor

    searched nightlies: from nightly-2020-06-01 to nightly-2021-01-01
    regressed nightly: nightly-2020-10-27
    searched commits: from 4760b8f to fd54259
    regressed commit: b9a94c9

    bisected with cargo-bisect-rustc v0.6.0

    Host triple: x86_64-unknown-linux-gnu
    Reproduce with:

    cargo bisect-rustc 2020-06-01 --regress ice --access github -- check

    I'm pretty sure that #78324 isn't at fault here, but instead it just uncovers the problem.

  4. hellow554 commented on Jan 14, 2021

    @hellow554
    Contributor

    MCVE:

    #![feature(type_alias_impl_trait)]
    
    use std::future::Future;
    
    pub struct Task<F: Future>(F);
    impl<F: Future> Task<F> {
        fn new() -> Self {
            todo!()
        }
        fn spawn(&self, _: impl FnOnce() -> F) {
            todo!()
        }
    }
    
    fn main() {
        async fn cb() {
            let a = Foo;
        }
    
        type F = impl Future;
        static POOL: Task<F> = Task::new();
        Task::spawn(&POOL, || cb());
    }
    
  5. jonas-schievink commented on Jan 14, 2021

    @jonas-schievink
    Contributor

    Panic location:

    pub fn generator_layout(self, def_id: DefId) -> &'tcx GeneratorLayout<'tcx> {
    self.optimized_mir(def_id).generator_layout.as_ref().unwrap()
    }

  6. added 2 commits that reference this issue on Jan 15, 2021
    11a63fb
    ce06df2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-awaitArea: Async & AwaitA-coroutinesArea: CoroutinesC-bugCategory: This is a bug.F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions