Skip to content

Incorrect 'cannot bind by-move with sub-bindings` error #3761

Closed

Description

@brson
                while self.from_content.peek() {                                                                   
                    match self.from_content.recv() {                                                               
                        move msg @ BuildMsg(*) => {                                                                
                            last_build_msg = Some(move msg);                                                       
                        }                                                                                          
                        move msg => {                                                                              
                            enqueue_last_build_msg();                                                              
                            // Other messages need responses                                                       
                            request_queue_chan.send(msg);                                                          
                        }                                                                                          
                    }                                                                                              
                } 
/home/brian/dev/servo/src/servo/layout/layout_task.rs:241:24: 241:49 error: cannot bind by-move with sub-bindings
/home/brian/dev/servo/src/servo/layout/layout_task.rs:241                         move msg @ BuildMsg(*) => {
                                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~

There aren't any sub-bindings there.

Activity

  1. pcwalton commented on May 16, 2013

    @pcwalton
    Contributor

    Still a problem, but I don't think this is a backwards compatibility issue.

  2. pcwalton commented on May 16, 2013

    @pcwalton
    Contributor

    Minimal test case:

    struct Foo(~str);
    
    fn main() {
        match Foo(~"hi") {
            msg @ Foo(_) => {}
        }
    }
    
  3. pnkfelix commented on Jun 27, 2013

    @pnkfelix
    Contributor

    accepted for feature complete milestone

  4. huonw commented on Aug 14, 2013

    @huonw
    Contributor

    Triage visit; will be fixed when #8508 lands.

  5. added 2 commits that reference this issue on Aug 14, 2013
    9d67df6
    58021be
  6. added a commit that references this issue on Jul 29, 2024
  7. added a commit that references this issue on Aug 21, 2026
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-lifetimesArea: Lifetimes / regions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions