2019-02-05 13:27:09 +00:00
|
|
|
#![feature(trait_alias)]
|
|
|
|
|
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
|
|
|
use std::fmt::Debug;
|
|
|
|
|
|
|
|
// @has foo/all.html '//a[@href="traitalias.CopyAlias.html"]' 'CopyAlias'
|
|
|
|
// @has foo/all.html '//a[@href="traitalias.Alias2.html"]' 'Alias2'
|
|
|
|
// @has foo/all.html '//a[@href="traitalias.Foo.html"]' 'Foo'
|
|
|
|
|
2022-01-07 23:30:50 +00:00
|
|
|
// @has foo/index.html '//h2[@id="trait-aliases"]' 'Trait Aliases'
|
2019-02-05 13:27:09 +00:00
|
|
|
// @has foo/index.html '//a[@class="traitalias"]' 'CopyAlias'
|
|
|
|
// @has foo/index.html '//a[@class="traitalias"]' 'Alias2'
|
|
|
|
// @has foo/index.html '//a[@class="traitalias"]' 'Foo'
|
|
|
|
|
2021-10-18 12:49:25 +00:00
|
|
|
// @has foo/traitalias.CopyAlias.html
|
2023-01-30 18:05:12 +00:00
|
|
|
// @has - '//section[@id="main-content"]/pre[@class="rust item-decl"]' 'trait CopyAlias = Copy;'
|
2019-02-05 13:27:09 +00:00
|
|
|
pub trait CopyAlias = Copy;
|
2021-10-18 12:49:25 +00:00
|
|
|
// @has foo/traitalias.Alias2.html
|
2023-01-30 18:05:12 +00:00
|
|
|
// @has - '//section[@id="main-content"]/pre[@class="rust item-decl"]' 'trait Alias2 = Copy + Debug;'
|
2019-02-05 13:27:09 +00:00
|
|
|
pub trait Alias2 = Copy + Debug;
|
2021-10-18 12:49:25 +00:00
|
|
|
// @has foo/traitalias.Foo.html
|
2023-01-30 18:05:12 +00:00
|
|
|
// @has - '//section[@id="main-content"]/pre[@class="rust item-decl"]' 'trait Foo<T> = Into<T> + Debug;'
|
2019-02-05 13:27:09 +00:00
|
|
|
pub trait Foo<T> = Into<T> + Debug;
|
2021-05-02 04:39:59 +00:00
|
|
|
// @has foo/fn.bar.html '//a[@href="traitalias.Alias2.html"]' 'Alias2'
|
|
|
|
pub fn bar<T>() where T: Alias2 {}
|