Skip to content
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

Rollup of 7 pull requests #48744

Closed
wants to merge 21 commits into from
Closed

Conversation

flip1995 and others added 21 commits March 1, 2018 01:34
This crate moves the compiler's error reporting to using the `termcolor` crate
from crates.io. Previously rustc used a super-old version of the `term` crate
in-tree which is basically unmaintained at this point, but Cargo has been using
`termcolor` for some time now and tools like `rg` are using `termcolor` as well,
so it seems like a good strategy to take!

Note that the `term` crate remains in-tree for libtest. Changing libtest will be
a bit tricky due to how the build works, but we can always tackle that later.

cc rust-lang#45728
move test issue-32950 to run-pass

cc rust-lang#38356
Suggest type for overflowing bin/hex-literals

Fixes rust-lang#48073

For hexadecimal and binary literals, which overflow, it gives an additional note to the warning message, like in this [comment](rust-lang#48073 (comment)).

Additionally it will suggest a type (`X < Y`):
- `iX`: if literal fits in `uX` => `uX`, else => `iY`
- `-iX` => `iY`
- `uX` => `uY`

Exceptions: `isize`, `usize`. I don't think you can make a good suggestion here. The programmer has to figure it out on it's own in this case.

r? @oli-obk
…henkov

Expand items before their derives

continuation of rust-lang#41029

At this point all I've done is naively rebased on top of `master` and fixed the code enough to compile. I'm not even sure if it works because my local build stopped here:

```
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(317,5): error MSB3491: Could not write lines to file "emscripten
-optimizer.dir\Release\emscript.63209ED8.tlog\emscripten-optimizer.lastbuildstate". The specified path, file name, or both are too long. The fully qualified file name must be less
than 260 characters, and the directory name must be less than 248 characters. [C:\Users\cyber\Rust\rust\build\x86_64-pc-windows-msvc\stage0-rustc\x86_64-pc-windows-msvc\release\bui
ld\rustc_binaryen-aaf5e3b308543526\out\build\src\emscripten-optimizer\emscripten-optimizer.vcxproj]
```

So I'm going to be relying on Travis to run tests unless I can fix this error.
rustc: Migrate to `termcolor` crate from `term`

This crate moves the compiler's error reporting to using the `termcolor` crate
from crates.io. Previously rustc used a super-old version of the `term` crate
in-tree which is basically unmaintained at this point, but Cargo has been using
`termcolor` for some time now and tools like `rg` are using `termcolor` as well,
so it seems like a good strategy to take!

Note that the `term` crate remains in-tree for libtest. Changing libtest will be
a bit tricky due to how the build works, but we can always tackle that later.

cc rust-lang#45728
Fixed rust-lang#48425 : Various functions taking a `TyCtxt` and a `Span` should be taking a `TyCtxtAt`

Hi @oli-obk
I have done some code refactoring to fix rust-lang#48425, Please let me know if anything else is required on this.
Optimize str::repeat

Improves the performance of `str::repeat` by bulk copying. Here is the benchmarks of `"abcde".repeat(n)`:

|`n`|old [ns/iter]|new [ns/iter]|diff [%]|
---|---|---|---
|1|27.205|27.421|+0.794|
|2|27.500|27.516|+0.0581|
|3|27.923|27.648|-0.985|
|4|31.206|30.145|-3.40|
|5|35.144|31.861|-9.34|
|7|43.131|34.621|-19.7|
|10|54.945|36.203|-34.1|
|100|428.31|52.895|-87.7|
…hton

Remove useless powerpc64 entry from ARCH_TABLE

Hope, I understood the scope of the fix correctly. closes rust-lang#47737
@rust-highfive
Copy link
Collaborator

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 5, 2018
@Manishearth
Copy link
Member Author

@bors r+ p=20

@bors
Copy link
Contributor

bors commented Mar 5, 2018

📌 Commit 895ab22 has been approved by Manishearth

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 5, 2018
@bors
Copy link
Contributor

bors commented Mar 5, 2018

⌛ Testing commit 895ab22 with merge f68f158f47e5dc5f16c466a12ff35803e25ce894...

@bors
Copy link
Contributor

bors commented Mar 5, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 5, 2018
@kennytm
Copy link
Member

kennytm commented Mar 5, 2018

@bors r-

x86_64-gnu-aux failed, caused by #48465 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 5, 2018
@Manishearth Manishearth closed this Mar 5, 2018
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.