diff options
| author | Noah Lev <camelidcamel@gmail.com> | 2024-05-26 12:28:47 -0700 |
|---|---|---|
| committer | Noah Lev <camelidcamel@gmail.com> | 2024-05-26 21:06:02 -0700 |
| commit | 699d28f968178e6b20084b2a71ba89b4de7562cf (patch) | |
| tree | 702821af9d4ef20044a25476fc1b4971d0e56f4e /tests/rustdoc/const-display.rs | |
| parent | fa7a3f9049c6d3f781516ca10c163efcf3e01326 (diff) | |
| download | rust-699d28f968178e6b20084b2a71ba89b4de7562cf.tar.gz rust-699d28f968178e6b20084b2a71ba89b4de7562cf.zip | |
rustdoc: Show "const" for const-unstable if also overall unstable
If a const function is unstable overall (and thus, in all circumstances I know of, also const-unstable), we should show the option to use it as const. You need to enable a feature to use the function at all anyway. If the function is stabilized without also being const-stabilized, then we do not show the const keyword and instead show "const: unstable" in the version info.
Diffstat (limited to 'tests/rustdoc/const-display.rs')
| -rw-r--r-- | tests/rustdoc/const-display.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/rustdoc/const-display.rs b/tests/rustdoc/const-display.rs index 35665f2aef9..959a00102b7 100644 --- a/tests/rustdoc/const-display.rs +++ b/tests/rustdoc/const-display.rs @@ -24,7 +24,7 @@ pub const unsafe fn foo_unsafe() -> u32 { 42 } #[unstable(feature = "humans", issue = "none")] pub const fn foo2() -> u32 { 42 } -// @has 'foo/fn.foo3.html' '//pre' 'pub fn foo3() -> u32' +// @has 'foo/fn.foo3.html' '//pre' 'pub const fn foo3() -> u32' // @!hasraw - '//span[@class="since"]' #[unstable(feature = "humans", issue = "none")] #[rustc_const_unstable(feature = "humans", issue = "none")] |
