Skip to content

Rollup of 7 pull requests #78178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Oct 21, 2020
Merged
Changes from 3 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
64839ee
Add Pin::new_static.
m-ou-se Oct 8, 2020
390883e
Make Pin::new_static const.
m-ou-se Oct 8, 2020
104c0f0
Rename Pin::new_static to Pin::static_ref.
m-ou-se Oct 12, 2020
2c71f68
Add Pin::static_mut.
m-ou-se Oct 12, 2020
f83446b
Reword safety guarantee of Pin::static_{ref,mut}.
m-ou-se Oct 13, 2020
df95dce
Add missing `mut`.
m-ou-se Oct 15, 2020
7b33ae6
Improve wording of "cannot multiply" type error
camelid Oct 18, 2020
003516f
BTreeMap: split off most code of remove and split_off
ssomers Oct 17, 2020
48060f1
rustdoc: Show the correct source filename, without `.html`
camelid Oct 19, 2020
cb33f95
remove what seems to be an outdated comment
RalfJung Oct 19, 2020
c1766c6
fix static_ptr_ty for foreign statics, and more comments in check_uns…
RalfJung Oct 19, 2020
153e843
fix Rvalue::ty for ThreadLocalRef
RalfJung Oct 19, 2020
9dd0bb6
Do not print braces again print_anon_const already does it
spastorino Oct 19, 2020
d641cb8
Allow NtBlock to parse on check inline const next token
spastorino Oct 19, 2020
dcd2d91
Add inline const macro test
spastorino Oct 19, 2020
ae0e3d0
Tweak "object unsafe" errors
estebank Oct 16, 2020
88f5e11
review comments
estebank Oct 20, 2020
243c8e9
Apply some review suggestions
camelid Oct 20, 2020
ff3c8cb
Rollup merge of #77726 - fusion-engineering-forks:static-pin, r=dtolnay
JohnTitor Oct 21, 2020
9583029
Rollup merge of #78002 - estebank:issue-77598, r=oli-obk
JohnTitor Oct 21, 2020
f8bae8b
Rollup merge of #78056 - ssomers:btree_chop_up_1, r=dtolnay
JohnTitor Oct 21, 2020
89c98cd
Rollup merge of #78063 - camelid:improve-cannot-multiply-error, r=est…
JohnTitor Oct 21, 2020
72ae00b
Rollup merge of #78094 - camelid:rustdoc-fix-source-title, r=jyn514
JohnTitor Oct 21, 2020
83f126b
Rollup merge of #78101 - RalfJung:foreign-static, r=oli-obk
JohnTitor Oct 21, 2020
de24210
Rollup merge of #78118 - spastorino:inline-const-followups, r=petroch…
JohnTitor Oct 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/librustdoc/html/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl<'a> SourceCollector<'a> {
};

// Remove the utf-8 BOM if any
if contents.starts_with("\u{feff}") {
if contents.starts_with('\u{feff}') {
contents.drain(..3);
}

Expand All @@ -99,16 +99,15 @@ impl<'a> SourceCollector<'a> {
href.push('/');
});
self.scx.ensure_dir(&cur)?;
let mut fname = p.file_name().expect("source has no filename").to_os_string();

let src_fname = p.file_name().expect("source has no filename").to_os_string();
let mut fname = src_fname.clone();
fname.push(".html");
cur.push(&fname);
href.push_str(&fname.to_string_lossy());

let title = format!(
"{} -- source",
cur.file_name().expect("failed to get file name").to_string_lossy()
);
let desc = format!("Source to the Rust file `{}`.", filename);
let title = format!("{} - source", src_fname.to_string_lossy());
let desc = format!("Source of the Rust file `{}`.", filename);
let page = layout::Page {
title: &title,
css_class: "source",
Expand Down