Mention Vec::into_boxed_slice in documentation of [T]::into_vec
This is a documentation fix.
`Vec::into_boxed_slice` and `[T]::into_vec` are inverses, so it makes sense to mention the other in their respective documentation for visibility. `Vec::into_boxed_slice` already mentions `[T]::into_vec`, but not the other way around until now.
Tagging @steveklabnik per his request.
make ui test output patch compatible #41948
Hello!
Previously with #41474 I've changed the internals of UI test output comparison mechanism.
That change didn't change the diff format that we were producing but we needed to improve it anyway.
This makes unified diff lines a little bit more `patch` compatible.
Also I tried to introduce a unit test to check this but couldn't decide which of the following to implement:
1. Should I replace `println` macros with `Writer`s? And access the produced output within a test?
2. Should I add an external test (something like `src/test/run-pass/command-exec.rs`)
3. There are crates that capture `stdout`. Are they safe to use here? (I don't think so)
Thanks!
cc @nikomatsakis
Add better error message when == operator is badly used
Part of #40660.
With the following code:
```rust
fn foo<T: PartialEq>(a: &T, b: T) {
a == b;
}
fn main() {
foo(&1, 1);
}
```
It prints:
```
error[E0277]: the trait bound `&T: std::cmp::PartialEq<T>` is not satisfied
--> test.rs:2:5
|
2 | a == b;
| ^^^^^^ can't compare `&T` with `T`
|
= help: the trait `std::cmp::PartialEq<T>` is not implemented for `&T`
= help: consider adding a `where &T: std::cmp::PartialEq<T>` bound
error: aborting due to previous error
```
`Vec::into_boxed_slice` and `[T]::into_vec` are inverses, so it makes sense
to mention the other in their respective documentation for visibility.
`Vec::into_boxed_slice` already mentions `[T]::into_vec`, but not the other
way around until now.
bootstrap: fix minor comment typos in lib.rs
I noticed these while reading through the build system
documentation. They're hardly worth fixing, but I'm also using this to
get my feet wet with the rustc contribution system.
I noticed these while reading through the build system
documentation. They're hardly worth fixing, but I'm also using this to
get my feet wet with the rustc contribution system.
Update rust-installer to normalize manifest paths
This fixes the backslash-paths found in the manifests of installers that are built on Windows. This is the most problematic part of #42121, leaving just the non-executable install.sh.
r? @alexcrichton
Improving std::env docs
Addresses #29351.
Hopefully this addresses the following points:
> - iterators should use the standard iterator boilerplate like https://doc.rust-lang.org/std/iter/struct.Map.html, this applies to all structs except for JoinPathsError
> - JoinPathsError should properly link the function it comes from and use language similar to https://doc.rust-lang.org/std/io/struct.Error.html
> - same wording issues with VarError
> - functions need to ensure linkage to things they refer to in their descriptions
> - Explain the difference between `os` and non-`os` structs and methods
expose needs_drop under mem
Note that I purposefully didn't update the intrinsic's documentation, because I think it makes sense for it be more... "honest" about its semantics.
Add an option to run rustbuild on low priority on Windows and Unix
This is a resurrection of #40776, combining their Windows setup with an additional setup on Unix to set the program group's *nice*ness to +10 (low-but-not-lowest priority, mirroring the priority in the Windows setup) when the `low_priority` option is on.
Revert "Reenable opt-level 3"
This reverts commit 30383b2384, from #41967.
We believe that this is causing the failures when compiling rustc on 64 bit (which are probably segfaults).
cc @ishitatsuyuki
Correct some stability versions
These were found by running tidy on stable versions of rust and finding
features stabilised with the wrong version numbers.
Fix: "warning: redundant linker flag specified for library `ole32`"
llvm-config seems to output this library name correctly now, removing
the need for the hack in "librustc_llvm/build.rs".
Reenable opt-level 3
This comment is quite old, let's see what would happen with current MSVC.
Since there's no AppVeyor test for PR, the best way is to try if it get through homu. I don't recommend doing this in roll-up.