Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 928d14b

Browse files
committedNov 13, 2022
Auto merge of rust-lang#104351 - JohnTitor:rollup-ikh2dzr, r=JohnTitor
Rollup of 5 pull requests Successful merges: - rust-lang#103650 (rustdoc: change `.src-line-numbers > span` to `.src-line-numbers > a`) - rust-lang#104177 (rustdoc: use consistent "popover" styling for notable traits) - rust-lang#104318 (Move tests) - rust-lang#104323 (rustdoc: remove no-op CSS `.scrape-help { background: transparent }`) - rust-lang#104345 (Fix up a Fluent message) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 3be81dd + 05cd26b commit 928d14b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+239
-179
lines changed
 

‎compiler/rustc_error_messages/locales/en-US/infer.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ infer_data_lifetime_flow = ...but data with one lifetime flows into the other he
126126
infer_declared_multiple = this type is declared with multiple lifetimes...
127127
infer_types_declared_different = these two types are declared with different lifetimes...
128128
infer_data_flows = ...but data{$label_var1_exists ->
129-
[true] -> {" "}from `{$label_var1}`
129+
[true] {" "}from `{$label_var1}`
130130
*[false] -> {""}
131131
} flows{$label_var2_exists ->
132-
[true] -> {" "}into `{$label_var2}`
132+
[true] {" "}into `{$label_var2}`
133133
*[false] -> {""}
134134
} here
135135

‎src/librustdoc/html/render/mod.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,9 +1312,7 @@ pub(crate) fn notable_traits_button(ty: &clean::Type, cx: &mut Context<'_>) -> O
13121312
if has_notable_trait {
13131313
cx.types_with_notable_traits.insert(ty.clone());
13141314
Some(format!(
1315-
"<span class=\"notable-traits\" data-ty=\"{ty}\">\
1316-
<span class=\"notable-traits-tooltip\">ⓘ</span>\
1317-
</span>",
1315+
" <a href=\"#\" class=\"notable-traits\" data-ty=\"{ty}\">ⓘ</a>",
13181316
ty = Escape(&format!("{:#}", ty.print(cx))),
13191317
))
13201318
} else {
@@ -1343,7 +1341,7 @@ fn notable_traits_decl(ty: &clean::Type, cx: &Context<'_>) -> (String, String) {
13431341
if out.is_empty() {
13441342
write!(
13451343
&mut out,
1346-
"<h3 class=\"notable\">Notable traits for <code>{}</code></h3>\
1344+
"<h3>Notable traits for <code>{}</code></h3>\
13471345
<pre class=\"content\"><code>",
13481346
impl_.for_.print(cx)
13491347
);
@@ -2939,9 +2937,6 @@ fn render_call_locations(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Ite
29392937
})()
29402938
.unwrap_or(rustc_span::DUMMY_SP);
29412939

2942-
// The root path is the inverse of Context::current
2943-
let root_path = vec!["../"; cx.current.len() - 1].join("");
2944-
29452940
let mut decoration_info = FxHashMap::default();
29462941
decoration_info.insert("highlight focus", vec![byte_ranges.remove(0)]);
29472942
decoration_info.insert("highlight", byte_ranges);
@@ -2951,7 +2946,7 @@ fn render_call_locations(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Ite
29512946
contents_subset,
29522947
file_span,
29532948
cx,
2954-
&root_path,
2949+
&cx.root_path(),
29552950
highlight::DecorationInfo(decoration_info),
29562951
sources::SourceContext::Embedded { offset: line_min, needs_expansion },
29572952
);

0 commit comments

Comments
 (0)
Please sign in to comment.