diff options
| author | kennytm <kennytm@gmail.com> | 2018-02-10 14:24:04 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-10 14:24:04 +0800 |
| commit | 1e10ca0b030c4c68336be44260da1625fc98cb9d (patch) | |
| tree | ecc388e742458fac6a193db44aa0a2373a03888f /src/libsyntax | |
| parent | d6394e51a01c9617c9d33a78d66db2236d8994dc (diff) | |
| parent | 7a20fc14ef255df1ce2c417943605015aba2b1ff (diff) | |
| download | rust-1e10ca0b030c4c68336be44260da1625fc98cb9d.tar.gz rust-1e10ca0b030c4c68336be44260da1625fc98cb9d.zip | |
Rollup merge of #48078 - alexcrichton:fix-required-const-and-proc-macro, r=eddyb
Disallow function pointers to #[rustc_args_required_const] This commit disallows acquiring a function pointer to functions tagged as `#[rustc_args_required_const]`. This is intended to be used as future-proofing for the stdsimd crate to avoid taking a function pointer to any intrinsic which has a hard requirement that one of the arguments is a constant value. Note that the first commit here isn't related specifically to this feature, but was necessary to get this working in stdsimd!
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 9c6520cd874..ae0556320b0 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -984,6 +984,11 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG "wasm_import_memory attribute is currently unstable", cfg_fn!(wasm_import_memory))), + ("rustc_args_required_const", Whitelisted, Gated(Stability::Unstable, + "rustc_attrs", + "never will be stable", + cfg_fn!(rustc_attrs))), + // Crate level attributes ("crate_name", CrateLevel, Ungated), ("crate_type", CrateLevel, Ungated), |
