From: bors Date: Thu, 4 Aug 2016 05:56:33 +0000 (-0700) Subject: Auto merge of #35015 - petrochenkov:forearg, r=nikomatsakis X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=271d048523b6c1b0e773d9e5cc76bbb997cc180c;p=rust.git Auto merge of #35015 - petrochenkov:forearg, r=nikomatsakis Properly enforce the "patterns aren't allowed in foreign functions" rule Cases like `arg @ PATTERN` or `mut arg` were missing. Apply the same rule to function pointer types. Closes https://github.com/rust-lang/rust/issues/35203 [breaking-change], no breakage in sane code is expected though r? @nikomatsakis This is somewhat related to https://github.com/rust-lang/rfcs/pull/1685 (cc @matklad). The goal is to eventually support full pattern syntax where it makes sense (function body may present) and to support *only* the following forms - `TYPE`, `ident: TYPE`, `_: TYPE` - where patterns don't make sense (function body doesn't present), i.e. in foreign functions and function pointer types. --- 271d048523b6c1b0e773d9e5cc76bbb997cc180c