Commit Graph

94909 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
850b50a44f
Rollup merge of #61536 - oli-obk:args_required_const_in_const_fn, r=eddyb
Don't allow using const fn arguments as "args_required_const"

r? @eddyb
2019-06-05 17:43:31 +02:00
Mazdak Farrokhzad
76f9f6b2ab
Rollup merge of #61534 - ReinierMaas:patch-1, r=Centril
Edit docs of ExitStatus

The documentation of [`ExitStatus`] are extended to be at the same depth as [`Output`].
2019-06-05 17:43:30 +02:00
Mazdak Farrokhzad
713ebb462c
Rollup merge of #61503 - jethrogb:jb/fix-sgx-test, r=alexcrichton
Fix cfg(test) build for x86_64-fortanix-unknown-sgx
2019-06-05 17:43:28 +02:00
bors
47f4975cd7 Auto merge of #61498 - TankhouseAle:const-fn-type-name, r=oli-obk
Add "type_name" support in emulate_intrinsic()

I did some dumb Git things and deleted my original fork repo semi-accidentally (but probably for the best as I'd messed up the history.)

This is the same issue as #61399, which was obviously auto-closed, to be clear.
2019-06-05 15:40:16 +00:00
Alex Crichton
fb3bd58e4f azure: Uninstall previous rustc from builders if any
Looks like Azure has updated images recently to install Rust by default,
but that can interfere with our own compiler (for example Cargo's test
suite we think) so be sure to uninstall it before proceeding.
2019-06-05 08:32:40 -07:00
Alex Crichton
0b88e5a87e azure: Make sure docker directory exists
Looks like the Azure image changed recently so let's account for that!
2019-06-05 07:34:48 -07:00
bors
2a1d6c83d3 Auto merge of #61484 - nnethercote:avoid-more-hygiene-lookups, r=petrochenkov
Avoid more hygiene lookups

Mostly by combining multiple `HygieneData::with` calls into a single call on hot paths.

r? @petrochenkov
2019-06-05 12:46:15 +00:00
Oliver Scherer
192c1d0717 Explain the existience of the regression test 2019-06-05 13:25:17 +02:00
coypoop
77e9335868
Don't use GNU noexec stack note
NetBSD ignores this note and marks the stack no-exec unconditionally
2019-06-05 12:19:34 +03:00
bors
817d2feb13 Auto merge of #61502 - alexcrichton:update-backtrace, r=estebank
std: Update dependency on `backtrace`

Discovered in #61416 an accidental regression in libstd's backtrace
behavior is that it previously attempted to consult libbacktrace and
would then fall back to `dladdr` if libbacktrace didn't report anything.
The `backtrace` crate, however, did not do this, so that's now been
fixed!

Changes: https://github.com/rust-lang/backtrace-rs/compare/0.3.25...0.3.29

Closes #61416
2019-06-05 08:20:20 +00:00
Reinier Maas
dd12f39b35
Tidy: trailing whitespace
Removed trailing whitespace from documentation of ExitStatus.
2019-06-05 09:58:39 +02:00
Oliver Scherer
dcd46d6b67 Don't allow using const fn arguments as "args_required_const" 2019-06-05 09:49:04 +02:00
Reinier Maas
674f24e132
Edit docs of ExitStatus
The documentation of [`ExitStatus`] are extended to be at the same depth as [`Output`].
2019-06-05 08:41:37 +02:00
Lzu Tao
1fa50b3ab8 Stabilize Option::xor 2019-06-05 02:16:06 +00:00
Alex Crichton
fa1b6add09 std: Update dependency on backtrace
Discovered in #61416 an accidental regression in libstd's backtrace
behavior is that it previously attempted to consult libbacktrace and
would then fall back to `dladdr` if libbacktrace didn't report anything.
The `backtrace` crate, however, did not do this, so that's now been
fixed!

Changes: https://github.com/rust-lang/backtrace-rs/compare/0.3.25...0.3.27

Closes #61416
2019-06-04 18:45:39 -07:00
Tyler Mandry
4d6cb096ef Fix spelling
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-06-04 16:14:36 -07:00
Tyler Mandry
e244f625be Add test for DropAndReplace bug 2019-06-04 16:14:36 -07:00
Tyler Mandry
e8d639e42f Move cached_block out of DropKind 2019-06-04 16:14:36 -07:00
Tyler Mandry
4912df0266 Generate StorageDead along unwind paths for generators 2019-06-04 16:14:36 -07:00
Tyler Mandry
3d682cd941 Revert "Make MaybeStorageLive drop-aware"
This reverts commit dd2eabc49d.
2019-06-04 16:14:36 -07:00
Nicholas Nethercote
4c9ecbf3d1 Add modernize_and_adjust methods.
These combine two `HygieneData::with` calls into one.
2019-06-05 09:09:35 +10:00
bors
81eb15210a Auto merge of #61527 - pietroalbini:rollup-vhxyqlk, r=pietroalbini
Rollup of 5 pull requests

Successful merges:

 - #61069 (Make MIR drop terminators borrow the dropped location)
 - #61453 (Remove unneeded feature attr from atomic integers doctests)
 - #61488 (Fix NLL typeck ICEs)
 - #61500 (Fix regression 61475)
 - #61523 (Hide gen_future API from documentation)

Failed merges:

r? @ghost
2019-06-04 23:05:05 +00:00
Nicholas Nethercote
ab9bbf48db Avoid unnecessary rust_2018 calls.
The commit combines two calls into one by saving the result in a local
variable. The commit also moves the check for `async` later, so that
when a different keyword is present the `rust_2018` call will be avoided
completely.
2019-06-05 07:43:15 +10:00
Nicholas Nethercote
425736dc97 Add a useful comment about this file. 2019-06-05 07:43:15 +10:00
Nicholas Nethercote
dc807a9f7e Add walk_chain.
This combines multiple `HygieneData::with` calls on a hot path.
2019-06-05 07:43:15 +10:00
Nicholas Nethercote
6596743d5e Add SyntaxContext::hygienic_eq.
This combines multiple `HygieneData::with` calls into one, by combining
parts of `hygienic_eq` and `adjust_ident`.
2019-06-05 07:43:15 +10:00
Nicholas Nethercote
f9209fcd63 Add and use SyntaxContext::outer_and_expn_info.
This combines two `HygieneData::with` calls into one on a hot path.
2019-06-05 07:43:15 +10:00
Nicholas Nethercote
e19857c4db Optimize glob_adjust and reverse_glob_adjust.
They can each now do a single `HygieneData::with` call by replacing the
`SyntaxContext` and `Mark` methods with the equivalent methods from
`HygieneData`.
2019-06-05 07:43:14 +10:00
Nicholas Nethercote
58a486928e Add HygieneData::apply_mark.
This combines two `HygieneData::with` calls into one.
2019-06-05 07:43:14 +10:00
Nicholas Nethercote
4527a868d6 Add HygieneData::apply_mark_with_transparency.
Also remove `HygieneData::apply_mark_internal`, which is no longer
needed.
2019-06-05 07:43:14 +10:00
Nicholas Nethercote
a84aee3dbe Add HygieneData::apply_mark_internal. 2019-06-05 07:43:14 +10:00
Nicholas Nethercote
a02b2e36c0 Add HygieneData::marks. 2019-06-05 07:43:14 +10:00
Nicholas Nethercote
88fd7a8eb7 Add HygieneData::adjust. 2019-06-05 07:43:14 +10:00
Nicholas Nethercote
cd64cc835d Add HygieneData::remove_mark. 2019-06-05 07:43:14 +10:00
Nicholas Nethercote
7bec8c94b4 Add HygieneData::default_transparency.
Also use `HygieneData::expn_info` in an appropriate place.
2019-06-05 07:43:14 +10:00
Nicholas Nethercote
0ba36ea7c1 Add some useful methods to HygieneData. 2019-06-05 07:43:14 +10:00
Nicholas Nethercote
8797e8cabd Move modern calls inside glob_adjust and reverse_glob_adjust. 2019-06-05 07:43:14 +10:00
Eric Huss
7e7dfa8cd7 Update books 2019-06-04 14:41:36 -07:00
Pietro Albini
e83dcebe4f
Rollup merge of #61523 - Nemo157:hide-gen-future, r=cramertj
Hide gen_future API from documentation

This is internal rustc only API which should never be used outside code created by the current `async` transform, if it is used then the panic messages don't make sense as they're written from the perspective of that meaning there is a bug in the `async` transform (e.g. #61482).
2019-06-04 22:39:41 +02:00
Pietro Albini
46344122d1
Rollup merge of #61500 - estebank:expregression, r=petrochenkov
Fix regression 61475

Addresses #61475.
2019-06-04 22:39:39 +02:00
Pietro Albini
d5643be9b4
Rollup merge of #61488 - matthewjasper:fix-nll-typeck-ices, r=pnkfelix
Fix NLL typeck ICEs

* Don't ICE when a type containing a region is constrained by nothing
* Don't ICE trying to normalize a type in a `ParamEnv` containing global bounds.

To explain what was happening in the `issue-61311-normalize.rs` case:

* When borrow checking the `the_fn` in the last `impl` we would try to normalize `Self::Proj` (`<Unit as HasProjFn>::Proj`).
* We would find the `impl` that we're checking and and check its `where` clause.
* This would need us to check `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound`
* We find two possible implementations, the blanket impl and the bound in our `ParamEnv`.
* The bound in our `ParamEnv` was canonicalized, so we don't see it as a global bound. As such we prefer it to the `impl`.
* This means that we cannot normalize `<Box<dyn Obj + 'static> as HasProj>::Proj` to `Unit`.
* The `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound` bound, which looks like it should be in our `ParamEnv` has been normalized to `Unit: Bound`.
* We fail to prove `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound`.
* We ICE, since we believe typeck have errored.

Closes #61311
Closes #61315
Closes #61320

r? @pnkfelix
cc @nikomatsakis
2019-06-04 22:39:38 +02:00
Pietro Albini
98176fc8fb
Rollup merge of #61453 - lzutao:nouse-featuregate-integer_atomics, r=sfackler
Remove unneeded feature attr from atomic integers doctests

Closes #61448

r? @Centril
2019-06-04 22:39:36 +02:00
Pietro Albini
93271d159e
Rollup merge of #61069 - Zoxc:drop-borrow-fix, r=pnkfelix
Make MIR drop terminators borrow the dropped location

r? @eddyb
cc @tmandry
2019-06-04 22:39:35 +02:00
lcnr/Bastian Kauschke
4c44d4a214 improve test indentation 2019-06-04 22:13:41 +02:00
bors
5d8f59f4b1 Auto merge of #61407 - phansch:annotate_snippet_refactoring1, r=oli-obk
Add new diagnostic writer using annotate-snippet library

This adds a new diagnostic writer `AnnotateRsEmitterWriter` that uses
the [`annotate-snippet`][as] library to print out the human readable
diagnostics.

The goal of #59346 is to eventually switch over to using the library instead of
maintaining our own diagnostics output.

This PR does **not** add all the required features to the new
diagnostics writer. It is only meant as a starting point so that other
people can start contributing as well.

There are some FIXMEs in `librustc_errors/annotate_rs_emitter.rs` that
point at yet to be implemented features of the new diagnostic emitter, however
those are most likely not exhaustive.

[as]: https://github.com/rust-lang/annotate-snippets-rs
2019-06-04 20:10:54 +00:00
lcnr/Bastian Kauschke
e02f133027 move intrinsics codegen tests into a seperate folder 2019-06-04 22:08:28 +02:00
Kenny Goodin
de677b993f Remove asterisk suggestion for move errors in borrowck
As per issue #54985 removes the not useful suggestion to remove asterisk in
move errors. Includes minor changes to tests in the `ui` suite to account
for the removed suggestion.
2019-06-04 13:31:40 -04:00
Wim Looman
7980bc4bbc Hide gen_future API from documentation 2019-06-04 19:22:30 +02:00
bors
97c9437585 Auto merge of #61454 - lzutao:ice-rotate_left, r=RalfJung
Fix integer overflow in rotate_left

Closes #61406
r? @RalfJung
2019-06-04 17:20:14 +00:00
Philipp Hansch
bfe5d9796b
eprint -> eprintln to add trailing newline 2019-06-04 18:46:00 +02:00