diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-04-14 17:41:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-14 17:41:05 -0400 |
| commit | 5aa96024e3679f67925495f5322d6d65c3192fa1 (patch) | |
| tree | 55ccb892cb7f2fc279b2ee84b32391a5c1e1a02c /src/test/rustdoc | |
| parent | 5d7467acf69223c6211f8e1a023fa8a73f4bacb9 (diff) | |
| parent | dd7dfe56a9e0d095c670a84f9e827fa9689aad97 (diff) | |
| download | rust-5aa96024e3679f67925495f5322d6d65c3192fa1.tar.gz rust-5aa96024e3679f67925495f5322d6d65c3192fa1.zip | |
Rollup merge of #41249 - GuillaumeGomez:rustdoc-render, r=steveklabnik,frewsxcv
Fix invalid associated type rendering in rustdoc Fixes #41036. r? @rust-lang/docs
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/assoc-item-cast.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/rustdoc/assoc-item-cast.rs b/src/test/rustdoc/assoc-item-cast.rs new file mode 100644 index 00000000000..24f31b5b104 --- /dev/null +++ b/src/test/rustdoc/assoc-item-cast.rs @@ -0,0 +1,26 @@ +// Copyright 2017 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"] + +// ignore-tidy-linelength + +pub trait Expression { + type SqlType; +} + +pub trait AsExpression<T> { + type Expression: Expression<SqlType = T>; + fn as_expression(self) -> Self::Expression; +} + +// @has foo/type.AsExprOf.html +// @has - '//*[@class="rust typedef"]' 'type AsExprOf<Item, Type> = <Item as AsExpression<Type>>::Expression;' +pub type AsExprOf<Item, Type> = <Item as AsExpression<Type>>::Expression; |
