Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
65c1d359
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,发现更多精彩内容 >>
提交
65c1d359
编写于
6月 14, 2021
作者:
M
Mara Bos
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Stabilize {std, core}::prelude::rust_*.
上级
7510b0ca
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
31 addition
and
18 deletion
+31
-18
library/core/src/prelude/mod.rs
library/core/src/prelude/mod.rs
+8
-8
library/std/src/lib.rs
library/std/src/lib.rs
+0
-1
library/std/src/prelude/mod.rs
library/std/src/prelude/mod.rs
+23
-9
未找到文件。
library/core/src/prelude/mod.rs
浏览文件 @
65c1d359
...
...
@@ -11,9 +11,9 @@
/// The 2015 version of the core prelude.
///
/// See the [module-level documentation](self) for more.
#[
unstable(feature
=
"prelude_2015"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2015"
,
since
=
"1.55.0
"
)]
pub
mod
rust_2015
{
#[
unstable(feature
=
"prelude_2015"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2015"
,
since
=
"1.55.0
"
)]
#[doc(no_inline)]
pub
use
super
::
v1
::
*
;
}
...
...
@@ -21,9 +21,9 @@ pub mod rust_2015 {
/// The 2018 version of the core prelude.
///
/// See the [module-level documentation](self) for more.
#[
unstable(feature
=
"prelude_2018"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2018"
,
since
=
"1.55.0
"
)]
pub
mod
rust_2018
{
#[
unstable(feature
=
"prelude_2018"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2018"
,
since
=
"1.55.0
"
)]
#[doc(no_inline)]
pub
use
super
::
v1
::
*
;
}
...
...
@@ -31,17 +31,17 @@ pub mod rust_2018 {
/// The 2021 version of the core prelude.
///
/// See the [module-level documentation](self) for more.
#[
unstable(feature
=
"prelude_2021"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2021"
,
since
=
"1.55.0
"
)]
pub
mod
rust_2021
{
#[
unstable(feature
=
"prelude_2021"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2021"
,
since
=
"1.55.0
"
)]
#[doc(no_inline)]
pub
use
super
::
v1
::
*
;
#[
unstable(feature
=
"prelude_2021"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2021"
,
since
=
"1.55.0
"
)]
#[doc(no_inline)]
pub
use
crate
::
iter
::
FromIterator
;
#[
unstable(feature
=
"prelude_2021"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2021"
,
since
=
"1.55.0
"
)]
#[doc(no_inline)]
pub
use
crate
::
convert
::{
TryFrom
,
TryInto
};
}
library/std/src/lib.rs
浏览文件 @
65c1d359
...
...
@@ -302,7 +302,6 @@
#![feature(panic_internals)]
#![feature(panic_unwind)]
#![feature(pin_static_ref)]
#![feature(prelude_2021)]
#![feature(prelude_import)]
#![feature(ptr_internals)]
#![feature(raw)]
...
...
library/std/src/prelude/mod.rs
浏览文件 @
65c1d359
...
...
@@ -25,8 +25,10 @@
//!
//! # Prelude contents
//!
//! The current version of the prelude (version 1) lives in
//! [`std::prelude::v1`], and re-exports the following:
//! The first version of the prelude is used in Rust 2015 and Rust 2018,
//! and lives in [`std::prelude::v1`].
//! [`std::prelude::rust_2015`] and [`std::prelude::rust_2018`] re-export this prelude.
//! It re-exports the following:
//!
//! * <code>[std::marker]::{[Copy], [Send], [Sized], [Sync], [Unpin]}</code>,
//! marker traits that indicate fundamental properties of types.
...
...
@@ -58,6 +60,12 @@
//! * <code>[std::string]::{[String], [ToString]}</code>, heap-allocated strings.
//! * <code>[std::vec]::[Vec]</code>, a growable, heap-allocated vector.
//!
//! The prelude used in Rust 2021, [`std::prelude::rust_2021`], includes all of the above,
//! and in addition re-exports:
//!
//! * <code>[std::convert]::{[TryFrom], [TryInto]}</code>,
//! * <code>[std::iter]::[FromIterator]</code>.
//!
//! [mem::drop]: crate::mem::drop
//! [std::borrow]: crate::borrow
//! [std::boxed]: crate::boxed
...
...
@@ -71,10 +79,16 @@
//! [std::ops]: crate::ops
//! [std::option]: crate::option
//! [`std::prelude::v1`]: v1
//! [`std::prelude::rust_2015`]: rust_2015
//! [`std::prelude::rust_2018`]: rust_2018
//! [`std::prelude::rust_2021`]: rust_2021
//! [std::result]: crate::result
//! [std::slice]: crate::slice
//! [std::string]: crate::string
//! [std::vec]: mod@crate::vec
//! [TryFrom]: crate::convert::TryFrom
//! [TryInto]: crate::convert::TryInto
//! [FromIterator]: crate::iter::FromIterator
//! [`to_owned`]: crate::borrow::ToOwned::to_owned
//! [book-closures]: ../../book/ch13-01-closures.html
//! [book-dtor]: ../../book/ch15-03-drop.html
...
...
@@ -88,9 +102,9 @@
/// The 2015 version of the prelude of The Rust Standard Library.
///
/// See the [module-level documentation](self) for more.
#[
unstable(feature
=
"prelude_2015"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2015"
,
since
=
"1.55.0
"
)]
pub
mod
rust_2015
{
#[
unstable(feature
=
"prelude_2015"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2015"
,
since
=
"1.55.0
"
)]
#[doc(no_inline)]
pub
use
super
::
v1
::
*
;
}
...
...
@@ -98,9 +112,9 @@ pub mod rust_2015 {
/// The 2018 version of the prelude of The Rust Standard Library.
///
/// See the [module-level documentation](self) for more.
#[
unstable(feature
=
"prelude_2018"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2018"
,
since
=
"1.55.0
"
)]
pub
mod
rust_2018
{
#[
unstable(feature
=
"prelude_2018"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2018"
,
since
=
"1.55.0
"
)]
#[doc(no_inline)]
pub
use
super
::
v1
::
*
;
}
...
...
@@ -108,13 +122,13 @@ pub mod rust_2018 {
/// The 2021 version of the prelude of The Rust Standard Library.
///
/// See the [module-level documentation](self) for more.
#[
unstable(feature
=
"prelude_2021"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2021"
,
since
=
"1.55.0
"
)]
pub
mod
rust_2021
{
#[
unstable(feature
=
"prelude_2021"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2021"
,
since
=
"1.55.0
"
)]
#[doc(no_inline)]
pub
use
super
::
v1
::
*
;
#[
unstable(feature
=
"prelude_2021"
,
issue
=
"85684
"
)]
#[
stable(feature
=
"prelude_2021"
,
since
=
"1.55.0
"
)]
#[doc(no_inline)]
pub
use
core
::
prelude
::
rust_2021
::
*
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录