forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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#76623 - slightlyoutofphase:master, r=jyn514
Use `is_unstable_const_fn` instead of `is_min_const_fn` in rustdoc where appropriate This closes rust-lang#76501. Specifically, it allows for nightly users with the `#![feature(const_fn)]` flag enabled to still have their `const fn` declarations documented as such, while retaining the desired behavior that rustdoc *not* document functions that have the `rustc_const_unstable` attribute as `const`.
- Loading branch information
Showing
3 changed files
with
28 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#![feature(const_fn)] | ||
|
||
// @has 'issue_76501/fn.bloop.html' '//pre' 'pub const fn bloop() -> i32' | ||
/// A useless function that always returns 1. | ||
pub const fn bloop() -> i32 { | ||
1 | ||
} | ||
|
||
/// A struct. | ||
pub struct Struct {} | ||
|
||
impl Struct { | ||
// @has 'issue_76501/struct.Struct.html' '//*[@class="method"]' 'pub const fn blurp() -> i32' | ||
/// A useless function that always returns 1. | ||
pub const fn blurp() -> i32 { | ||
1 | ||
} | ||
} |