Commit graph

94086 commits

Author SHA1 Message Date
memoryruins
83660b6273 Update libstd doctests to use dyn 2019-05-29 00:57:42 -04:00
memoryruins
fd347a8735 Update the rest of the test suites to use dyn 2019-05-29 00:57:42 -04:00
memoryruins
f19f4545b1 Update run-pass test suite to use dyn 2019-05-29 00:57:42 -04:00
memoryruins
eb4580a570 Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
Nicholas Nethercote
2ca6facaaf Optimize TyCtxt::hygienic_eq.
It's measurably faster to avoid the context comparison when possible.

The commit also adds `hygienic_eq` in one appropriate place.
2019-05-29 09:32:56 +10:00
Nicholas Nethercote
caea42f6c8 Introduce and use SyntaxContext::outer_expn_info().
It reduces two `hygiene_data` accesses to one on some hot paths.
2019-05-29 09:32:56 +10:00
Nicholas Nethercote
828f6fdbe5 Introduce and use Mark::outer_is_descendant_of().
It reduces two `hygiene_data` accesses to one on some hot paths.
2019-05-29 09:32:56 +10:00
bors
4b9d80325a Auto merge of #61296 - Centril:rollup-5ad68b0, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #60742 (Allow const parameters in array sizes to be unified)
 - #60756 (Add better tests for hidden lifetimes in impl trait)
 - #60928 (Changes the type `mir::Mir` into `mir::Body`)
 - #61024 (tests: Centralize proc macros commonly used for testing)
 - #61157 (BufReader: In Seek impl, remove extra discard_buffer call)
 - #61195 (Special-case `.llvm` in mangler)
 - #61202 (Print PermissionExt::mode() in octal in Documentation Examples)
 - #61259 (Mailmap fixes)
 - #61273 (mention that MaybeUninit is a bit like Option)

Failed merges:

r? @ghost
2019-05-28 23:07:19 +00:00
David Tolnay
9f8d934f27
Bump Sum and Product for Option<T> to 1.37 2019-05-28 16:00:39 -07:00
Eduard-Mihai Burtescu
7fa97c0850 rustc_codegen_llvm: rename away the last occurrence of insn. 2019-05-29 01:43:58 +03:00
Eduard-Mihai Burtescu
29b7c0687e rustc_codegen_llvm: remove LLVM instruction count stats. 2019-05-29 01:43:57 +03:00
Mazdak Farrokhzad
9121a73ab1
Rollup merge of #61273 - RalfJung:maybe-uninit, r=Centril
mention that MaybeUninit is a bit like Option
2019-05-29 00:20:06 +02:00
Mazdak Farrokhzad
2d01c91c30
Rollup merge of #61259 - JosephTLyons:mailmap-fixes, r=nikomatsakis
Mailmap fixes

I've made a few fixes and additions to the .mailmap file.

