diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs
index 2e763dbd8fe..d5e5af7bbf8 100644
--- a/src/librustdoc/html/render/write_shared.rs
+++ b/src/librustdoc/html/render/write_shared.rs
@@ -240,7 +240,7 @@ pub(super) fn write_shared(
}
if (*cx.shared).layout.logo.is_empty() {
- write_toolchain("rust-logo.png", static_files::RUST_LOGO)?;
+ write_toolchain("rust-logo.svg", static_files::RUST_LOGO_SVG)?;
}
if (*cx.shared).layout.favicon.is_empty() {
write_toolchain("favicon.svg", static_files::RUST_FAVICON_SVG)?;
diff --git a/src/librustdoc/html/static/images/favicon-16x16.png b/src/librustdoc/html/static/images/favicon-16x16.png
index 7cfe6c13550..ea4b45cae16 100644
Binary files a/src/librustdoc/html/static/images/favicon-16x16.png and b/src/librustdoc/html/static/images/favicon-16x16.png differ
diff --git a/src/librustdoc/html/static/images/favicon-32x32.png b/src/librustdoc/html/static/images/favicon-32x32.png
index 5109c1de8be..69b8613ce15 100644
Binary files a/src/librustdoc/html/static/images/favicon-32x32.png and b/src/librustdoc/html/static/images/favicon-32x32.png differ
diff --git a/src/librustdoc/html/static/images/rust-logo.png b/src/librustdoc/html/static/images/rust-logo.png
deleted file mode 100644
index 74b4bd69504..00000000000
Binary files a/src/librustdoc/html/static/images/rust-logo.png and /dev/null differ
diff --git a/src/librustdoc/html/static/images/rust-logo.svg b/src/librustdoc/html/static/images/rust-logo.svg
new file mode 100644
index 00000000000..62424d8ffd7
--- /dev/null
+++ b/src/librustdoc/html/static/images/rust-logo.svg
@@ -0,0 +1,61 @@
+
diff --git a/src/librustdoc/html/static_files.rs b/src/librustdoc/html/static_files.rs
index 56c5399d074..cd369a93d82 100644
--- a/src/librustdoc/html/static_files.rs
+++ b/src/librustdoc/html/static_files.rs
@@ -67,8 +67,9 @@ crate static LICENSE_APACHE: &[u8] = include_bytes!("static/LICENSE-APACHE.txt")
/// The contents of `LICENSE-MIT.txt`, the text of the MIT License.
crate static LICENSE_MIT: &[u8] = include_bytes!("static/LICENSE-MIT.txt");
-/// The contents of `rust-logo.png`, the default icon of the documentation.
-crate static RUST_LOGO: &[u8] = include_bytes!("static/images/rust-logo.png");
+/// The contents of `rust-logo.svg`, the default icon of the documentation.
+crate static RUST_LOGO_SVG: &[u8] = include_bytes!("static/images/rust-logo.svg");
+
/// The default documentation favicons (SVG and PNG fallbacks)
crate static RUST_FAVICON_SVG: &[u8] = include_bytes!("static/images/favicon.svg");
crate static RUST_FAVICON_PNG_16: &[u8] = include_bytes!("static/images/favicon-16x16.png");
diff --git a/src/librustdoc/templates/page.html b/src/librustdoc/templates/page.html
index 673260ac6d0..02808754b53 100644
--- a/src/librustdoc/templates/page.html
+++ b/src/librustdoc/templates/page.html
@@ -79,7 +79,7 @@
{%- if !layout.logo.is_empty() %}
{#- -#}
{%- else -%}
- {#- -#}
+ {#- -#}
{%- endif -%}
{#- -#}
@@ -92,7 +92,7 @@
{%- if !layout.logo.is_empty() %}
{#- -#}
{%- else -%}
- {#- -#}
+ {#- -#}
{%- endif -%}
{#- -#}