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#103804 - Mark-Simulacrum:stable-next, r=Mark-…
…Simulacrum [stable] 1.67.0 release Last minute backports: * rustdoc: add support for incoherent impls on structs and traits rust-lang#103746 r? `@ghost`
- Loading branch information
Showing
4 changed files
with
51 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
beta | ||
stable |
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,7 @@ | ||
#![feature(rustc_attrs)] | ||
|
||
#[rustc_has_incoherent_inherent_impls] | ||
pub trait FooTrait {} | ||
|
||
#[rustc_has_incoherent_inherent_impls] | ||
pub struct FooStruct; |
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,28 @@ | ||
// aux-build:incoherent-impl-types.rs | ||
// build-aux-docs | ||
|
||
#![crate_name = "foo"] | ||
#![feature(rustc_attrs)] | ||
|
||
extern crate incoherent_impl_types; | ||
|
||
// The only way this actually shows up is if the type gets inlined. | ||
#[doc(inline)] | ||
pub use incoherent_impl_types::FooTrait; | ||
|
||
// @has foo/trait.FooTrait.html | ||
// @count - '//section[@id="method.do_something"]' 1 | ||
impl dyn FooTrait { | ||
#[rustc_allow_incoherent_impl] | ||
pub fn do_something() {} | ||
} | ||
|
||
#[doc(inline)] | ||
pub use incoherent_impl_types::FooStruct; | ||
|
||
// @has foo/struct.FooStruct.html | ||
// @count - '//section[@id="method.do_something"]' 1 | ||
impl FooStruct { | ||
#[rustc_allow_incoherent_impl] | ||
pub fn do_something() {} | ||
} |