2014-02-05 16:33:10 -06:00
|
|
|
// Copyright 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.
|
|
|
|
|
2014-10-15 01:05:01 -05:00
|
|
|
#![crate_name="foo"]
|
2013-12-28 17:54:56 -06:00
|
|
|
|
2014-12-30 22:32:49 -06:00
|
|
|
/// The '# ' lines should be removed from the output, but the #[derive] should be
|
2013-12-28 17:54:56 -06:00
|
|
|
/// retained.
|
|
|
|
///
|
|
|
|
/// ```rust
|
|
|
|
/// mod to_make_deriving_work { // FIXME #4913
|
|
|
|
///
|
2014-12-30 22:32:49 -06:00
|
|
|
/// # #[derive(PartialEq)] // invisible
|
2013-12-28 17:54:56 -06:00
|
|
|
/// # struct Foo; // invisible
|
|
|
|
///
|
2014-12-30 22:32:49 -06:00
|
|
|
/// #[derive(PartialEq)] // Bar
|
2013-12-28 17:54:56 -06:00
|
|
|
/// struct Bar(Foo);
|
|
|
|
///
|
|
|
|
/// fn test() {
|
|
|
|
/// let x = Bar(Foo);
|
|
|
|
/// assert!(x == x); // check that the derivings worked
|
|
|
|
/// }
|
|
|
|
///
|
|
|
|
/// }
|
|
|
|
/// ```
|
|
|
|
pub fn foo() {}
|
2015-01-17 11:24:04 -06:00
|
|
|
|
|
|
|
// @!has foo/fn.foo.html invisible
|
|
|
|
// @matches - //pre '#.*\[.*derive.*\(.*Eq.*\).*\].*//.*Bar'
|
|
|
|
|