Skip to content

Rollup of 7 pull requests #64695

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 19 commits into from
Sep 23, 2019
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9bf5773
Fix `Stdio::piped` example code and lint
wchargin Sep 8, 2019
67d88f6
Remove constraints argument from path_all
Mark-Simulacrum Sep 21, 2019
2aa9d29
Remove unused code
Mark-Simulacrum Sep 21, 2019
e41aa8c
Inline ty_infer
Mark-Simulacrum Sep 21, 2019
8417ac6
Inline attribute constructors
Mark-Simulacrum Sep 21, 2019
3e6b844
Propagate `types.err` in locals further to avoid spurious knock-down …
estebank Sep 21, 2019
60560bc
Parse assoc type bounds in generic params and provide custom diagnostic
estebank Sep 22, 2019
c3d7917
remove outdated comment
tshepang Sep 22, 2019
daed674
review comments
estebank Sep 22, 2019
0f2f16d
review comments: wording
estebank Sep 22, 2019
3f2855e
Infer consts consistently. Moved some logic into super_combined_consts,
skinnyBat Sep 22, 2019
ad4787a
Clarify the "since" tidy check
Centril Sep 22, 2019
7894bc8
Rollup merge of #64294 - wchargin:wchargin-stdio-piped-docs, r=Dylan-DPC
Centril Sep 22, 2019
da58e11
Rollup merge of #64670 - Mark-Simulacrum:ext-build-simplify, r=petroc…
Centril Sep 22, 2019
b66e732
Rollup merge of #64674 - estebank:knock-down-the-wall, r=Centril
Centril Sep 22, 2019
cb449d2
Rollup merge of #64676 - estebank:assoc-type-bound-in-generic, r=petr…
Centril Sep 22, 2019
091b7c3
Rollup merge of #64677 - tshepang:outdated, r=Mark-Simulacrum
Centril Sep 22, 2019
78d715f
Rollup merge of #64679 - skinny121:const-infer, r=varkor
Centril Sep 22, 2019
55df97c
Rollup merge of #64688 - rust-lang:clarify-tidy-since, r=alexreg
Centril Sep 22, 2019
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
Next Next commit
Fix Stdio::piped example code and lint
Summary:
Invoking `rev` does not add a trailing newline when none is present in
the input (at least on my Debian). Nearby examples use `echo` rather
than `rev`, which probably explains the source of the discrepancy.

Also, a `mut` qualifier is unused.

Test Plan:
Copy the code block into <https://play.rust-lang.org> with a `fn main`
wrapper, and run it. Note that it compiles and runs cleanly; prior to
this commit, it would emit an `unused_mut` warning and then panic.

wchargin-branch: stdio-piped-docs
  • Loading branch information
wchargin committed Sep 8, 2019
commit 9bf577311473aa0accbf0d456cbd26b7530b200f
4 changes: 2 additions & 2 deletions src/libstd/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -935,12 +935,12 @@ impl Stdio {
/// .expect("Failed to spawn child process");
///
/// {
/// let mut stdin = child.stdin.as_mut().expect("Failed to open stdin");
/// let stdin = child.stdin.as_mut().expect("Failed to open stdin");
/// stdin.write_all("Hello, world!".as_bytes()).expect("Failed to write to stdin");
/// }
///
/// let output = child.wait_with_output().expect("Failed to read stdout");
/// assert_eq!(String::from_utf8_lossy(&output.stdout), "!dlrow ,olleH\n");
/// assert_eq!(String::from_utf8_lossy(&output.stdout), "!dlrow ,olleH");
/// ```
#[stable(feature = "process", since = "1.0.0")]
pub fn piped() -> Stdio { Stdio(imp::Stdio::MakePipe) }
Expand Down