Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
8cdad627
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8cdad627
编写于
1月 11, 2016
作者:
S
Steffen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add feature gate "abi_vectorcall" for the vectorcall calling convention
上级
9af75d2b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
42 addition
and
5 deletion
+42
-5
src/doc/book/ffi.md
src/doc/book/ffi.md
+1
-0
src/doc/reference.md
src/doc/reference.md
+3
-0
src/libsyntax/feature_gate.rs
src/libsyntax/feature_gate.rs
+19
-5
src/test/compile-fail/feature-gate-abi-vectorcall.rs
src/test/compile-fail/feature-gate-abi-vectorcall.rs
+19
-0
未找到文件。
src/doc/book/ffi.md
浏览文件 @
8cdad627
...
...
@@ -479,6 +479,7 @@ are:
*
`cdecl`
*
`fastcall`
*
`vectorcall`
This is currently hidden behind the
`abi_vectorcall`
gate and is subject to change.
*
`Rust`
*
`rust-intrinsic`
*
`system`
...
...
src/doc/reference.md
浏览文件 @
8cdad627
...
...
@@ -2390,6 +2390,9 @@ The currently implemented features of the reference compiler are:
* - `type_ascription` - Allows type ascription expressions `expr: Type`.
* - `abi_vectorcall` - Allows the usage of the vectorcall calling convention
(e.g. `extern "vectorcall" func fn_();`)
If a feature is promoted to a language feature, then all existing programs will
start to receive compilation warnings about `#![feature]` directives which enabled
the new feature (because the directive is no longer necessary). However, if a
...
...
src/libsyntax/feature_gate.rs
浏览文件 @
8cdad627
...
...
@@ -239,6 +239,9 @@
// Allows cfg(target_thread_local)
(
"cfg_target_thread_local"
,
"1.7.0"
,
Some
(
29594
),
Active
),
// rustc internal
(
"abi_vectorcall"
,
"1.7.0"
,
None
,
Active
)
];
// (changing above list without updating src/doc/reference.md makes @cmr sad)
...
...
@@ -862,6 +865,11 @@ fn visit_item(&mut self, i: &ast::Item) {
Abi
::
PlatformIntrinsic
=>
{
Some
((
"platform_intrinsics"
,
"platform intrinsics are experimental and possibly buggy"
))
},
Abi
::
Vectorcall
=>
{
Some
((
"abi_vectorcall"
,
"vectorcall is experimental and subject to change"
))
}
_
=>
None
};
...
...
@@ -1033,11 +1041,17 @@ fn visit_fn(&mut self,
"intrinsics are subject to change"
)
}
FnKind
::
ItemFn
(
_
,
_
,
_
,
_
,
abi
,
_
)
|
FnKind
::
Method
(
_
,
&
ast
::
MethodSig
{
abi
,
..
},
_
)
if
abi
==
Abi
::
RustCall
=>
{
self
.gate_feature
(
"unboxed_closures"
,
span
,
"rust-call ABI is subject to change"
)
}
FnKind
::
Method
(
_
,
&
ast
::
MethodSig
{
abi
,
..
},
_
)
=>
match
abi
{
Abi
::
RustCall
=>
{
self
.gate_feature
(
"unboxed_closures"
,
span
,
"rust-call ABI is subject to change"
);
},
Abi
::
Vectorcall
=>
{
self
.gate_feature
(
"abi_vectorcall"
,
span
,
"vectorcall is experimental and subject to change"
);
},
_
=>
{}
},
_
=>
{}
}
visit
::
walk_fn
(
self
,
fn_kind
,
fn_decl
,
block
,
span
);
...
...
src/test/compile-fail/feature-gate-abi-vectorcall.rs
0 → 100644
浏览文件 @
8cdad627
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
extern
"vectorcall"
{
//~ ERROR vectorcall is experimental and subject to change
fn
bar
();
}
extern
"vectorcall"
fn
baz
()
{
//~ ERROR vectorcall is experimental and subject to change
}
fn
main
()
{
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录