-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc: Collect traits in scope for lang items
- Loading branch information
1 parent
f838a42
commit 0da7adc
Showing
5 changed files
with
55 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
29 changes: 29 additions & 0 deletions
29
src/test/rustdoc/intra-doc/auxiliary/extern-lang-item-impl-dep.rs
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,29 @@ | ||
// no-prefer-dynamic | ||
|
||
#![feature(lang_items)] | ||
|
||
#![crate_type = "rlib"] | ||
#![no_std] | ||
|
||
pub struct DerefsToF64(f64); | ||
|
||
impl core::ops::Deref for DerefsToF64 { | ||
type Target = f64; | ||
fn deref(&self) -> &Self::Target { | ||
&self.0 | ||
} | ||
} | ||
|
||
mod inner { | ||
#[lang = "f64_runtime"] | ||
impl f64 { | ||
/// [f64::clone] | ||
pub fn method() {} | ||
} | ||
} | ||
|
||
#[lang = "eh_personality"] | ||
fn foo() {} | ||
|
||
#[panic_handler] | ||
fn bar(_: &core::panic::PanicInfo) -> ! { loop {} } |
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,11 @@ | ||
// Reexport of a structure that derefs to a type with lang item impls having doc links in their | ||
// comments. The doc link points to an associated item, so we check that traits in scope for that | ||
// link are populated. | ||
|
||
// aux-build:extern-lang-item-impl-dep.rs | ||
|
||
#![no_std] | ||
|
||
extern crate extern_lang_item_impl_dep; | ||
|
||
pub use extern_lang_item_impl_dep::DerefsToF64; |