Nathan
b9ba8f9596
Compare run-pass outputs if check-run-results
flag enabled
...
Addresses #63751
2019-08-22 19:15:43 -04:00
Nathan
0c379dff29
Extract loading and comparison of compiletest outputs to new fn
...
Moved into ```fn load_compare_outputs(&self, proc_res: &ProcRes, explicit_format: bool) -> usize```
2019-08-22 19:06:23 -04:00
nathanwhit
54f80a5b7c
Add header flag to check run-pass test output
2019-08-22 18:53:50 -04:00
Vadim Petrochenkov
6548a5fa5d
Remove default macro transparencies
...
All transparancies are passed explicitly now.
Also remove `#[rustc_macro_transparency]` annotations from built-in macros, they are no longer used.
`#[rustc_macro_transparency]` only makes sense for declarative macros now.
2019-08-23 01:53:20 +03:00
Oliver Scherer
181ed55e96
Simplify eager normalization of constants
2019-08-23 00:48:52 +02:00
Vadim Petrochenkov
cf9db76454
hygiene: Require passing transparency explicitly to apply_mark
2019-08-23 01:44:33 +03:00
Vadim Petrochenkov
b0c4d0f8cb
incremental: Do not rely on default transparency when decoding syntax contexts
...
Using `ExpnId`s default transparency here instead of the mark's real transparency was actually incorrect.
2019-08-23 01:44:33 +03:00
Vadim Petrochenkov
bf345dd6e3
resolve: Do not rely on default transparency when detecting proc macro derives
2019-08-23 01:44:33 +03:00
Vadim Petrochenkov
0fb01d219c
Audit uses of apply_mark
in built-in macros
...
Replace them with equivalents of `Span::{def_site,call_site}` from proc macro API.
The new API is much less error prone and doesn't rely on macros having default transparency.
2019-08-23 01:44:33 +03:00
Naja Melan
98bd60c281
Update single-use-lifetimes
...
When using this, rustc emits a warning that the lint has been renamed (to having an 's' at the end)
2019-08-22 22:39:21 +00:00
bors
ee7161db98
Auto merge of #63522 - topecongiro:rustfmt-1.4.5, r=Centril
...
Update rustfmt to 1.4.5
This update includes a bug fix that fixes generating invalid code when formatting an impl block with const generics inside a where clause.
**Changes**
0462008de8...1de58ce46d
2019-08-22 21:51:14 +00:00
Esteban Küber
1acb53753b
Do not suggest .try_into()
on i32::from(x)
2019-08-22 13:37:35 -07:00
Sebastian Martinez
03507a1688
Update occurences of as_slice
...
Update occurences of as_slice to as_str
2019-08-22 16:16:22 -03:00
bors
760226733e
Auto merge of #63807 - Centril:rollup-b8lo8ct, r=Centril
...
Rollup of 7 pull requests
Successful merges:
- #63624 (When declaring a declarative macro in an item it's only accessible inside it)
- #63737 (Fix naming misspelling)
- #63767 (Use more optimal Ord implementation for integers)
- #63782 (Fix confusion in theme picker functions)
- #63788 (Add amanjeev to rustc-guide toolstate)
- #63796 (Tweak E0308 on opaque types)
- #63805 (Apply few Clippy suggestions)
Failed merges:
r? @ghost
2019-08-22 18:06:31 +00:00
Tomasz Różański
d9f3258186
Fix for 7e13679
.
2019-08-22 19:27:16 +02:00
Esteban Küber
2d438d6993
Correctly suggest adding bounds to impl Trait
argument
2019-08-22 10:15:57 -07:00
Jeremy Stucki
2f790ee5d2
Update .mailmap
2019-08-22 16:47:42 +02:00
Mazdak Farrokhzad
3068064430
Rollup merge of #63805 - mati865:clippy, r=Centril
...
Apply few Clippy suggestions
Somewhat follow-up of https://github.com/rust-lang/rust/pull/62806
Changes per commit are rather small so I can squash them if that's preferred.
2019-08-22 15:15:45 +02:00
Mazdak Farrokhzad
aa9490bd7b
Rollup merge of #63796 - estebank:opaque_future, r=Centril
...
Tweak E0308 on opaque types
```
error[E0308]: if and else have incompatible types
--> file.rs:21:9
|
18 | / if true {
19 | | thing_one()
| | ----------- expected because of this
20 | | } else {
21 | | thing_two()
| | ^^^^^^^^^^^ expected opaque type, found a different opaque type
22 | | }.await
| |_____- if and else have incompatible types
|
= note: expected type `impl std::future::Future` (opaque type)
found type `impl std::future::Future` (opaque type)
= note: distinct uses of `impl Trait` result in different opaque types
= help: if both futures resolve to the same type, consider `await`ing on both of them
```
r? @Centril
CC #63167
2019-08-22 15:15:43 +02:00
Mazdak Farrokhzad
6c1cdb75ab
Rollup merge of #63788 - mark-i-m:rustc-guide-toolstate-add, r=ehuss
...
Add amanjeev to rustc-guide toolstate
cc @amanjeev @spastorino
r? @ehuss
2019-08-22 15:15:42 +02:00
Mazdak Farrokhzad
1f56441a00
Rollup merge of #63782 - GuillaumeGomez:theme-switch-fix, r=kinnison
...
Fix confusion in theme picker functions
To reproduce the bug currently: click on the theme picker button twice (to show it then hide it). Then click anywhere else: the dropdown menu appears again.
The problem was coming from a confusion of what the `hideThemeButtonState` and `showThemeButtonState` were supposed to do. I switched their codes and updated the `switchThemeButtonState` function. It now works as expected.
r? @kinnison
2019-08-22 15:15:40 +02:00
Mazdak Farrokhzad
30fd79cb6c
Rollup merge of #63767 - lzutao:integer-ord-suboptimal, r=nagisa
...
Use more optimal Ord implementation for integers
Closes #63758
r? @nagisa
### Compare results
([godbolt link](https://godbolt.org/z/dsbczy ))
Old assembly:
```asm
example::cmp1:
mov eax, dword ptr [rdi]
mov ecx, dword ptr [rsi]
cmp eax, ecx
setae dl
add dl, dl
add dl, -1
xor esi, esi
cmp eax, ecx
movzx eax, dl
cmove eax, esi
ret
```
New assembly:
```asm
example::cmp2:
mov eax, dword ptr [rdi]
xor ecx, ecx
cmp eax, dword ptr [rsi]
seta cl
mov eax, 255
cmovae eax, ecx
ret
```
Old llvm-mca statistics:
```
Iterations: 100
Instructions: 1100
Total Cycles: 243
Total uOps: 1300
Dispatch Width: 6
uOps Per Cycle: 5.35
IPC: 4.53
Block RThroughput: 2.2
```
New llvm-mca statistics:
```
Iterations: 100
Instructions: 700
Total Cycles: 217
Total uOps: 1100
Dispatch Width: 6
uOps Per Cycle: 5.07
IPC: 3.23
Block RThroughput: 1.8
```
2019-08-22 15:15:38 +02:00
Mazdak Farrokhzad
0784395912
Rollup merge of #63737 - HowJMay:fix_naming, r=jonas-schievink
...
Fix naming misspelling
Fixes #63734
2019-08-22 15:15:36 +02:00
Mazdak Farrokhzad
8a26ba77ef
Rollup merge of #63624 - estebank:unreachable-macro, r=petrochenkov
...
When declaring a declarative macro in an item it's only accessible inside it
Fix #63164 .
r? @petrochenkov
2019-08-22 15:15:35 +02:00
Tomasz Różański
eae5d77995
Change variables names to be more consistent.
...
Changed all instances of `c_str` into `cstr` in the documentation examples. This is also consistent with the module source code.
2019-08-22 15:09:03 +02:00
Tomasz Różański
cdedd268d2
Make use of existing constants.
...
f32::consts::PI / 2.0 -> f32::consts::FRAC_PI_2
f32::consts::PI / 4.0 -> f32::consts::FRAC_PI_4
f64::consts::PI / 2.0 -> f64::consts::FRAC_PI_2
f64::consts::PI / 4.0 -> f64::consts::FRAC_PI_4
2019-08-22 14:59:31 +02:00
Tomasz Różański
3b04e91d27
Change code formatting for readability.
2019-08-22 14:27:51 +02:00
Tomasz Różański
49dce2935f
Fix punctuation.
2019-08-22 13:14:42 +02:00
Tomasz Różański
7e13679cde
Remove redundant mut
.
2019-08-22 13:12:31 +02:00
Tomasz Różański
4ee6ee0daa
Fix formatting.
2019-08-22 13:06:39 +02:00
Tomasz Różański
a078a34f05
Fix a typo.
2019-08-22 13:04:32 +02:00
Wesley Wiser
5c45420bda
Changed tests
2019-08-22 06:36:31 -04:00
Wesley Wiser
84556502e6
Handle statics in Subst::subst()
by implementing TypeFoldable
2019-08-22 06:36:31 -04:00
Wesley Wiser
e63b992030
Resolve PR comments
2019-08-22 06:36:31 -04:00
Wesley Wiser
9fdf5b5551
Remove unnecessary Option
2019-08-22 06:36:31 -04:00
Wesley Wiser
34fe28bc67
Fix tidy
2019-08-22 06:36:31 -04:00
Wesley Wiser
4d62545687
Move def_id out add substsref
2019-08-22 06:36:30 -04:00
Wesley Wiser
f13faf58d9
Remove eval_promoted const-prop hack
2019-08-22 06:36:30 -04:00
Wesley Wiser
73814654b2
Move promoted out of mir::Body
2019-08-22 06:36:30 -04:00
Wesley Wiser
666180c324
Move 'tcx lifetime on MirPass
2019-08-22 06:36:30 -04:00
Mateusz Mikuła
edabcddf4d
Apply clippy::let_and_return suggestion
2019-08-22 12:02:02 +02:00
Mateusz Mikuła
7f4aba40fc
Apply clippy::needless_return suggestions
2019-08-22 12:02:02 +02:00
Mateusz Mikuła
b7ad3f9fc4
Apply clippy::redundant_field_names suggestion
2019-08-22 12:02:02 +02:00
Jeremy Stucki
6ce242fb6e
Update .mailmap
2019-08-22 10:06:25 +02:00
YangHau
4f613ffeb0
Fix naming misspelling
2019-08-22 15:03:19 +08:00
bors
201e52e5fe
Auto merge of #63175 - jsgf:argsfile, r=jsgf
...
rustc: implement argsfiles for command line
Many tools, such as gcc and gnu-ld, support "args files" - that is, being able to specify @file on the command line. This causes `file` to be opened and parsed for command line options. They're separated with whitespace; whitespace can be quoted with double or single quotes, and everything can be \\-escaped. Args files may recursively include other args files via `@file2`.
See https://sourceware.org/binutils/docs/ld/Options.html#Options for the documentation of gnu-ld's @file parameters.
This is useful for very large command lines, or when command lines are being generated into files by other tooling.
2019-08-22 06:14:49 +00:00
Esteban Küber
a710c610b2
review comments: reword and add test
2019-08-21 16:49:26 -07:00
Esteban Küber
352d97e6b7
Add more tests covering more cases
2019-08-21 16:30:11 -07:00
Esteban Küber
053afa7aec
Do not complain about unused code when used in impl
Self
type
2019-08-21 16:12:55 -07:00
Esteban Küber
4971667f17
review comments
2019-08-21 16:11:01 -07:00