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#118579 - matthiaskrgr:rollup-22kn8sa, r=matth…
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#117869 ([rustdoc] Add highlighting for comments in items declaration) - rust-lang#118525 (coverage: Skip spans that can't be un-expanded back to the function body) - rust-lang#118574 (rustc_session: Address all `rustc::potential_query_instability` lints) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
21 changed files
with
174 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,5 +50,5 @@ | |
LL| |#[inline(always)] | ||
LL| 0|fn error() { | ||
LL| 0| panic!("error"); | ||
LL| 0|} | ||
LL| |} | ||
|
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,24 +1,24 @@ | ||
Function name: unreachable::UNREACHABLE_CLOSURE::{closure#0} | ||
Raw bytes (9): 0x[01, 01, 00, 01, 01, 0f, 27, 00, 49] | ||
Raw bytes (9): 0x[01, 01, 00, 01, 01, 0f, 27, 00, 47] | ||
Number of files: 1 | ||
- file 0 => global file 1 | ||
Number of expressions: 0 | ||
Number of file 0 mappings: 1 | ||
- Code(Counter(0)) at (prev + 15, 39) to (start + 0, 73) | ||
- Code(Counter(0)) at (prev + 15, 39) to (start + 0, 71) | ||
|
||
Function name: unreachable::unreachable_function | ||
Raw bytes (9): 0x[01, 01, 00, 01, 01, 11, 01, 02, 02] | ||
Raw bytes (9): 0x[01, 01, 00, 01, 01, 11, 01, 01, 25] | ||
Number of files: 1 | ||
- file 0 => global file 1 | ||
Number of expressions: 0 | ||
Number of file 0 mappings: 1 | ||
- Code(Counter(0)) at (prev + 17, 1) to (start + 2, 2) | ||
- Code(Counter(0)) at (prev + 17, 1) to (start + 1, 37) | ||
|
||
Function name: unreachable::unreachable_intrinsic | ||
Raw bytes (9): 0x[01, 01, 00, 01, 01, 16, 01, 02, 02] | ||
Raw bytes (9): 0x[01, 01, 00, 01, 01, 16, 01, 01, 2c] | ||
Number of files: 1 | ||
- file 0 => global file 1 | ||
Number of expressions: 0 | ||
Number of file 0 mappings: 1 | ||
- Code(Counter(0)) at (prev + 22, 1) to (start + 2, 2) | ||
- Code(Counter(0)) at (prev + 22, 1) to (start + 1, 44) | ||
|
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,73 @@ | ||
// This test checks that comments in item declarations are highlighted. | ||
go-to: "file://" + |DOC_PATH| + "/test_docs/private/enum.Enum.html" | ||
show-text: true | ||
|
||
define-function: ( | ||
"check-item-decl-comment", | ||
(theme, url, comment_color), | ||
block { | ||
go-to: |url| | ||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"} | ||
reload: | ||
assert-css: (".item-decl .comment", {"color": |comment_color|}, ALL) | ||
} | ||
) | ||
|
||
define-function: ( | ||
"check-items-for-theme", | ||
(theme, comment_color), | ||
block { | ||
call-function: ("check-item-decl-comment", { | ||
"theme": |theme|, | ||
"url": "file://" + |DOC_PATH| + "/test_docs/private/enum.Enum.html", | ||
"comment_color": |comment_color|, | ||
}) | ||
call-function: ("check-item-decl-comment", { | ||
"theme": |theme|, | ||
"url": "file://" + |DOC_PATH| + "/test_docs/private/struct.Struct.html", | ||
"comment_color": |comment_color|, | ||
}) | ||
call-function: ("check-item-decl-comment", { | ||
"theme": |theme|, | ||
"url": "file://" + |DOC_PATH| + "/test_docs/private/struct.Tuple.html", | ||
"comment_color": |comment_color|, | ||
}) | ||
call-function: ("check-item-decl-comment", { | ||
"theme": |theme|, | ||
"url": "file://" + |DOC_PATH| + "/test_docs/private/union.Union.html", | ||
"comment_color": |comment_color|, | ||
}) | ||
call-function: ("check-item-decl-comment", { | ||
"theme": |theme|, | ||
"url": "file://" + |DOC_PATH| + "/proc_macro_test/macro.make_answer.html", | ||
"comment_color": |comment_color|, | ||
}) | ||
call-function: ("check-item-decl-comment", { | ||
"theme": |theme|, | ||
"url": "file://" + |DOC_PATH| + "/proc_macro_test/derive.HelperAttr.html", | ||
"comment_color": |comment_color|, | ||
}) | ||
} | ||
) | ||
|
||
call-function: ( | ||
"check-items-for-theme", | ||
{ | ||
"theme": "ayu", | ||
"comment_color": "#788797", | ||
} | ||
) | ||
call-function: ( | ||
"check-items-for-theme", | ||
{ | ||
"theme": "dark", | ||
"comment_color": "#8d8d8b", | ||
} | ||
) | ||
call-function: ( | ||
"check-items-for-theme", | ||
{ | ||
"theme": "light", | ||
"comment_color": "#8e908c", | ||
} | ||
) |
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 @@ | ||
# This file is automatically @generated by Cargo. | ||
# It is not intended for manual editing. | ||
version = 3 | ||
|
||
[[package]] | ||
name = "proc_macro_test" | ||
version = "0.1.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,8 @@ | ||
[package] | ||
name = "proc_macro_test" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[lib] | ||
path = "lib.rs" | ||
proc-macro = true |
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 @@ | ||
use proc_macro::TokenStream; | ||
|
||
#[proc_macro] | ||
pub fn make_answer(_item: TokenStream) -> TokenStream { | ||
"fn answer() -> u32 { 42 }".parse().unwrap() | ||
} | ||
|
||
#[proc_macro_derive(HelperAttr, attributes(helper))] | ||
pub fn derive_helper_attr(_item: TokenStream) -> TokenStream { | ||
TokenStream::new() | ||
} |
Oops, something went wrong.