Commit Graph

93770 Commits

Author SHA1 Message Date
Alex Crichton
d1040fe329 std: Depend on backtrace crate from crates.io
This commit removes all in-tree support for generating backtraces in
favor of depending on the `backtrace` crate on crates.io. This resolves
a very longstanding piece of duplication where the standard library has
long contained the ability to generate a backtrace on panics, but the
code was later extracted and duplicated on crates.io with the
`backtrace` crate. Since that fork each implementation has seen various
improvements one way or another, but typically `backtrace`-the-crate has
lagged behind libstd in one way or another.

The goal here is to remove this duplication of a fairly critical piece
of code and ensure that there's only one source of truth for generating
backtraces between the standard library and the crate on crates.io.
Recently I've been working to bring the `backtrace` crate on crates.io
up to speed with the support in the standard library which includes:

* Support for `StackWalkEx` on MSVC to recover inline frames with
  debuginfo.
* Using `libbacktrace` by default on MinGW targets.
* Supporting `libbacktrace` on OSX as an option.
* Ensuring all the requisite support in `backtrace`-the-crate compiles
  with `#![no_std]`.
* Updating the `libbacktrace` implementation in `backtrace`-the-crate to
  initialize the global state with the correct filename where necessary.

After reviewing the code in libstd the `backtrace` crate should be at
exact feature parity with libstd today. The backtraces generated should
have the same symbols and same number of frames in general, and there's
not known divergence from libstd currently.

Note that one major difference between libstd's backtrace support and
the `backtrace` crate is that on OSX the crates.io crate enables the
`coresymbolication` feature by default. This feature, however, uses
private internal APIs that aren't published for OSX. While they provide
more accurate backtraces this isn't appropriate for libstd distributed
as a binary, so libstd's dependency on the `backtrace` crate explicitly
disables this feature and forces OSX to use `libbacktrace` as a
symbolication strategy.

The long-term goal of this refactoring is to eventually move us towards
a world where we can drop `libbacktrace` entirely and simply use Gimli
and the surrounding crates for backtrace support. That's still aways off
but hopefully will much more easily enabled by having the source of
truth for backtraces live in crates.io!

Procedurally if we go forward with this I'd like to transfer the
`backtrace-rs` crate to the rust-lang GitHub organization as well, but I
figured I'd hold off on that until we get closer to merging.
2019-05-25 17:09:45 -07:00
bors
02f5786a32 Auto merge of - Centril:rollup-5rpyhfo, r=Centril
Rollup of 6 pull requests

Successful merges:

 -  (Make sanitize_place iterate instead of recurse)
 -  (Make borrow_of_local_data iterate instead of recurse)
 -  (Make find_local iterate instead of recurse)
 -  (Make ignore_borrow iterate instead of recurse)
 -  (Make find iterate instead of recurse)
 -  (Make eval_place_to_op iterate instead of recurse)

Failed merges:

r? @ghost
2019-05-25 09:30:02 +00:00
bors
315ab95a9c Auto merge of - Centril:rollup-wmm7qga, r=Centril
Rollup of 13 pull requests

