-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #105196 - JohnTitor:rollup-8rxqnq6, r=JohnTitor
Rollup of 7 pull requests Successful merges: - #104903 (Use ocx.normalize in report_projection_error) - #105032 (improve doc of into_boxed_slice and impl From<Vec<T>> for Box<[T]>) - #105100 (Add missing intra-doc link) - #105181 (Don't add a note for implementing a trait if its inner type is erroneous) - #105182 (Rustdoc-Json: Don't inline foreign traits) - #105188 (Don't elide type information when printing E0308 with `-Zverbose`) - #105189 (rustdoc: clean up redundant CSS on `.rustdoc-toggle.hideme`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
19 changed files
with
259 additions
and
111 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
8 changes: 8 additions & 0 deletions
8
src/test/rustdoc-json/intra-doc-links/auxiliary/enum_variant_in_trait_method.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,8 @@ | ||
pub trait Trait { | ||
/// [`Enum::Variant`] | ||
fn method() {} | ||
} | ||
|
||
pub enum Enum { | ||
Variant, | ||
} |
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,13 @@ | ||
// Regression test for <https://github.com/rust-lang/rust/issues/105025> | ||
// aux-build: enum_variant_in_trait_method.rs | ||
|
||
extern crate enum_variant_in_trait_method; | ||
|
||
pub struct Local; | ||
|
||
/// local impl | ||
impl enum_variant_in_trait_method::Trait for Local {} | ||
|
||
// @!has "$.index[*][?(@.name == 'Trait')]" | ||
// @!has "$.index[*][?(@.name == 'method')]" | ||
// @count "$.index[*][?(@.docs == 'local impl')].inner.items[*]" 0 |
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,2 @@ | ||
/// The Docs | ||
pub trait HasDocs {} |
10 changes: 10 additions & 0 deletions
10
src/test/rustdoc-json/reexport/synthesize_trait_with_docs.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,10 @@ | ||
// Regression test for <https://github.com/rust-lang/rust/issues/105022> | ||
// aux-build: trait_with_docs.rs | ||
|
||
extern crate trait_with_docs; | ||
|
||
pub struct Local; | ||
|
||
impl trait_with_docs::HasDocs for Local {} | ||
|
||
// @!has "$.index[*][?(@.name == 'HasDocs')]" |
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,12 +1,5 @@ | ||
#![no_std] | ||
pub fn drop_default<T: core::default::Default>(_x: T) {} | ||
|
||
// FIXME(adotinthevoid): Theses shouldn't be here | ||
// @has "$.index[*][?(@.name=='Debug')]" | ||
|
||
// Debug may have several items. All we depend on here the that `fmt` is first. See | ||
// https://github.com/rust-lang/rust/pull/104525#issuecomment-1331087852 for why we | ||
// can't use [*]. | ||
|
||
// @set Debug_fmt = "$.index[*][?(@.name=='Debug')].inner.items[0]" | ||
// @has "$.index[*][?(@.name=='fmt')].id" $Debug_fmt | ||
// @!has "$.index[*][?(@.name=='Debug')]" | ||
// @!has "$.index[*][?(@.name=='Default')]" |
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,15 @@ | ||
// compile-flags: -Zverbose | ||
|
||
fn foo(_: i32, _: i32) {} | ||
|
||
fn needs_ptr(_: fn(i32, u32)) {} | ||
//~^ NOTE function defined here | ||
//~| NOTE | ||
|
||
fn main() { | ||
needs_ptr(foo); | ||
//~^ ERROR mismatched types | ||
//~| NOTE expected `u32`, found `i32` | ||
//~| NOTE expected fn pointer `fn(i32, u32)` | ||
//~| NOTE arguments to this function are incorrect | ||
} |
Oops, something went wrong.