Skip to content

Commit 88c58e3

Browse files
committed
Auto merge of #106156 - fee1-dead-contrib:rollup-3ir0951, r=fee1-dead
Rollup of 2 pull requests Successful merges: - #106151 (Remove unused imports) - #106153 (Fix missing renaming for #titles into #search-tabs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents caa64e5 + 786e0b5 commit 88c58e3

File tree

10 files changed

+86
-14
lines changed

10 files changed

+86
-14
lines changed

compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs

-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ use rustc_span::Span;
8181
use rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt;
8282
use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _;
8383
use rustc_trait_selection::traits::{self, translate_substs, wf, ObligationCtxt};
84-
use tracing::instrument;
8584

8685
pub(super) fn check_min_specialization(tcx: TyCtxt<'_>, impl_def_id: LocalDefId) {
8786
if let Some(node) = parent_specialization_node(tcx, impl_def_id) {

compiler/rustc_middle/src/mir/terminator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use smallvec::{smallvec, SmallVec};
1+
use smallvec::SmallVec;
22

33
use super::{BasicBlock, InlineAsmOperand, Operand, SourceInfo, TerminatorKind};
44
use rustc_ast::InlineAsmTemplatePiece;

compiler/rustc_middle/src/ty/walk.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use crate::ty::subst::{GenericArg, GenericArgKind};
55
use crate::ty::{self, Ty};
66
use rustc_data_structures::sso::SsoHashSet;
7-
use smallvec::{self, SmallVec};
7+
use smallvec::SmallVec;
88

99
// The TypeWalker's stack is hot enough that it's worth going to some effort to
1010
// avoid heap allocations.

compiler/rustc_parse/src/parser/diagnostics.rs

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ use rustc_span::{Span, SpanSnippetError, DUMMY_SP};
4141
use std::mem::take;
4242
use std::ops::{Deref, DerefMut};
4343
use thin_vec::{thin_vec, ThinVec};
44-
use tracing::{debug, trace};
4544

4645
/// Creates a placeholder argument.
4746
pub(super) fn dummy_arg(ident: Ident) -> Param {

compiler/rustc_parse/src/parser/item.rs

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use rustc_span::symbol::{kw, sym, Ident, Symbol};
2424
use rustc_span::DUMMY_SP;
2525
use std::mem;
2626
use thin_vec::ThinVec;
27-
use tracing::debug;
2827

2928
impl<'a> Parser<'a> {
3029
/// Parses a source module as a crate. This is the main entry point for the parser.

compiler/rustc_trait_selection/src/traits/util.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use rustc_errors::Diagnostic;
22
use rustc_span::Span;
3-
use smallvec::smallvec;
43
use smallvec::SmallVec;
54

65
use rustc_data_structures::fx::FxHashSet;

src/librustdoc/html/static/css/themes/ayu.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,18 @@ pre, .rustdoc.source .example-wrap {
162162
color: #788797;
163163
}
164164

165-
#titles > button.selected {
165+
#search-tabs > button.selected {
166166
background-color: #141920 !important;
167167
border-bottom: 1px solid #ffb44c !important;
168168
border-top: none;
169169
}
170170

171-
#titles > button:not(.selected) {
171+
#search-tabs > button:not(.selected) {
172172
background-color: transparent !important;
173173
border: none;
174174
}
175175

176-
#titles > button:hover {
176+
#search-tabs > button:hover {
177177
border-bottom: 1px solid rgba(242, 151, 24, 0.3);
178178
}
179179

@@ -185,7 +185,7 @@ above the `@media (max-width: 700px)` rules due to a bug in the css checker */
185185
/* see https://github.com/rust-lang/rust/pull/71237#issuecomment-618170143 */
186186
pre.rust .lifetime {}
187187
pre.rust .kw {}
188-
#titles > button:hover, #titles > button.selected {}
188+
#search-tabs > button:hover, #search-tabs > button.selected {}
189189
pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val, pre.rust .attribute {}
190190
pre.rust .kw-2, pre.rust .prelude-ty {}
191191

src/librustdoc/html/static/css/themes/dark.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@
8888
--scrape-example-toggle-line-hover-background: #c5c5c5;
8989
}
9090

91-
#titles > button:not(.selected) {
91+
#search-tabs > button:not(.selected) {
9292
background-color: #252525;
9393
border-top-color: #252525;
9494
}
9595

