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#97622 - JohnTitor:rollup-4qoxrjn, r=JohnTitor
Rollup of 9 pull requests Successful merges: - rust-lang#94647 (Expose `get_many_mut` and `get_many_unchecked_mut` to HashMap) - rust-lang#97216 (Ensure we never consider the null pointer dereferencable) - rust-lang#97399 (simplify code of finding arg index in `opt_const_param_of`) - rust-lang#97470 (rustdoc: add more test coverage) - rust-lang#97498 (Corrected EBNF grammar for from_str) - rust-lang#97562 (Fix comment in `poly_project_and_unify_type`) - rust-lang#97580 (Add regression test for rust-lang#71546) - rust-lang#97611 (Tweak insert docs) - rust-lang#97616 (Remove an unnecessary `Option`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
15 changed files
with
257 additions
and
59 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
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
18 changes: 18 additions & 0 deletions
18
src/test/rustdoc/inline_cross/auxiliary/implementors_inline.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,18 @@ | ||
pub mod my_trait { | ||
pub trait MyTrait { | ||
fn my_fn(&self) -> Self; | ||
} | ||
} | ||
|
||
pub mod prelude { | ||
#[doc(inline)] | ||
pub use crate::my_trait::MyTrait; | ||
} | ||
|
||
pub struct SomeStruct; | ||
|
||
impl my_trait::MyTrait for SomeStruct { | ||
fn my_fn(&self) -> SomeStruct { | ||
SomeStruct | ||
} | ||
} |
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,25 @@ | ||
// aux-build:implementors_inline.rs | ||
// build-aux-docs | ||
// ignore-cross-compile | ||
|
||
extern crate implementors_inline; | ||
|
||
// @!has implementors/implementors_js/trait.MyTrait.js | ||
// @has implementors/implementors_inline/my_trait/trait.MyTrait.js | ||
// @!has implementors/implementors_inline/prelude/trait.MyTrait.js | ||
// @has implementors_inline/my_trait/trait.MyTrait.html | ||
// @has - '//script/@src' '../../implementors/implementors_inline/my_trait/trait.MyTrait.js' | ||
// @has implementors_js/trait.MyTrait.html | ||
// @has - '//script/@src' '../implementors/implementors_inline/my_trait/trait.MyTrait.js' | ||
/// When re-exporting this trait, the HTML will be inlined, | ||
/// but, vitally, the JavaScript will be located only at the | ||
/// one canonical path. | ||
pub use implementors_inline::prelude::MyTrait; | ||
|
||
pub struct OtherStruct; | ||
|
||
impl MyTrait for OtherStruct { | ||
fn my_fn(&self) -> OtherStruct { | ||
OtherStruct | ||
} | ||
} |
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
#![allow(rustdoc::broken_intra_doc_links)] | ||
#![forbid(rustdoc::broken_intra_doc_links)] | ||
|
||
//! Email me at <hello@example.com>. | ||
//! Email me at <hello-world@example.com>. | ||
//! Email me at <hello@localhost> (this warns but will still become a link). | ||
//! Email me at <hello@localhost>. | ||
//! Email me at <prim@i32>. | ||
// @has email_address/index.html '//a[@href="mailto:hello@example.com"]' 'hello@example.com' | ||
// @has email_address/index.html '//a[@href="mailto:hello-world@example.com"]' 'hello-world@example.com' | ||
// @has email_address/index.html '//a[@href="mailto:hello@localhost"]' 'hello@localhost' | ||
// @has email_address/index.html '//a[@href="mailto:prim@i32"]' 'prim@i32' |
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 @@ | ||
// Regression test for #71546. | ||
|
||
// ignore-compare-mode-nll | ||
// NLL stderr is different from the original one. | ||
|
||
pub fn serialize_as_csv<V>(value: &V) -> Result<String, &str> | ||
where | ||
V: 'static, | ||
for<'a> &'a V: IntoIterator, | ||
for<'a> <&'a V as IntoIterator>::Item: ToString + 'static, | ||
{ | ||
let csv_str: String = value //~ ERROR: the associated type `<&'a V as IntoIterator>::Item` may not live long enough | ||
.into_iter() | ||
.map(|elem| elem.to_string()) | ||
.collect::<String>(); | ||
Ok(csv_str) | ||
} | ||
|
||
fn main() {} |
Oops, something went wrong.