Uh oh!
There was an error while loading. Please reload this page.
Cleanup rustc/driver - #55008
Conversation
rust-highfive
commented
Oct 12, 2018
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
ljedrz
commented
Oct 12, 2018
Hmm, I'm not sure if this is spurious or not; I'll verify shortly. |
estebank
left a comment
There was a problem hiding this comment.
LGTM, couple of nitpicks.
There was a problem hiding this comment.
I'm wondering wether the previous version was like that to avoid flushing on every line (I believe that is a behavior difference between write and writeln, although looking around https://llogiq.github.io/2017/06/01/perf-pitfalls.htmlhttps://www.reddit.com/r/rust/comments/6hoayo/how_do_i_write_to_stdout_without_line_buffering/ it seems like I might be wrong).
There was a problem hiding this comment.
Good point; this change is contained in a single commit, so in case of any issues it can be easily reverted. I can also pull it back if you prefer.
There was a problem hiding this comment.
unwrap_or_else(PathBuf::new);
There was a problem hiding this comment.
Or unwrap_or_default that I forgot existed ^^.
There was a problem hiding this comment.
I think this should work: .unwrap_or_else(input.filestem);
There was a problem hiding this comment.
That would be cool, but unfortunately the compiler recognizes this as E0615.
There was a problem hiding this comment.
That's annoying but can see how it happens. Thanks for checking.
There was a problem hiding this comment.
Given the indentation here, wouldn't the following be better?
let emitter = errors::emitter::EmitterWriter::stderr(
errors::ColorConfig::Auto,
None,
true,
false,
);
There was a problem hiding this comment.
When encountering these I usually change them to be
fn foo(
&self,
bar,
) -> A {
}
That way we won't have to worry about the function name changing length or adding/removing type args/lifetimes requiring reindenting of the arguments.
estebank
commented
Oct 12, 2018
|
9c69caa to
b03a82cCompareljedrz
commented
Oct 13, 2018
Error fixed, comments addressed. |
estebank
commented
Oct 14, 2018
@bors r+ |
bors
commented
Oct 14, 2018
📌 Commit b03a82c has been approved by |
bors
commented
Oct 15, 2018
Cleanup rustc/driver - improve/remove allocations - simplify `profile::trace::cons*` - don't sort `base` if it only has one element - use `Cow<str>` where applicable - use `unwrap_or_else` with function calls - remove an explicit `return`, add an explicit `None` - remove lifetimes from `const`s - improve common patterns - improve macro calls - whitespace & formatting fixes
bors
commented
Oct 15, 2018
☀️ Test successful - status-appveyor, status-travis |
profile::trace::cons*baseif it only has one elementCow<str>where applicableunwrap_or_elsewith function callsreturn, add an explicitNoneconsts