@@ -0,0 +1,36 @@
// Copyright 2015 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.

// aux-build:issue-20646.rs
// ignore-android

#![feature(associated_types)]

extern crate issue_20646;

// @has issue_20646/trait.Trait.html \
// '//*[@id="associatedtype.Output"]' \
// 'type Output'
pub trait Trait {
type Output;
}

// @has issue_20646/fn.fun.html \
// '//*[@class="rust fn"]' 'where T: Trait<Output=i32>'
pub fn fun<T>(_: T) where T: Trait<Output=i32> {}

pub mod reexport {
// @has issue_20646/reexport/trait.Trait.html \
// '//*[@id="associatedtype.Output"]' \
// 'type Output'
// @has issue_20646/reexport/fn.fun.html \
// '//*[@class="rust fn"]' 'where T: Trait<Output=i32>'
pub use issue_20646::{Trait, fun};
}
@@ -0,0 +1,33 @@
// Copyright 2015 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.

// aux-build:issue-20727.rs
// ignore-android

extern crate issue_20727;

// @has issue_20727_2/trait.Add.html
pub trait Add<RHS = Self> {
// @has - '//*[@class="rust trait"]' 'trait Add<RHS = Self> {'
// @has - '//*[@class="rust trait"]' 'type Output;'
type Output;

// @has - '//*[@class="rust trait"]' 'fn add(self, rhs: RHS) -> Self::Output;'
fn add(self, rhs: RHS) -> Self::Output;
}

// @has issue_20727_2/reexport/trait.Add.html
pub mod reexport {
// @has - '//*[@class="rust trait"]' 'trait Add<RHS = Self> {'
// @has - '//*[@class="rust trait"]' 'type Output;'
// @has - '//*[@class="rust trait"]' 'fn add(self, rhs: RHS) -> Self::Output;'
pub use issue_20727::Add;
}

@@ -0,0 +1,34 @@
// Copyright 2015 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.

// aux-build:issue-20727.rs
// ignore-android

extern crate issue_20727;

pub trait Bar {}

// @has issue_20727_3/trait.Deref2.html
pub trait Deref2 {
// @has - '//*[@class="rust trait"]' 'trait Deref2 {'
// @has - '//*[@class="rust trait"]' 'type Target: Bar;'
type Target: Bar;

// @has - '//*[@class="rust trait"]' 'fn deref(&self) -> Self::Target;'
fn deref(&self) -> Self::Target;
}

// @has issue_20727_3/reexport/trait.Deref2.html
pub mod reexport {
// @has - '//*[@class="rust trait"]' 'trait Deref2 {'
// @has - '//*[@class="rust trait"]' 'type Target: Bar;'
// @has - '//*[@class="rust trait"]' 'fn deref(&self) -> Self::Target;'
pub use issue_20727::Deref2;
}
@@ -0,0 +1,50 @@
// Copyright 2015 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.

// aux-build:issue-20727.rs
// ignore-android

extern crate issue_20727;

// @has issue_20727_4/trait.Index.html
pub trait Index<Idx: ?Sized> {
// @has - '//*[@class="rust trait"]' 'trait Index<Idx: ?Sized> {'
// @has - '//*[@class="rust trait"]' 'type Output: ?Sized'
type Output: ?Sized;

// @has - '//*[@class="rust trait"]' \
// 'fn index(&self, index: Idx) -> &Self::Output'
fn index(&self, index: Idx) -> &Self::Output;
}

// @has issue_20727_4/trait.IndexMut.html
pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
// @has - '//*[@class="rust trait"]' \
// 'trait IndexMut<Idx: ?Sized>: Index<Idx> {'
// @has - '//*[@class="rust trait"]' \
// 'fn index_mut(&mut self, index: Idx) -> &mut Self::Output;'
fn index_mut(&mut self, index: Idx) -> &mut Self::Output;
}

pub mod reexport {
// @has issue_20727_4/reexport/trait.Index.html
// @has - '//*[@class="rust trait"]' 'trait Index<Idx> where Idx: ?Sized {'
// @has - '//*[@class="rust trait"]' 'type Output: ?Sized'
// @has - '//*[@class="rust trait"]' \
// 'fn index(&self, index: Idx) -> &Self::Output'
pub use issue_20727::Index;

// @has issue_20727_4/reexport/trait.IndexMut.html
// @has - '//*[@class="rust trait"]' \
// 'trait IndexMut<Idx>: Index<Idx> where Idx: ?Sized {'
// @has - '//*[@class="rust trait"]' \
// 'fn index_mut(&mut self, index: Idx) -> &mut Self::Output;'
pub use issue_20727::IndexMut;
}
@@ -0,0 +1,34 @@
// Copyright 2015 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.

// aux-build:issue-20727.rs
// ignore-android

extern crate issue_20727;

