mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
libsyntax: deny warnings in doctests
This commit is contained in:
parent
a17f81b4b7
commit
d64e551248
@ -26,7 +26,7 @@ TEST_TARGET_CRATES = $(filter-out core rustc_unicode alloc_system libc \
|
||||
alloc_jemalloc,$(TARGET_CRATES)) \
|
||||
collectionstest coretest
|
||||
TEST_DOC_CRATES = $(DOC_CRATES) arena flate fmt_macros getopts graphviz \
|
||||
log rand rbml serialize
|
||||
log rand rbml serialize syntax
|
||||
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve \
|
||||
rustc_trans rustc_lint,\
|
||||
$(HOST_CRATES))
|
||||
|
@ -908,13 +908,15 @@ pub enum Expr_ {
|
||||
/// separately. `position` represents the index of the associated
|
||||
/// item qualified with this Self type.
|
||||
///
|
||||
/// <Vec<T> as a::b::Trait>::AssociatedItem
|
||||
/// ^~~~~ ~~~~~~~~~~~~~~^
|
||||
/// ty position = 3
|
||||
/// ```ignore
|
||||
/// <Vec<T> as a::b::Trait>::AssociatedItem
|
||||
/// ^~~~~ ~~~~~~~~~~~~~~^
|
||||
/// ty position = 3
|
||||
///
|
||||
/// <Vec<T>>::AssociatedItem
|
||||
/// ^~~~~ ^
|
||||
/// ty position = 0
|
||||
/// <Vec<T>>::AssociatedItem
|
||||
/// ^~~~~ ^
|
||||
/// ty position = 0
|
||||
/// ```
|
||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||
pub struct QSelf {
|
||||
pub ty: P<Ty>,
|
||||
|
@ -54,6 +54,7 @@
|
||||
//! following snippet
|
||||
//!
|
||||
//! ```rust
|
||||
//! # #![allow(dead_code)]
|
||||
//! struct A { x : i32 }
|
||||
//!
|
||||
//! struct B(i32);
|
||||
@ -88,7 +89,7 @@
|
||||
//!
|
||||
//! ```rust
|
||||
//! trait PartialEq {
|
||||
//! fn eq(&self, other: &Self);
|
||||
//! fn eq(&self, other: &Self) -> bool;
|
||||
//! }
|
||||
//! impl PartialEq for i32 {
|
||||
//! fn eq(&self, other: &i32) -> bool {
|
||||
@ -905,7 +906,7 @@ impl<'a> MethodDef<'a> {
|
||||
})
|
||||
}
|
||||
|
||||
/// ```
|
||||
/// ```ignore
|
||||
/// #[derive(PartialEq)]
|
||||
/// struct A { x: i32, y: i32 }
|
||||
///
|
||||
@ -1010,7 +1011,7 @@ impl<'a> MethodDef<'a> {
|
||||
&StaticStruct(struct_def, summary))
|
||||
}
|
||||
|
||||
/// ```
|
||||
/// ```ignore
|
||||
/// #[derive(PartialEq)]
|
||||
/// enum A {
|
||||
/// A1,
|
||||
@ -1596,7 +1597,7 @@ pub fn cs_fold<F>(use_foldl: bool,
|
||||
/// Call the method that is being derived on all the fields, and then
|
||||
/// process the collected results. i.e.
|
||||
///
|
||||
/// ```
|
||||
/// ```ignore
|
||||
/// f(cx, span, vec![self_1.method(__arg_1_1, __arg_2_1),
|
||||
/// self_2.method(__arg_1_2, __arg_2_2)])
|
||||
/// ```
|
||||
|
@ -77,9 +77,10 @@ struct Context<'a, 'b:'a> {
|
||||
/// expressions.
|
||||
///
|
||||
/// If parsing succeeds, the return value is:
|
||||
///
|
||||
/// Some((fmtstr, unnamed arguments, ordering of named arguments,
|
||||
/// named arguments))
|
||||
/// ```ignore
|
||||
/// Some((fmtstr, unnamed arguments, ordering of named arguments,
|
||||
/// named arguments))
|
||||
/// ```
|
||||
fn parse_args(ecx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
|
||||
-> Option<(P<ast::Expr>, Vec<P<ast::Expr>>, Vec<String>,
|
||||
HashMap<String, P<ast::Expr>>)> {
|
||||
|
@ -23,7 +23,8 @@
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||
test(attr(deny(warnings))))]
|
||||
|
||||
#![feature(associated_consts)]
|
||||
#![feature(drain)]
|
||||
|
@ -3965,7 +3965,7 @@ impl<'a> Parser<'a> {
|
||||
|
||||
/// Parses an optional `where` clause and places it in `generics`.
|
||||
///
|
||||
/// ```
|
||||
/// ```ignore
|
||||
/// where T : Trait<U, V> + 'b, 'a : 'b
|
||||
/// ```
|
||||
pub fn parse_where_clause(&mut self) -> PResult<ast::WhereClause> {
|
||||
|
@ -11,8 +11,10 @@
|
||||
//! This pretty-printer is a direct reimplementation of Philip Karlton's
|
||||
//! Mesa pretty-printer, as described in appendix A of
|
||||
//!
|
||||
//! STAN-CS-79-770: "Pretty Printing", by Derek C. Oppen.
|
||||
//! Stanford Department of Computer Science, 1979.
|
||||
//! ````ignore
|
||||
//! STAN-CS-79-770: "Pretty Printing", by Derek C. Oppen.
|
||||
//! Stanford Department of Computer Science, 1979.
|
||||
//! ````
|
||||
//!
|
||||
//! The algorithm's aim is to break a stream into as few lines as possible
|
||||
//! while respecting the indentation-consistency requirements of the enclosing
|
||||
|
Loading…
Reference in New Issue
Block a user