Auto merge of #79686 - Dylan-DPC:rollup-leama5f, r=Dylan-DPC
Rollup of 11 pull requests Successful merges: - #77686 (Render Markdown in search results) - #79541 (Doc keyword lint pass) - #79602 (Fix SGX CI) - #79611 (Use more std:: instead of core:: in docs for consistency) - #79623 (Pass around Symbols instead of Idents in doctree) - #79627 (Update cargo) - #79631 (disable a ptr equality test on Miri) - #79638 (Use `item_name` instead of pretty printing for resolving `Self` on intra-doc links) - #79646 (rustc_metadata: Remove some dead code) - #79664 (move interpret::MemoryKind::Heap to const eval) - #79678 (Fix some clippy lints) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
e9dd18ca74
49 changed files with 430 additions and 180 deletions
|
|
@ -1,2 +1,2 @@
|
|||
/// Foo
|
||||
/// Docs for Foo
|
||||
pub struct Foo;
|
||||
|
|
|
|||
21
src/test/rustdoc-js/summaries.js
Normal file
21
src/test/rustdoc-js/summaries.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// ignore-tidy-linelength
|
||||
|
||||
const QUERY = ['summaries', 'summaries::Sidebar', 'summaries::Sidebar2'];
|
||||
|
||||
const EXPECTED = [
|
||||
{
|
||||
'others': [
|
||||
{ 'path': '', 'name': 'summaries', 'desc': 'This <em>summary</em> has a link and <code>code</code>.' },
|
||||
],
|
||||
},
|
||||
{
|
||||
'others': [
|
||||
{ 'path': 'summaries', 'name': 'Sidebar', 'desc': 'This <code>code</code> will be rendered in a code tag.' },
|
||||
],
|
||||
},
|
||||
{
|
||||
'others': [
|
||||
{ 'path': 'summaries', 'name': 'Sidebar2', 'desc': '' },
|
||||
],
|
||||
},
|
||||
];
|
||||
18
src/test/rustdoc-js/summaries.rs
Normal file
18
src/test/rustdoc-js/summaries.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#![crate_type = "lib"]
|
||||
#![crate_name = "summaries"]
|
||||
|
||||
//! This *summary* has a [link] and `code`.
|
||||
//!
|
||||
//! This is the second paragraph.
|
||||
//!
|
||||
//! [link]: https://example.com
|
||||
|
||||
/// This `code` will be rendered in a code tag.
|
||||
///
|
||||
/// This text should not be rendered.
|
||||
pub struct Sidebar;
|
||||
|
||||
/// ```text
|
||||
/// this block should not be rendered
|
||||
/// ```
|
||||
pub struct Sidebar2;
|
||||
13
src/test/rustdoc/intra-doc/raw-ident-self.rs
Normal file
13
src/test/rustdoc/intra-doc/raw-ident-self.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#![deny(broken_intra_doc_links)]
|
||||
pub mod r#impl {
|
||||
pub struct S;
|
||||
|
||||
impl S {
|
||||
/// See [Self::b].
|
||||
// @has raw_ident_self/impl/struct.S.html
|
||||
// @has - '//a[@href="../../raw_ident_self/impl/struct.S.html#method.b"]' 'Self::b'
|
||||
pub fn a() {}
|
||||
|
||||
pub fn b() {}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +1,22 @@
|
|||
#![crate_type = "lib"]
|
||||
#![crate_name = "summaries"]
|
||||
|
||||
//! This summary has a [link] and `code`.
|
||||
//! This *summary* has a [link] and `code`.
|
||||
//!
|
||||
//! This is the second paragraph.
|
||||
//!
|
||||
//! [link]: https://example.com
|
||||
|
||||
// @has search-index.js 'This summary has a link and `code`.'
|
||||
// @has search-index.js 'This <em>summary</em> has a link and <code>code</code>.'
|
||||
// @!has - 'second paragraph'
|
||||
|
||||
/// This `code` should be in backticks.
|
||||
/// This `code` will be rendered in a code tag.
|
||||
///
|
||||
/// This text should not be rendered.
|
||||
pub struct Sidebar;
|
||||
|
||||
// @has summaries/sidebar-items.js 'This `code` should be in backticks.'
|
||||
// @has search-index.js 'This <code>code</code> will be rendered in a code tag.'
|
||||
// @has summaries/sidebar-items.js 'This `code` will be rendered in a code tag.'
|
||||
// @!has - 'text should not be rendered'
|
||||
|
||||
/// ```text
|
||||
11
src/test/ui-fulldeps/internal-lints/existing_doc_keyword.rs
Normal file
11
src/test/ui-fulldeps/internal-lints/existing_doc_keyword.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// compile-flags: -Z unstable-options
|
||||
|
||||
#![feature(rustc_private)]
|
||||
#![feature(doc_keyword)]
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#![deny(rustc::existing_doc_keyword)]
|
||||
|
||||
#[doc(keyword = "tadam")] //~ ERROR
|
||||
mod tadam {}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
error: Found non-existing keyword `tadam` used in `#[doc(keyword = "...")]`
|
||||
--> $DIR/existing_doc_keyword.rs:10:1
|
||||
|
|
||||
LL | #[doc(keyword = "tadam")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/existing_doc_keyword.rs:8:9
|
||||
|
|
||||
LL | #![deny(rustc::existing_doc_keyword)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= help: only existing keywords are allowed in core/std
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue