forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#116670 - oli-obk:host_docs, r=fmease
Hide host effect params from docs addresses (only on nightly, needs backport) rust-lang#116629 r? `@compiler-errors` cc `@GuillaumeGomez` `@fee1-dead`
- Loading branch information
Showing
10 changed files
with
84 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#![crate_name = "foo"] | ||
#![feature(effects, const_trait_impl)] | ||
|
||
#[const_trait] | ||
pub trait Tr { | ||
fn f(); | ||
} | ||
|
||
// @has foo/fn.g.html | ||
// @has - '//pre[@class="rust item-decl"]' 'pub const fn g<T: Tr>()' | ||
/// foo | ||
pub const fn g<T: ~const Tr>() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#![crate_name = "foo"] | ||
#![feature(effects)] | ||
|
||
// @has foo/fn.bar.html | ||
// @has - '//pre[@class="rust item-decl"]' 'pub const fn bar() -> ' | ||
/// foo | ||
pub const fn bar() -> usize { | ||
2 | ||
} | ||
|
||
// @has foo/struct.Foo.html | ||
// @has - '//*[@class="method"]' 'const fn new()' | ||
pub struct Foo(usize); | ||
|
||
impl Foo { | ||
pub const fn new() -> Foo { | ||
Foo(0) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#![feature(effects)] | ||
|
||
pub const fn load() -> i32 { | ||
0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Regression test for issue #116629. | ||
// Check that we render the correct generic params of const fn | ||
|
||
// aux-crate:const_fn=const-fn.rs | ||
// edition: 2021 | ||
#![crate_name = "user"] | ||
|
||
// @has user/fn.load.html | ||
// @has - '//pre[@class="rust item-decl"]' "pub const fn load() -> i32" | ||
pub use const_fn::load; |