96-
#titles > button:hover, #titles > button.selected {
96+
#search-tabs > button:hover, #search-tabs > button.selected {
9797
border-top-color: #0089ff;
9898
background-color: #353535;
9999
}

src/librustdoc/html/static/css/themes/light.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@
8585
--scrape-example-toggle-line-hover-background: #999;
8686
}
8787

88-
#titles > button:not(.selected) {
88+
#search-tabs > button:not(.selected) {
8989
background-color: #e6e6e6;
9090
border-top-color: #e6e6e6;
9191
}
9292

93-
#titles > button:hover, #titles > button.selected {
93+
#search-tabs > button:hover, #search-tabs > button.selected {
9494
background-color: #ffffff;
9595
border-top-color: #0089ff;
9696
}

src/test/rustdoc-gui/search-tab.goml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// Checking the colors of the search tab headers.
2+
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html?search=something"
3+
show-text: true
4+
5+
define-function: (
6+
"check-colors",
7+
(theme, background, background_selected, background_hover, border_bottom,
8+
border_bottom_selected, border_bottom_hover, border_top, border_top_selected,
9+
border_top_hover),
10+
[
11+
// Setting the theme.
12+
("local-storage", {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}),
13+
("reload"),
14+
15+
// These two commands are used to be sure the search will be run.
16+
("focus", ".search-input"),
17+
("press-key", "Enter"),
18+
19+
("wait-for", "#search-tabs"),
20+
("assert-css", ("#search-tabs > button:not(.selected)", {
21+
"background-color": |background|,
22+
"border-bottom": |border_bottom|,
23+
"border-top": |border_top|,
24+
})),
25+
("assert-css", ("#search-tabs > button.selected", {
26+
"background-color": |background_selected|,
27+
"border-bottom": |border_bottom_selected|,
28+
"border-top": |border_top_selected|,
29+
})),
30+
("move-cursor-to", "#search-tabs > button:not(.selected)"),
31+
("assert-css", ("#search-tabs > button:not(.selected):hover", {
32+
"background-color": |background_hover|,
33+
"border-bottom": |border_bottom_hover|,
34+
"border-top": |border_top_hover|,
35+
})),
36+
// To prevent disrupting next run of this function.
37+
("move-cursor-to", ".search-input"),
38+
],
39+
)
40+
41+
call-function: ("check-colors", {
42+
"theme": "ayu",
43+
"background": "rgba(0, 0, 0, 0)",
44+
"background_selected": "rgb(20, 25, 32)",
45+
"background_hover": "rgba(0, 0, 0, 0)",
46+
"border_bottom": "0px none rgb(197, 197, 197)",
47+
"border_bottom_selected": "1px solid rgb(255, 180, 76)",
48+
"border_bottom_hover": "1px solid rgba(242, 151, 24, 0.3)",
49+
"border_top": "0px none rgb(197, 197, 197)",
50+
"border_top_selected": "0px none rgb(197, 197, 197)",
51+
"border_top_hover": "0px none rgb(197, 197, 197)",
52+
})
53+
call-function: ("check-colors", {
54+
"theme": "dark",
55+
"background": "rgb(37, 37, 37)",
56+
"background_selected": "rgb(53, 53, 53)",
57+
"background_hover": "rgb(53, 53, 53)",
58+
"border_bottom": "0px none rgb(221, 221, 221)",
59+
"border_bottom_selected": "0px none rgb(221, 221, 221)",
60+
"border_bottom_hover": "0px none rgb(221, 221, 221)",
61+
"border_top": "2px solid rgb(37, 37, 37)",
62+
"border_top_selected": "2px solid rgb(0, 137, 255)",
63+
"border_top_hover": "2px solid rgb(0, 137, 255)",
64+
})
65+
call-function: ("check-colors", {
66+
"theme": "light",
67+
"background": "rgb(230, 230, 230)",
68+
"background_selected": "rgb(255, 255, 255)",
69+
"background_hover": "rgb(255, 255, 255)",
70+
"border_bottom": "0px none rgb(0, 0, 0)",
71+
"border_bottom_selected": "0px none rgb(0, 0, 0)",
72+
"border_bottom_hover": "0px none rgb(0, 0, 0)",
73+
"border_top": "2px solid rgb(230, 230, 230)",
74+
"border_top_selected": "2px solid rgb(0, 137, 255)",
75+
"border_top_hover": "2px solid rgb(0, 137, 255)",
76+
})

0 commit comments

Comments
 (0)