Successful merges:

 -  (Tweak macro parse errors when reaching EOF during macro call parse)
 -  (Update cargo)
 -  (tidy: don't short-circuit on license error)
 -  (Fix a couple docs typos)
 -  (Revert edition-guide toolstate override)
 -  (Fixed type-alias-bounds lint doc)
 -  (Deprecate `FnBox`. `Box<dyn FnOnce()>` can be called directly, since 1.35)
 -  (Remove the incorrect warning from README.md)
 -  (Dont ICE on an attempt to use GAT without feature gate)
 -  (improve debug-printing of scalars)
 -  (Updated my mailmap entry)
 -  (Annotate each `reverse_bits` with `#[must_use]`)
 -  (Move async/await tests to their own folder)

Failed merges:

r? @ghost
2019-05-25 04:10:07 +00:00
Mazdak Farrokhzad
1cd3dddc94
Rollup merge of - spastorino:eval-place-to-op-iterate, r=oli-obk
Make eval_place_to_op iterate instead of recurse

r? @oli-obk
2019-05-25 04:57:38 +02:00
Mazdak Farrokhzad
dd33e8a84a
Rollup merge of - spastorino:find-iterate, r=oli-obk
Make find iterate instead of recurse

r? @oli-obk
2019-05-25 04:57:37 +02:00
Mazdak Farrokhzad
e30300d6e8
Rollup merge of - spastorino:ignore-borrow-iterate, r=oli-obk
Make ignore_borrow iterate instead of recurse

r? @oli-obk
2019-05-25 04:57:36 +02:00
Mazdak Farrokhzad
af015527aa
Rollup merge of - spastorino:find-local-iterate, r=oli-obk
Make find_local iterate instead of recurse

r? @oli-obk
2019-05-25 04:57:34 +02:00
Mazdak Farrokhzad
b4f6e5baeb
Rollup merge of - spastorino:borrow-of-local-data-iterate, r=oli-obk
Make borrow_of_local_data iterate instead of recurse

r? @oli-obk
2019-05-25 04:57:33 +02:00
Mazdak Farrokhzad
1ce0288e2f
Rollup merge of - spastorino:sanitize-place-iterative, r=oli-obk
Make sanitize_place iterate instead of recurse

r? @oli-obk
2019-05-25 04:57:32 +02:00
Mazdak Farrokhzad
19b5a10346
Rollup merge of - varkor:async-await-tests, r=cramertj
Move async/await tests to their own folder

This moves run-pass and ui async/await tests to their own folder `src/test/ui/async-await` and organises some into subfolders. (It does not move rustdoc tests for async/await.)

I also did some drive-by cleaning up of issues/error code tests into their own folders (which already existed). These are in separate commits, so easy to separate out if that's more desirable.

r? @cramertj
2019-05-25 04:55:45 +02:00
Mazdak Farrokhzad
92f1cfd039
Rollup merge of - nvzqz:reverse_bits-must_use, r=varkor
Annotate each `reverse_bits` with `#[must_use]`

Because the name sounds like an in-place mutation like `[T]::reverse(&mut self)`, it may be confused for one.

This change was requested at https://github.com/rust-lang/rust/issues/48763#issuecomment-493743741.
2019-05-25 04:55:43 +02:00
Mazdak Farrokhzad
98052b032f
Rollup merge of - XAMPPRocky:master, r=jonas-schievink
Updated my mailmap entry
2019-05-25 04:55:41 +02:00
Mazdak Farrokhzad
deaacafc11
Rollup merge of - RalfJung:miri-value-printing, r=oli-obk
improve debug-printing of scalars

* Prettier printing for `Pointer` and `Bits`.
* Don't print the `ScalarMaybeUndef(...)` around `Scalar`.

Before: `Immediate(ScalarMaybeUndef(Scalar(Ptr(Pointer { alloc_id: AllocId(3401), offset: Size { raw: 4 }, tag: Tagged(7723) }))))`
After: `Immediate(Scalar(AllocId(3401).0x4[<7723>]))`

Before: `Immediate(ScalarMaybeUndef(Scalar(Bits { size: 8, bits: 10 })))`
After: `Immediate(Scalar(0x000000000000000A))`

Before: `Immediate(ScalarMaybeUndef(Scalar(Bits { size: 1, bits: 1 })))`
After: `Immediate(Scalar(0x01))`

r? @oli-obk
2019-05-25 04:55:40 +02:00
Mazdak Farrokhzad
57139e2055
Rollup merge of - pnkfelix:issue-60654-dont-ice-on-gat, r=varkor
Dont ICE on an attempt to use GAT without feature gate

Fix 
2019-05-25 04:55:39 +02:00
Mazdak Farrokhzad
56e77b7851
Rollup merge of - scottmcm:vcpp-download-link, r=alexcrichton
Remove the incorrect warning from README.md

My problem was user error; thanks to @Zoxc for fixing me!

r? @alexcrichton
2019-05-25 04:55:37 +02:00
Mazdak Farrokhzad
8e5e1a0d3c
Rollup merge of - SimonSapin:fnbox, r=alexcrichton
Deprecate `FnBox`. `Box<dyn FnOnce()>` can be called directly, since 1.35

FCP completion: https://github.com/rust-lang/rust/issues/28796#issuecomment-439731515
2019-05-25 04:55:36 +02:00
Mazdak Farrokhzad
65ddf284b6
Rollup merge of - Cerberuser:patch-1, r=steveklabnik
Fixed type-alias-bounds lint doc

The example code under type-alias-bounds lint produced two warnings - one from the lint itself and another from the dead_code lint, and only the second one was in the doc. This looked like an error, so I've added `#[allow(dead_code)]` and replaced the example output with the expected one.

[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&code=%23%5Ballow(dead_code)%5D%0Atype%20SendVec%3CT%3A%20Send%3E%20%3D%20Vec%3CT%3E%3B)

According to guidelines,
r? @steveklabnik
2019-05-25 04:55:34 +02:00
Mazdak Farrokhzad
f8b3ebea6f
Rollup merge of - ehuss:revert-edition-override, r=Mark-Simulacrum
Revert edition-guide toolstate override

Closes 
2019-05-25 04:55:33 +02:00
Mazdak Farrokhzad
77afe6adf8
Rollup merge of - blkerby:docs_typos, r=Centril
Fix a couple docs typos

Also add a link to env::split_paths.
2019-05-25 04:55:32 +02:00
Mazdak Farrokhzad
835281fb04
Rollup merge of - ehuss:tidy-license-short-circuit, r=Centril
tidy: don't short-circuit on license error

If there is more than one license error, tidy would only print the first
error. This changes it so that all license errors are printed.
2019-05-25 04:55:30 +02:00
Mazdak Farrokhzad
2ac8ec0463
Rollup merge of - ehuss:update-cargo, r=alexcrichton
Update cargo

Update cargo

14 commits in c4fcfb725b4be00c72eb9cf30c7d8b095577c280..545f354259be4e9745ea00a524c0e4c51df01aa6
2019-05-15 19:48:47 +0000 to 2019-05-23 17:45:30 +0000
- Bump to 0.38.0 ()
- cargo package: detect new empty directories ()
- Add message caching. ()
- Fix typo ()
- Set `Finished` line correctly for debug=0. ()
- Clippy fixes ()
- Remove rustdoc `can_add_color_process`. ()
- Document new `doctest` field. ()
- Update some man pages that missed --offline. ()
- add public & private prop tests. ()
- zsh completion: Pull list of commands from cargo --list ()
- Change docs "inequality" for semver requirement. ()
- Update im-rc requirement from 12.1.0 to 13.0.0 ()
- Add `doctest` field into metadata ()
2019-05-25 04:55:29 +02:00
Mazdak Farrokhzad
519b040b63
Rollup merge of - estebank:macro-eof-spans, r=petrochenkov
Tweak macro parse errors when reaching EOF during macro call parse

Add detail on origin of current parser when reaching EOF, stop saying "found `<eof>`" and point at the end of macro calls.

Fix .
2019-05-25 04:55:28 +02:00
bors
5245803120 Auto merge of - vext01:try-to-kill-projection-params, r=oli-obk
Make place projections concrete.

**I'm not sure if we want this. I'm raising the PR  for discussion**

Whilst doing some work on our Rust fork, I noticed the following:

Once upon a time (commit 9bd35c07c2) there were two kinds of
projection: one for places, and one for constants. It therefore made
sense to share the `Projection` struct for both. Although the different
use-cases used different concrete types, sharing was made possible by
type-parameterisation of `Projection`.

Since then, however, the usage of projections in constants has
disappeared, meaning that (forgetting lifetimes for a moment) the
parameterised type is only every instantiated under one guise. So it may
as well be a concrete type. Right?

What do people think? This is entirely untested, although it does check.

If we *don't* want this, then we should at least update the incorrect comment against `Projection`.

Thanks
2019-05-25 01:20:07 +00:00
varkor
c91ab64048 Add extra arc_wake 2019-05-25 00:23:15 +01:00
Esteban Küber
ee7593e0ac Revert changes that belong to separate PR 2019-05-24 15:17:32 -07:00
Santiago Pastorino
e38b399d03 Make eval_place_to_op iterate instead of recurse 2019-05-24 23:58:21 +02:00
Santiago Pastorino
6d7a36231a Make eval_place_to_mplace take PlaceBase::Static 2019-05-24 23:57:18 +02:00
varkor
79816bb9e3 Delete stray .stderr 2019-05-24 22:36:57 +01:00
varkor
aea04009e4 Move error code tests to error code folder 2019-05-24 22:07:35 +01:00
varkor
cb7e0d0dd3 Add issues folder in async-await 2019-05-24 22:06:09 +01:00
varkor
06b85709d4 Add drop-order folder in test/ui/async-await 2019-05-24 22:05:57 +01:00
varkor
df26dd8fd1 Add auxiliary issue file 2019-05-24 22:03:14 +01:00
varkor
d289a5ba40 Move some issues into the issues folder 2019-05-24 21:49:52 +01:00
varkor
59762baf8a Move async/await tests to test/ui/async-await 2019-05-24 21:49:34 +01:00
Nikolai Vazquez
035f651df7 Annotate each reverse_bits with #[must_use]
Because the name sounds like an in-place mutation like
`[T]::reverse(&mut self)`, it may be confused for one.
2019-05-24 22:26:34 +02:00
bors
dec4c5201f Auto merge of - pietroalbini:azure-pipelines, r=alexcrichton
Add Azure Pipelines configuration

Huge thanks to @johnterickson and @willsmythe for writing the initial config! ❤️
I applied some changes to the initial config and disabled most of the builders since we're not going to run all of them during the initial step for the evaluation.

[More details about our plans for the Azure Pipelines evaluation.](https://internals.rust-lang.org/t/update-on-the-ci-investigation/10056)

r? @alexcrichton @kennytm
cc @rust-lang/infra @ethomson @rylev
2019-05-24 19:22:13 +00:00
Santiago Pastorino
8173febf93 Avoid catch-all arm, use Base(PlaceBase::Static(_)) 2019-05-24 21:13:19 +02:00
Esteban Küber
da57ac38a6 Move diagnostic logic out of parser 2019-05-24 11:50:21 -07:00
Esteban Küber
a2f853a691 Fix rebase 2019-05-24 11:50:21 -07:00
Esteban Küber
5c5fa775e5 review comments 2019-05-24 11:50:21 -07:00
Esteban Küber
24160171e4 Tweak macro parse errors when reaching EOF during macro call parse
- Add detail on origin of current parser when reaching EOF and stop
  saying "found <eof>" and point at the end of macro calls
- Handle empty `cfg_attr` attribute
- Reword empty `derive` attribute error
2019-05-24 11:49:33 -07:00
Santiago Pastorino
10fe26962c Make ignore_borrow iterate instead of recurse 2019-05-24 19:43:42 +02:00
Santiago Pastorino
9613779855 Make borrow_of_local_data iterate instead of recurse 2019-05-24 18:42:04 +02:00
Erin
aba152d14c
Updated my mailmap entry 2019-05-24 18:32:22 +02:00
Santiago Pastorino
03dc30d3d5 Make sanitize_place iterate instead of recurse 2019-05-24 18:31:11 +02:00
Santiago Pastorino
34314caea3 Make find iterate instead of recurse 2019-05-24 18:16:55 +02:00
Ralf Jung
a90cdcca7e this is for tidy 2019-05-24 16:44:52 +02:00
Ralf Jung
d01ef7d918 improve debug-printing of scalars
Before: Immediate(ScalarMaybeUndef(Scalar(Ptr(Pointer { alloc_id: AllocId(3401), offset: Size { raw: 4 }, tag: Tagged(7723) }))))
After: Immediate(Scalar(AllocId(3401).0x4[<7723>]))

Before: Immediate(ScalarMaybeUndef(Scalar(Bits { size: 8, bits: 10 })))
After: Immediate(Scalar(0x000000000000000A))

Before: Immediate(ScalarMaybeUndef(Scalar(Bits { size: 1, bits: 1 })))
After: Immediate(Scalar(0x01))
2019-05-24 16:11:50 +02:00
Felix S. Klock II
c235ba4d0b Regression test for issue . 2019-05-24 15:15:55 +02:00
Edd Barrett
123a456a4f Make place projections concrete.
Once upon a time (commit 9bd35c07c2) there were two kinds of
projection: one for places, and one for constants. It therefore made
sense to share the `Projection` struct for both. Although the different
use-cases used different concrete types, sharing was made possible by
type-parameterisation of `Projection`.

Since then, however, the usage of projections in constants has
disappeared, meaning that (forgetting lifetimes for a moment) the
parameterised type is only every instantiated under one guise. So it may
as well be a concrete type.
2019-05-24 14:14:36 +01:00