Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
bbf964af
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,发现更多精彩内容 >>
提交
bbf964af
编写于
11月 03, 2015
作者:
K
Kevin Butler
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
libcollections: deny warnings in doctests
上级
89a82038
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
27 addition
and
8 deletion
+27
-8
src/libcollections/binary_heap.rs
src/libcollections/binary_heap.rs
+1
-0
src/libcollections/borrow.rs
src/libcollections/borrow.rs
+1
-0
src/libcollections/btree/set.rs
src/libcollections/btree/set.rs
+1
-0
src/libcollections/fmt.rs
src/libcollections/fmt.rs
+2
-1
src/libcollections/lib.rs
src/libcollections/lib.rs
+1
-1
src/libcollections/slice.rs
src/libcollections/slice.rs
+1
-0
src/libcollections/str.rs
src/libcollections/str.rs
+4
-6
src/libcollections/string.rs
src/libcollections/string.rs
+15
-0
src/libcollections/vec.rs
src/libcollections/vec.rs
+1
-0
未找到文件。
src/libcollections/binary_heap.rs
浏览文件 @
bbf964af
...
...
@@ -233,6 +233,7 @@ pub fn with_capacity(capacity: usize) -> BinaryHeap<T> {
///
/// ```
/// #![feature(binary_heap_extras)]
/// # #![allow(deprecated)]
///
/// use std::collections::BinaryHeap;
/// let heap = BinaryHeap::from_vec(vec![9, 1, 2, 7, 3, 2]);
...
...
src/libcollections/borrow.rs
浏览文件 @
bbf964af
...
...
@@ -72,6 +72,7 @@ fn to_owned(&self) -> T { self.clone() }
/// ```
/// use std::borrow::Cow;
///
/// # #[allow(dead_code)]
/// fn abs_all(input: &mut Cow<[i32]>) {
/// for i in 0..input.len() {
/// let v = input[i];
...
...
src/libcollections/btree/set.rs
浏览文件 @
bbf964af
...
...
@@ -89,6 +89,7 @@ impl<T: Ord> BTreeSet<T> {
/// # Examples
///
/// ```
/// # #![allow(unused_mut)]
/// use std::collections::BTreeSet;
///
/// let mut set: BTreeSet<i32> = BTreeSet::new();
...
...
src/libcollections/fmt.rs
浏览文件 @
bbf964af
...
...
@@ -150,6 +150,7 @@
//! implement a method of the signature:
//!
//! ```
//! # #![allow(dead_code)]
//! # use std::fmt;
//! # struct Foo; // our custom type
//! # impl fmt::Display for Foo {
...
...
@@ -174,7 +175,6 @@
//! like:
//!
//! ```
//! #![feature(fmt_flags)]
//! use std::fmt;
//!
//! #[derive(Debug)]
...
...
@@ -288,6 +288,7 @@
//! off, some example usage is:
//!
//! ```
//! # #![allow(unused_must_use)]
//! use std::fmt;
//! use std::io::{self, Write};
//!
...
...
src/libcollections/lib.rs
浏览文件 @
bbf964af
...
...
@@ -27,7 +27,7 @@
html_root_url
=
"https://doc.rust-lang.org/nightly/"
,
html_playground_url
=
"https://play.rust-lang.org/"
,
issue_tracker_base_url
=
"https://github.com/rust-lang/rust/issues/"
,
test(no_crate_inject))]
test(no_crate_inject
,
attr(allow(unused_variables),
deny(warnings))
))]
#![allow(trivial_casts)]
#![cfg_attr(test,
allow(deprecated))]
// rand
...
...
src/libcollections/slice.rs
浏览文件 @
bbf964af
...
...
@@ -852,6 +852,7 @@ pub trait SliceConcatExt<T: ?Sized> {
/// # Examples
///
/// ```
/// # #![allow(deprecated)]
/// assert_eq!(["hello", "world"].connect(" "), "hello world");
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
...
...
src/libcollections/str.rs
浏览文件 @
bbf964af
...
...
@@ -298,7 +298,7 @@ pub unsafe fn slice_mut_unchecked(&mut self, begin: usize, end: usize) -> &mut s
/// done by `.chars()` or `.char_indices()`.
///
/// ```
/// #![feature(str_char
, core
)]
/// #![feature(str_char)]
///
/// use std::str::CharRange;
///
...
...
@@ -358,7 +358,7 @@ pub fn char_range_at(&self, start: usize) -> CharRange {
/// done by `.chars().rev()` or `.char_indices()`.
///
/// ```
/// #![feature(str_char
, core
)]
/// #![feature(str_char)]
///
/// use std::str::CharRange;
///
...
...
@@ -634,6 +634,7 @@ pub fn lines(&self) -> Lines {
/// # Examples
///
/// ```
/// # #![allow(deprecated)]
/// let four_lines = "foo\r\nbar\n\r\nbaz";
/// let v: Vec<&str> = four_lines.lines_any().collect();
///
...
...
@@ -643,6 +644,7 @@ pub fn lines(&self) -> Lines {
/// Leaving off the trailing character:
///
/// ```
/// # #![allow(deprecated)]
/// let four_lines = "foo\r\nbar\n\r\nbaz\n";
/// let v: Vec<&str> = four_lines.lines_any().collect();
///
...
...
@@ -1179,8 +1181,6 @@ pub fn rmatches<'a, P: Pattern<'a>>(&'a self, pat: P) -> RMatches<'a, P>
/// # Examples
///
/// ```
/// #![feature(str_match_indices)]
///
/// let v: Vec<_> = "abcXXXabcYYYabc".match_indices("abc").collect();
/// assert_eq!(v, [(0, "abc"), (6, "abc"), (12, "abc")]);
///
...
...
@@ -1216,8 +1216,6 @@ pub fn match_indices<'a, P: Pattern<'a>>(&'a self, pat: P) -> MatchIndices<'a, P
/// # Examples
///
/// ```
/// #![feature(str_match_indices)]
///
/// let v: Vec<_> = "abcXXXabcYYYabc".rmatch_indices("abc").collect();
/// assert_eq!(v, [(12, "abc"), (6, "abc"), (0, "abc")]);
///
...
...
src/libcollections/string.rs
浏览文件 @
bbf964af
...
...
@@ -55,6 +55,7 @@ impl String {
/// # Examples
///
/// ```
/// # #![allow(unused_mut)]
/// let mut s = String::new();
/// ```
#[inline]
...
...
@@ -73,6 +74,20 @@ pub fn new() -> String {
///
/// ```
/// let mut s = String::with_capacity(10);
///
/// // The String contains no chars, even though it has capacity for more
/// assert_eq!(s.len(), 0);
///
/// // These are all done without reallocating...
/// let cap = s.capacity();
/// for i in 0..10 {
/// s.push('a');
/// }
///
/// assert_eq!(s.capacity(), cap);
///
/// // ...but this may make the vector reallocate
/// s.push('a');
/// ```
#[inline]
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
...
...
src/libcollections/vec.rs
浏览文件 @
bbf964af
...
...
@@ -242,6 +242,7 @@ impl<T> Vec<T> {
/// # Examples
///
/// ```
/// # #![allow(unused_mut)]
/// let mut vec: Vec<i32> = Vec::new();
/// ```
#[inline]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录