- I've added my information to it, as I noticed it was popping up twice at the [Thanks](https://thanks.rust-lang.org/rust/all-time/) website (I've made contributions to the Rust Book).
- I noticed that @carols10cents‘ information was popping up in multiple places at the [Thanks](https://thanks.rust-lang.org/rust/all-time/) website and when running `git shortlog -s -e > out.txt`, and fixed her information
- I alphabetized the list using Atom's [Sort Lines package](https://github.com/atom/sort-lines)

The output from before and after running `git shortlog -s -e > out.txt` for Carol:
<img width="708" alt="Carol Before" src="https://user-images.githubusercontent.com/19867440/58472843-2d8ca880-8115-11e9-9624-d31ed23ae9b5.png">
<img width="523" alt="Carol After" src="https://user-images.githubusercontent.com/19867440/58472844-2d8ca880-8115-11e9-95c6-80b17cc04790.png">

The output from before and after running `git shortlog -s -e > out.txt` for myself:

<img width="489" alt="Joseph After" src="https://user-images.githubusercontent.com/19867440/58472941-6e84bd00-8115-11e9-8266-1d7fcd53d0bc.png">
<img width="421" alt="Joseph Before" src="https://user-images.githubusercontent.com/19867440/58472943-6e84bd00-8115-11e9-9fd2-d7ace7e3d636.png">
2019-05-29 00:20:04 +02:00
Mazdak Farrokhzad
21684c07c7
Rollup merge of #61202 - oberien:permissionext-print-octal, r=varkor
Print PermissionExt::mode() in octal in Documentation Examples

Printing the file permission mode on unix systems in decimal feels unintuitive. Printing it in octal gives the expected form of e.g. `664`.
2019-05-29 00:20:01 +02:00
Mazdak Farrokhzad
dae331d921
Rollup merge of #61195 - davidtwco:seg-fault-mangler, r=eddyb
Special-case `.llvm` in mangler

Fixes #60925 and fixes #53912.

r? @michaelwoerister
cc @eddyb
2019-05-29 00:20:00 +02:00
Mazdak Farrokhzad
745af720bb
Rollup merge of #61157 - czipperz:BufReader-Seek-remove-extra-discard_buffer, r=nikomatsakis
BufReader: In Seek impl, remove extra discard_buffer call

As far as I can tell, this code does nothing.  I'm not sure why it even is there.
2019-05-29 00:19:58 +02:00
Mazdak Farrokhzad
bfe9080ea0
Rollup merge of #61024 - petrochenkov:proctest, r=nikomatsakis
tests: Centralize proc macros commonly used for testing

Many proc macros in `ui\proc-macro\auxiliary` were doing same things.
(I added a fair share of those myself.)

Now commonly used macros (empty, identity, etc) are collected in one place - `ui\proc-macro\auxiliary\test-macros.rs`.
2019-05-29 00:19:57 +02:00
Mazdak Farrokhzad
ee08261c8c
Rollup merge of #60928 - TheSirC:fix/60229, r=eddyb
Changes the type `mir::Mir` into `mir::Body`

Fixes part 1 of #60229 (previously attempted in #60242).

I stumbled upon the issue and it seems that the previous attempt at solving it was not merged. This is a second try more up-to-date.

The commit should have changed comments as well.
At the time of writting, it passes the tidy and check tool.
2019-05-29 00:19:55 +02:00
Mazdak Farrokhzad
e19a229c88
Rollup merge of #60756 - matthewjasper:extra-impl-trait-tests, r=nikomatsakis
Add better tests for hidden lifetimes in impl trait

cc #60670
2019-05-29 00:19:53 +02:00
Mazdak Farrokhzad
d85e256a87
Rollup merge of #60742 - varkor:fn-const-array-parameter, r=eddyb
Allow const parameters in array sizes to be unified

Fixes https://github.com/rust-lang/rust/issues/60632.
Fixes https://github.com/rust-lang/rust/issues/60744.
Fixes https://github.com/rust-lang/rust/pull/60923.
(The last commit should probably be viewed in isolation, as it just renames things from `type` to `kind`.)

r? @eddyb
2019-05-29 00:19:52 +02:00
Eduard-Mihai Burtescu
03d32905e7 rustc_codegen_ssa: remove obsolete codegen stats. 2019-05-29 01:01:32 +03:00
varkor
9c9b7b4eac Add a regression test for unevaluated const in rustdoc 2019-05-28 22:53:48 +01:00
varkor
7f9dc73a31 Add a const-generics folder to rustdoc tests 2019-05-28 22:53:36 +01:00
varkor
35ce2abf21 Use proper const printing in rustdoc 2019-05-28 22:53:16 +01:00
Eduard-Mihai Burtescu
120ce12016 Rename TraitOrImpl to Assoc and trait_or_impl to assoc. 2019-05-29 00:35:14 +03:00
Eduard-Mihai Burtescu
95013e612d syntax: bail out of find_width_of_character_at_span if the span doesn't start and end in the same file. 2019-05-29 00:27:42 +03:00
Eduard-Mihai Burtescu
3e5beb2c6f rustc: rename Mir to mir::Body in comments and to MIR in error strings. 2019-05-29 00:26:56 +03:00
Santiago Pastorino
0631d19c9a Avoid unneeded bug!() call 2019-05-28 22:46:56 +02:00
varkor
6233d1fee5 Use assert_eq! instead of println! in tests 2019-05-28 21:35:20 +01:00
varkor
294916065a Fix nits 2019-05-28 21:35:20 +01:00
varkor
b3a13fdd13 Make sure array length diagnostic doesn't regress 2019-05-28 21:35:20 +01:00
varkor
56181cf8ab Correct pluralisation of tuple/array/associated type binding mismatch errors 2019-05-28 21:35:20 +01:00
varkor
854995313a Reintroduce TypeError::FixedArraySize 2019-05-28 21:35:20 +01:00
varkor
f13317ca2e Use Display rather than Debug printing for const mismatch 2019-05-28 21:35:20 +01:00
varkor
f865b7dda4 Update tests after pretty printing 2019-05-28 21:35:20 +01:00
varkor
cfa1f80cd9 Fix test after rebase 2019-05-28 21:35:20 +01:00
varkor
57ff5899d2 Add broken MIR regression tests 2019-05-28 21:35:20 +01:00
varkor
193b748d5f Remove FixedArraySize error 2019-05-28 21:35:20 +01:00
varkor
d5c6cb8778 Eagerly evaluate in super_relate_consts 2019-05-28 21:35:20 +01:00
varkor
908d97d03c Update test output 2019-05-28 21:34:42 +01:00
varkor
c94ba6382d Rename OpportunisticTypeResolver to OpportunisticVarResolver 2019-05-28 21:34:42 +01:00
varkor
55dcc20f9a Add tests for uninferred consts during codegen 2019-05-28 21:34:42 +01:00
varkor
4ad5c62550 Resolve consts in OpportunisticTypeResolver 2019-05-28 21:34:42 +01:00
varkor
5a585fe45e Add a test for a function taking a const param array as an argument 2019-05-28 21:34:42 +01:00
varkor
73f7e426be Relate identical parameters in array lengths 2019-05-28 21:34:42 +01:00
David Wood
9c34473ecf
Special-case .llvm in mangler to fix segfaults
This commit special cases `.llvm` in the mangler to print `.llvm$6d$`
instead. This will avoid segfaults when names in a user's Rust code are
`llvm`.
2019-05-28 20:26:51 +01:00
Alex Crichton
7b362bb841 Fixup style 2019-05-28 11:56:05 -07:00
Alex Crichton
59291dc788 rustbuild: Assert extended builds don't dist too much
This extends a test in the previous commit to assert that we don't build
extra rustc compilers even when the "extended" option is set to true.
This involved some internal refactoring to have more judicious usage of
`compiler_for`, added in the previous commit, as well.

Various `dist::*` targets were refactored to be parameterized with a
`Compiler` instead of a `stage`/`host`, and then the various parameters
within the `Extended` target were tweaked to ensure that we don't ever
accidentally ask for a stage2 build compiler when we're distributing
something.
2019-05-28 11:50:05 -07:00
memoryruins
a1d1d7a2c6 Update test/ui/parser for bare_trait_object warnings 2019-05-28 14:45:27 -04:00
memoryruins
54e10558b4 Set bare_trait_objects lint to warn 2019-05-28 14:42:14 -04:00