Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
799cadb2
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
799cadb2
编写于
12月 11, 2018
作者:
O
Oliver Scherer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unnecessary feature gates from const fns
上级
4c0116e1
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
1 addition
and
11 deletion
+1
-11
src/libstd/io/lazy.rs
src/libstd/io/lazy.rs
+0
-1
src/libstd/lib.rs
src/libstd/lib.rs
+1
-0
src/libstd/sys/sgx/condvar.rs
src/libstd/sys/sgx/condvar.rs
+0
-1
src/libstd/sys/sgx/mutex.rs
src/libstd/sys/sgx/mutex.rs
+0
-2
src/libstd/sys/sgx/rwlock.rs
src/libstd/sys/sgx/rwlock.rs
+0
-1
src/libstd/sys/sgx/waitqueue.rs
src/libstd/sys/sgx/waitqueue.rs
+0
-3
src/libstd/sys_common/condvar.rs
src/libstd/sys_common/condvar.rs
+0
-1
src/libstd/sys_common/mutex.rs
src/libstd/sys_common/mutex.rs
+0
-1
src/libstd/sys_common/rwlock.rs
src/libstd/sys_common/rwlock.rs
+0
-1
未找到文件。
src/libstd/io/lazy.rs
浏览文件 @
799cadb2
...
...
@@ -26,7 +26,6 @@ const fn done<T>() -> *mut Arc<T> { 1_usize as *mut _ }
unsafe
impl
<
T
>
Sync
for
Lazy
<
T
>
{}
impl
<
T
>
Lazy
<
T
>
{
#[unstable(feature
=
"sys_internals"
,
issue
=
"0"
)]
// FIXME: min_const_fn
pub
const
fn
new
()
->
Lazy
<
T
>
{
Lazy
{
lock
:
Mutex
::
new
(),
...
...
src/libstd/lib.rs
浏览文件 @
799cadb2
...
...
@@ -271,6 +271,7 @@
#![feature(libc)]
#![feature(link_args)]
#![feature(linkage)]
#![feature(min_const_unsafe_fn)]
#![feature(needs_panic_runtime)]
#![feature(never_type)]
#![feature(nll)]
...
...
src/libstd/sys/sgx/condvar.rs
浏览文件 @
799cadb2
...
...
@@ -18,7 +18,6 @@ pub struct Condvar {
}
impl
Condvar
{
#[unstable(feature
=
"sgx_internals"
,
issue
=
"0"
)]
// FIXME: min_const_fn
pub
const
fn
new
()
->
Condvar
{
Condvar
{
inner
:
SpinMutex
::
new
(
WaitVariable
::
new
(()))
}
}
...
...
src/libstd/sys/sgx/mutex.rs
浏览文件 @
799cadb2
...
...
@@ -20,7 +20,6 @@ pub struct Mutex {
// Implementation according to “Operating Systems: Three Easy Pieces”, chapter 28
impl
Mutex
{
#[unstable(feature
=
"sgx_internals"
,
issue
=
"0"
)]
// FIXME: min_const_fn
pub
const
fn
new
()
->
Mutex
{
Mutex
{
inner
:
SpinMutex
::
new
(
WaitVariable
::
new
(
false
))
}
}
...
...
@@ -79,7 +78,6 @@ pub struct ReentrantMutex {
}
impl
ReentrantMutex
{
#[unstable(feature
=
"sgx_internals"
,
issue
=
"0"
)]
// FIXME: min_const_fn
pub
const
fn
uninitialized
()
->
ReentrantMutex
{
ReentrantMutex
{
inner
:
SpinMutex
::
new
(
WaitVariable
::
new
(
ReentrantLock
{
owner
:
None
,
count
:
0
}))
...
...
src/libstd/sys/sgx/rwlock.rs
浏览文件 @
799cadb2
...
...
@@ -21,7 +21,6 @@ pub struct RWLock {
//unsafe impl Sync for RWLock {} // FIXME
impl
RWLock
{
#[unstable(feature
=
"sgx_internals"
,
issue
=
"0"
)]
// FIXME: min_const_fn
pub
const
fn
new
()
->
RWLock
{
RWLock
{
readers
:
SpinMutex
::
new
(
WaitVariable
::
new
(
None
)),
...
...
src/libstd/sys/sgx/waitqueue.rs
浏览文件 @
799cadb2
...
...
@@ -50,7 +50,6 @@ pub struct WaitVariable<T> {
}
impl
<
T
>
WaitVariable
<
T
>
{
#[unstable(feature
=
"sgx_internals"
,
issue
=
"0"
)]
// FIXME: min_const_fn
pub
const
fn
new
(
var
:
T
)
->
Self
{
WaitVariable
{
queue
:
WaitQueue
::
new
(),
...
...
@@ -137,7 +136,6 @@ fn drop(&mut self) {
}
impl
WaitQueue
{
#[unstable(feature
=
"sgx_internals"
,
issue
=
"0"
)]
// FIXME: min_const_fn
pub
const
fn
new
()
->
Self
{
WaitQueue
{
inner
:
UnsafeList
::
new
()
...
...
@@ -255,7 +253,6 @@ pub struct UnsafeList<T> {
}
impl
<
T
>
UnsafeList
<
T
>
{
#[unstable(feature
=
"sgx_internals"
,
issue
=
"0"
)]
// FIXME: min_const_fn
pub
const
fn
new
()
->
Self
{
unsafe
{
UnsafeList
{
...
...
src/libstd/sys_common/condvar.rs
浏览文件 @
799cadb2
...
...
@@ -25,7 +25,6 @@ impl Condvar {
///
/// Behavior is undefined if the condition variable is moved after it is
/// first used with any of the functions below.
#[unstable(feature
=
"sys_internals"
,
issue
=
"0"
)]
// FIXME: min_const_fn
pub
const
fn
new
()
->
Condvar
{
Condvar
(
imp
::
Condvar
::
new
())
}
/// Prepares the condition variable for use.
...
...
src/libstd/sys_common/mutex.rs
浏览文件 @
799cadb2
...
...
@@ -27,7 +27,6 @@ impl Mutex {
/// Also, until `init` is called, behavior is undefined if this
/// mutex is ever used reentrantly, i.e., `raw_lock` or `try_lock`
/// are called by the thread currently holding the lock.
#[unstable(feature
=
"sys_internals"
,
issue
=
"0"
)]
// FIXME: min_const_fn
pub
const
fn
new
()
->
Mutex
{
Mutex
(
imp
::
Mutex
::
new
())
}
/// Prepare the mutex for use.
...
...
src/libstd/sys_common/rwlock.rs
浏览文件 @
799cadb2
...
...
@@ -22,7 +22,6 @@ impl RWLock {
///
/// Behavior is undefined if the reader-writer lock is moved after it is
/// first used with any of the functions below.
#[unstable(feature
=
"sys_internals"
,
issue
=
"0"
)]
// FIXME: min_const_fn
pub
const
fn
new
()
->
RWLock
{
RWLock
(
imp
::
RWLock
::
new
())
}
/// Acquires shared access to the underlying lock, blocking the current
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录