// @has issue_20727/trait.Deref.html
pub trait Deref {
// @has - '//*[@class="rust trait"]' 'trait Deref {'
// @has - '//*[@class="rust trait"]' 'type Target: ?Sized;'
type Target: ?Sized;

// @has - '//*[@class="rust trait"]' \
// "fn deref<'a>(&'a self) -> &'a Self::Target;"
fn deref<'a>(&'a self) -> &'a Self::Target;
}

// @has issue_20727/reexport/trait.Deref.html
pub mod reexport {
// @has - '//*[@class="rust trait"]' 'trait Deref {'
// @has - '//*[@class="rust trait"]' 'type Target: ?Sized;'
// @has - '//*[@class="rust trait"]' \
// "fn deref(&'a self) -> &'a Self::Target;"
pub use issue_20727::Deref;
}
@@ -0,0 +1,18 @@
// Copyright 2015 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.

// aux-build:issue-21092.rs
// ignore-android

extern crate issue_21092;

// @has issue_21092/struct.Bar.html
// @has - '//*[@id="assoc_type.Bar"]' 'type Bar = i32'
pub use issue_21092::{Foo, Bar};
@@ -0,0 +1,21 @@
// Copyright 2012-2014 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.

pub use inner::*;

mod inner {
impl super::Blah for super::What { }
}

pub trait Blah { }

// @count issue_21474/struct.What.html \
// '//*[@class="impl"]' 1
pub struct What;
@@ -0,0 +1,19 @@
// Copyright 2015 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.

// aux-build:issue-21801.rs
// ignore-android

extern crate issue_21801;

// @has issue_21801/struct.Foo.html
// @has - '//*[@id="method.new"]' \
// 'fn new<F>(f: F) -> Foo where F: FnMut() -> i32'
pub use issue_21801::Foo;
@@ -0,0 +1,16 @@
// Copyright 2015 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.

// aux-build:issue-22025.rs
// ignore-android

extern crate issue_22025;

pub use issue_22025::foo::{Foo, Bar};
@@ -0,0 +1,29 @@
// Copyright 2015 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 {
// @has issue_22038/fn.foo1.html \
// '//*[@class="rust fn"]' 'pub unsafe extern fn foo1()'
pub fn foo1();
}

extern "system" {
// @has issue_22038/fn.foo2.html \
// '//*[@class="rust fn"]' 'pub unsafe extern "system" fn foo2()'
pub fn foo2();
}

// @has issue_22038/fn.bar.html \
// '//*[@class="rust fn"]' 'pub extern fn bar()'
pub extern fn bar() {}

// @has issue_22038/fn.baz.html \
// '//*[@class="rust fn"]' 'pub extern "system" fn baz()'
pub extern "system" fn baz() {}
@@ -8,9 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

extern crate foo;
// compile-flags:--test

pub use foo::bar;

pub fn wut<T: bar::Bar>() {
/// ```
/// #
/// ```
pub fn main() {
}
@@ -0,0 +1,20 @@
// Copyright 2015 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.

// aux-build:issue-23207-1.rs
// aux-build:issue-23207-2.rs
// ignore-android

extern crate issue_23207_2;

// @has issue_23207/fmt/index.html
// @count - '//*[@class="struct"]' 1
pub use issue_23207_2::fmt;

@@ -0,0 +1,24 @@
// Copyright 2015 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.

#![feature(no_std, lang_items, core)]
#![no_std]

extern crate core;

pub mod str {
#![doc(primitive = "str")]

#[lang = "str"]
impl str {
// @has search-index.js foo
pub fn foo(&self) {}
}
}
@@ -0,0 +1,22 @@
// Copyright 2015 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.

// compile-flags:--test

/// Example of rustdoc incorrectly parsing <code>```rust,should_panic</code>.
///
/// ```should_panic
/// fn main() { panic!("fee"); }
/// ```
///
/// ```rust,should_panic
/// fn main() { panic!("fum"); }
/// ```
pub fn foo() {}
@@ -8,15 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![crate_type="lib"]

// @has lib/struct.Struct.html //pre '#[must_use]'
// @has must_use/struct.Struct.html //pre '#[must_use]'
#[must_use]
pub struct Struct {
field: i32,
}

// @has lib/enum.Enum.html //pre '#[must_use = "message"]'
// @has must_use/enum.Enum.html //pre '#[must_use = "message"]'
#[must_use = "message"]
pub enum Enum {
Variant(i32),
@@ -10,13 +10,13 @@

#![feature(optin_builtin_traits)]

// @matches foo/struct.Alpha.html '//pre' "pub struct Alpha"
// @matches negative_impl/struct.Alpha.html '//pre' "pub struct Alpha"
pub struct Alpha;
// @matches foo/struct.Bravo.html '//pre' "pub struct Bravo<B>"
// @matches negative_impl/struct.Bravo.html '//pre' "pub struct Bravo<B>"
pub struct Bravo<B>(B);

// @matches foo/struct.Alpha.html '//*[@class="impl"]//code' "impl !Send for Alpha"
// @matches negative_impl/struct.Alpha.html '//*[@class="impl"]//code' "impl !Send for Alpha"
impl !Send for Alpha {}

// @matches foo/struct.Bravo.html '//*[@class="impl"]//code' "impl<B> !Send for Bravo<B>"
// @matches negative_impl/struct.Bravo.html '//*[@class="impl"]//code' "impl<B> !Send for Bravo<B>"
impl<B> !Send for Bravo<B> {}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -8,29 +8,28 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// @has foo/index.html
#![crate_name = "foo"]
// @has smoke/index.html

//! Very docs

// @has foo/bar/index.html
// @has smoke/bar/index.html
pub mod bar {

/// So correct
// @has foo/bar/baz/index.html
// @has smoke/bar/baz/index.html
pub mod baz {
/// Much detail
// @has foo/bar/baz/fn.baz.html
// @has smoke/bar/baz/fn.baz.html
pub fn baz() { }
}

/// *wow*
// @has foo/bar/trait.Doge.html
// @has smoke/bar/trait.Doge.html
pub trait Doge { fn dummy(&self) { } }

// @has foo/bar/struct.Foo.html
// @has smoke/bar/struct.Foo.html
pub struct Foo { x: isize, y: usize }

// @has foo/bar/fn.prawns.html
// @has smoke/bar/fn.prawns.html
pub fn prawns((a, b): (isize, usize), Foo { x, y }: Foo) { }
}
@@ -0,0 +1,56 @@
// Copyright 2015 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.

#![crate_name = "foo"]

//! Dox
// @has src/foo/src-links.rs.html
// @has foo/index.html '//a/@href' '../src/foo/src-links.rs.html'

#[path = "src-links/mod.rs"]
pub mod qux;

// @has foo/bar/index.html '//a/@href' '../../src/foo/src-links.rs.html'
pub mod bar {

/// Dox
// @has foo/bar/baz/index.html '//a/@href' '../../../src/foo/src-links.rs.html'
pub mod baz {
/// Dox
// @has foo/bar/baz/fn.baz.html '//a/@href' '../../../src/foo/src-links.rs.html'
pub fn baz() { }
}

/// Dox
// @has foo/bar/trait.Foobar.html '//a/@href' '../../src/foo/src-links.rs.html'
pub trait Foobar { fn dummy(&self) { } }

// @has foo/bar/struct.Foo.html '//a/@href' '../../src/foo/src-links.rs.html'
pub struct Foo { x: i32, y: u32 }

// @has foo/bar/fn.prawns.html '//a/@href' '../../src/foo/src-links.rs.html'
pub fn prawns((a, b): (i32, u32), Foo { x, y }: Foo) { }
}

/// Dox
// @has foo/fn.modfn.html '//a/@href' '../src/foo/src-links.rs.html'
pub fn modfn() { }

// same hierarchy as above, but just for the submodule

// @has src/foo/src-links/mod.rs.html
// @has foo/qux/index.html '//a/@href' '../../src/foo/src-links/mod.rs.html'
// @has foo/qux/bar/index.html '//a/@href' '../../../src/foo/src-links/mod.rs.html'
// @has foo/qux/bar/baz/index.html '//a/@href' '../../../../src/foo/src-links/mod.rs.html'
// @has foo/qux/bar/baz/fn.baz.html '//a/@href' '../../../../src/foo/src-links/mod.rs.html'
// @has foo/qux/bar/trait.Foobar.html '//a/@href' '../../../src/foo/src-links/mod.rs.html'
// @has foo/qux/bar/struct.Foo.html '//a/@href' '../../../src/foo/src-links/mod.rs.html'
// @has foo/qux/bar/fn.prawns.html '//a/@href' '../../../src/foo/src-links/mod.rs.html'
// @has foo/qux/fn.modfn.html '//a/@href' '../../src/foo/src-links/mod.rs.html'
@@ -0,0 +1,29 @@
// Copyright 2015 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.

//! Dox
pub mod bar {

/// Dox
pub mod baz {
/// Dox
pub fn baz() { }
}

/// Dox
pub trait Foobar { fn dummy(&self) { } }

pub struct Foo { x: i32, y: u32 }

pub fn prawns((a, b): (i32, u32), Foo { x, y }: Foo) { }
}

/// Dox
pub fn modfn() { }
@@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![crate_name = "foo"]

pub mod io {
pub trait Reader { fn dummy(&self) { } }
}
@@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![crate_name = "foo"]

pub trait MyTrait { fn dummy(&self) { } }

// @has foo/struct.Alpha.html '//pre' "pub struct Alpha<A> where A: MyTrait"