Commit Graph

446 Commits

Author SHA1 Message Date
Alex Crichton
6c74bc9518 Update version of rustc-std-workspace-* crates
This commit updates the version of the `rustc-std-workspace-*` crates
in-tree which are used in `[patch]`. This will guarantee that Cargo will
select these versions even if minor updates are published to crates.io
because otherwise a newer version on crates.io would be preferred which
misses the point of `[patch]`!
2019-09-09 13:02:10 -07:00
Igor Matuszewski
c2249a4bf9 cargo update -p rustfmt-nightly 2019-09-09 18:18:21 +02:00
Mazdak Farrokhzad
24172084e1
Rollup merge of #64152 - cramertj:update-backtrace, r=alexcrichton
Use backtrace formatting from the backtrace crate

r? @alexcrichton
2019-09-08 12:11:56 +02:00
Mazdak Farrokhzad
448b38f0bf
Rollup merge of #64235 - mati865:env_logger, r=alexcrichton
Upgrade env_logger to 0.6
2019-09-07 20:01:48 +02:00
Mazdak Farrokhzad
89a69fd76d
Rollup merge of #64139 - Mark-Simulacrum:strip-legacy-proc-macro, r=petrochenkov
Migrate internal diagnostic registration to macro_rules

Review is best done commit-by-commit.

Fixes #64132.
2019-09-07 20:01:44 +02:00
Mateusz Mikuła
8ddbe7660f Upgrade env_logger to 0.6 2019-09-06 20:04:12 +02:00
Mateusz Mikuła
32101ad3b3 Upgrade rand to 0.7 2019-09-06 14:45:28 +02:00
Mazdak Farrokhzad
5b995397db
Rollup merge of #63676 - newpavlov:wasi, r=alexcrichton
Use wasi crate for Core API

Blocked by: CraneStation/rust-wasi#5

Blocks: rust-lang/libc#1461

cc @sunfishcode @alexcrichton
2019-09-06 09:36:36 +02:00
Mark Rousskov
3f1dc326ed Remove codegen dependencies
Not doing this leads to building two copies of e.g. num_cpus in the
sysroot and _llvm deps, leading to conflicts between the two when
compiling librustc_codegen_llvm. It's not entirely clear why this is the
case after the changes in this PR but likely has something to do with a
subtle difference in ordering or similar.
2019-09-05 12:35:18 -04:00
bors
618768492f Auto merge of #64172 - Centril:rollup-8i8oh54, r=Centril
Rollup of 11 pull requests

Successful merges:

 - #62848 (Use unicode-xid crate instead of libcore)
 - #63774 (Fix `window.hashchange is not a function`)
 - #63930 (Account for doc comments coming from proc macros without spans)
 - #64003 (place: Passing `align` = `layout.align.abi`, when also passing `layout`)
 - #64030 (Fix unlock ordering in SGX synchronization primitives)
 - #64041 (use TokenStream rather than &[TokenTree] for built-in macros)
 - #64051 (Add x86_64-linux-kernel target)
 - #64063 (Fix const_err with `-(-0.0)`)
 - #64083 (Point at appropriate arm on type error on if/else/match with one non-! arm)
 - #64100 (Fix const eval bug breaking run-pass tests in Miri)
 - #64157 (Opaque type locations in error message for clarity.)

Failed merges:

r? @ghost
2019-09-05 12:41:41 +00:00
Taylor Cramer
290f5b2275 Use backtrace formatting from the backtrace crate 2019-09-04 16:18:12 -07:00
Aleksey Kladov
a0c186c34f remove XID and Pattern_White_Space unicode tables from libcore
They are only used by rustc_lexer, and are not needed elsewhere.

So we move the relevant definitions into rustc_lexer (while the actual
unicode data comes from the unicode-xid crate) and make the rest of
the compiler use it.
2019-09-04 13:11:11 +03:00
Albin Stjerna
2adb246b5c NLL: New Polonius version 2019-09-04 09:44:40 +02:00
bors
2d851b3318 Auto merge of #63975 - topecongiro:rustfmt-1.4.6, r=nikomatsakis
Update rustfmt to 1.4.6

This PR updates rustfmt to 1.4.6. [CHANGELOG](https://github.com/rust-lang/rustfmt/blob/v1.4.6/CHANGELOG.md#146-2019-08-28).
2019-08-31 01:35:10 +00:00
Jonas Schievink
eefae7b1a9 Update Cargo.lock 2019-08-30 12:34:38 +02:00
Jonas Schievink
a8926a5e9c Use panic::set_hook to print the ICE message 2019-08-30 12:34:20 +02:00
bors
19a38de68a Auto merge of #63402 - estebank:strip-margin, r=oli-obk
Strip code to the left and right in diagnostics for long lines

Fix #62999.
2019-08-30 06:49:15 +00:00
newpavlov
6374b8458f update to wasi v0.7 2019-08-29 20:13:15 +03:00
topecongiro
8e10725317
Update rustfmt to 1.4.6 2019-08-28 22:37:41 +09:00
bors
b7178cbc0c Auto merge of #63960 - ehuss:update-cargo, r=alexcrichton
Update cargo

Update cargo

10 commits in 3f700ec43ce72305eb5315cfc710681f3469d4b4..22f7dd0495cd72ce2082d318d5a9b4dccb9c5b8c
2019-08-19 22:43:12 +0000 to 2019-08-27 16:10:51 +0000
- Update and improve zsh completion (rust-lang/cargo#7296)
- Document that `package` can be used in `[patch]` (rust-lang/cargo#7263)
- Fix `error:`/`warning:` coloring inconsistency with rustc (rust-lang/cargo#7294)
- Tests: Import rustc_plugin from its new location (rust-lang/cargo#7287)
- Update README azure badge. (rust-lang/cargo#7293)
- Update home dependencies to v0.5 (rust-lang/cargo#7277)
- Fix typo (rust-lang/cargo#7279)
- Update libgit2 dependencies (rust-lang/cargo#7275)
- Fix old lockfile encoding wrt newlines (rust-lang/cargo#7262)
- Fix dSYM uplifting when symlink is broken (rust-lang/cargo#7268)
2019-08-27 23:57:05 +00:00
Eric Huss
85a4d6f522 Update cargo 2019-08-27 14:03:32 -07:00
Ralf Jung
98ad4ac250 update miri 2019-08-27 15:49:47 +02:00
Alex Crichton
b47c9690d2 bootstrap: Merge the libtest build step with libstd
Since its inception rustbuild has always worked in three stages: one for
libstd, one for libtest, and one for rustc. These three stages were
architected around crates.io dependencies, where rustc wants to depend
on crates.io crates but said crates don't explicitly depend on libstd,
requiring a sysroot assembly step in the middle. This same logic was
applied for libtest where libtest wants to depend on crates.io crates
(`getopts`) but `getopts` didn't say that it depended on std, so it
needed `std` built ahead of time.

Lots of time has passed since the inception of rustbuild, however,
and we've since gotten to the point where even `std` itself is depending
on crates.io crates (albeit with some wonky configuration). This
commit applies the same logic to the two dependencies that the `test`
crate pulls in from crates.io, `getopts` and `unicode-width`. Over the
many years since rustbuild's inception `unicode-width` was the only
dependency picked up by the `test` crate, so the extra configuration
necessary to get crates building in this crate graph is unlikely to be
too much of a burden on developers.

After this patch it means that there are now only two build phasese of
rustbuild, one for libstd and one for rustc. The libtest/libproc_macro
build phase is all lumped into one now with `std`.

This was originally motivated by rust-lang/cargo#7216 where Cargo was
having to deal with synthesizing dependency edges but this commit makes
them explicit in this repository.
2019-08-23 16:46:11 -07:00
bors
f834695781 Auto merge of #63521 - newpavlov:redox_builder, r=pietroalbini
Re-enable Redox builder (take 2)

Closes: #63160
2019-08-23 08:58:24 +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
f08b036cc7 Introduce term-size dependency and consider term width when trimming 2019-08-21 11:56:20 -07:00
Mazdak Farrokhzad
61ae1ccb14
Rollup merge of #63753 - ehuss:bump-toml, r=Mark-Simulacrum
Bump toml dependency.

Just removing an old/duplicated dependency from the workspace.
2019-08-21 11:52:21 +02:00
Mazdak Farrokhzad
d7c162aefd
Rollup merge of #63721 - Mark-Simulacrum:decouple-error-index, r=matthewjasper
Do not emit JSON dumps of diagnostic codes

This decouples the error index generator from libsyntax for the most part (though it still depends on librustdoc for the markdown parsing and generation).

Fixes #34588
2019-08-21 11:52:20 +02:00
Eric Huss
7d92cf4826 Bump toml dependency.
Just removing an old/duplicated dependency from the workspace.
2019-08-20 10:46:35 -07:00
bors
5a56e05abd Auto merge of #63744 - Centril:rollup-g4l3ra9, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #63216 (avoid unnecessary reservations in std::io::Take::read_to_end)
 - #63265 (Implement `nth_back` for ChunksExactMut)
 - #63691 (Fix bug in iter::Chain::size_hint)
 - #63722 (Don't use stage naming in RUSTFLAGS environment variables)
 - #63723 (Consolidate sigemptyset workarounds)
 - #63736 (Restore the rustc_plugin crate in the sysroot)
 - #63743 (Allow git to merge `Cargo.lock`)

Failed merges:

r? @ghost
2019-08-20 15:01:24 +00:00
Mark Rousskov
99ce39b30a Load error codes via build script instead of JSON parsing
This scans the tree for `error_codes.rs` and loads all of them.
2019-08-20 09:55:31 -04:00
Simon Sapin
c561abeea2 Restore the rustc_plugin crate in the sysroot
It was accidentally removed in a rebase of https://github.com/rust-lang/rust/pull/62727

Fixes https://github.com/rust-lang/rust/issues/63729
2019-08-20 13:30:50 +02:00
Artyom Pavlov
bd1dc7cf92
fix libc checksum 2019-08-20 10:26:10 +00:00
Artyom Pavlov
e500fc3171
Merge branch 'master' into redox_builder 2019-08-20 10:08:57 +00:00
flip1995
96c3ec12f6
Update Cargo.lock 2019-08-20 09:32:53 +02:00
Seiichi Uchida
0be01fa655 Update rustfmt to 1.4.5 2019-08-20 16:23:46 +09:00
Simon Sapin
d0bbc6062d Deprecate using rustc_plugin without the rustc_driver dylib.
CC https://github.com/rust-lang/rust/pull/59800
7198687bb2

Fix https://github.com/rust-lang/rust/issues/62717
2019-08-20 00:21:32 +02:00
Alex Crichton
093ede240a Use to Cargo's experimental lockfile format
This commit changes the lock file format of this repository to an
experimental format that isn't rolled out by default in Cargo but is
intended to eventually become the default. The new format moves
information around and compresses the lock file a bit. The intention of
the new format is to reduce the amount of git merge conflicts that
happen in a repository, with rust-lang/rust being a prime candidate for
testing this.

The new format wille ventually become the default but for now it is
off-by-default in Cargo, but Cargo will preserve the format if it sees
it. Since we always build with a beta version of Cargo for the
rust-lang/rust repository it should be safe to go ahead and change the
lock file format here and everyone building this repository will
automatically pick it up.

It's intended that we'll evaluate this lock file format in the
rust-lang/rust repository to see if it reduces the number of perceived
merge conflicts for changes that touch the lock file. This will in turn
help inform the development of the feature in Cargo and whether we
choose to stabilize this and turn it on by default.

Note that this commit does not actually change the contents of the lock
file in terms of a resolution graph, it simply reencodes the lock file
with a new format.
2019-08-19 09:56:22 -07:00
Alex Crichton
1301b100ca std: Update backtrace crate dependency
This commit updates the `backtrace` crate from 0.3.34 to 0.3.35. The
[included set of changes][changes] for this update mostly includes some
gimli-related improvements (not relevant for the standard library) but
critically includes a fix for rust-lang/backtrace-rs#230. The standard
library will not aqcuire a session-local lock whenever a backtrace is
generated on Windows to allow external synchronization with the
`backtrace` crate itself, allowing `backtrace` to be safely used while
other threads may be panicking.

[changes]: https://github.com/rust-lang/backtrace-rs/compare/0.3.34...0.3.35
2019-08-19 06:13:18 -07:00
Artyom Pavlov
5d75654cce
fix Cargo.lock 2019-08-17 19:15:36 +00:00
Artyom Pavlov
51dcdcfd94
Merge branch 'master' into redox_builder 2019-08-17 18:54:56 +00:00
Mazdak Farrokhzad
13b1031399
Rollup merge of #63548 - eddyb:unicode-demangling, r=alexcrichton
Update rustc-demangle to 0.1.16.

Includes https://github.com/alexcrichton/rustc-demangle/pull/29 and https://github.com/alexcrichton/rustc-demangle/pull/30.
You can see the effects of the former in the testcase changes.

r? @alexcrichton cc @davidtwco @michaelwoerister
2019-08-17 03:02:57 +02:00
Simon Sapin
a92c29b238 Update hashbrown to 0.5.0 2019-08-16 18:08:35 +02:00
Eduard-Mihai Burtescu
1ab9e523f3 Update rustc-demangle to 0.1.16. 2019-08-14 10:35:24 +03:00
newpavlov
7b8273c2e8 Re-enable Redox builder (take 2) 2019-08-13 17:21:45 +03:00
Mark Rousskov
c57481001e Remove ReentrantMutex
This drops the parking_lot dependency; the ReentrantMutex type appeared
to be unused (at least, no compilation failures occurred).

This is technically a possible change in behavior of its users, as
lock() would wait on other threads releasing their guards, but since we
didn't actually remove any threading or such in this code, it appears
that we never used that behavior (the behavior change is only noticeable
if the type previously was used in two threads, in a single thread
ReentrantMutex is useless).
2019-08-11 10:36:46 -04:00
Mazdak Farrokhzad
8fe2d9c4e9
Rollup merge of #63316 - topecongiro:rustfmt-1.4.4, r=Mark-Simulacrum
Update rustfmt to 1.4.4

The update includes bug fixes.
2019-08-08 16:33:36 +02:00
Mazdak Farrokhzad
8885dc2b37
Rollup merge of #63261 - RalfJung:rand, r=nikomatsakis
bump rand in libcore/liballoc test suites

This pulls in the fix for https://github.com/rust-random/rand/issues/779, which trips Miri when running these test suites.

`SmallRng` (formerly used by libcore) is no longer built by default, it needs a feature gate. I opted to switch to `StdRng` instead. Or should I enable the feature gate?
2019-08-08 16:33:34 +02:00
Eric Huss
266fa0c26a Update cargo 2019-08-07 17:23:54 -07:00
Mazdak Farrokhzad
fbf268bfd4
Rollup merge of #63296 - alexcrichton:deduplicate-demangle, r=Mark-Simulacrum
Deduplicate rustc_demangle in librustc_codegen_llvm

This commit removes the crates.io dependency of `rustc-demangle` from
`rustc_codegen_llvm`. This crate is actually already pulled in to part
of the `librustc_driver` build and with the upcoming pipelining
implementation in Cargo it causes build issues if `rustc-demangle` is
left to its own devices.

This is not currently required, but once pipelining is enabled for
rustc's own build it will be required to build correctly.
2019-08-06 15:36:34 +02:00
topecongiro
93cf95bedd
Update rustfmt to 1.4.4 2019-08-06 11:19:31 +09:00
Ralf Jung
39185dd398 update getrandom 2019-08-05 11:23:06 +02:00
Ralf Jung
0cb16f7d5e bump libcore tests to rand 0.7 2019-08-04 14:50:32 +02:00
Ralf Jung
5b78e98a37 bump rand to fix Miri failures 2019-08-04 14:50:26 +02:00
Igor Matuszewski
5bcce8269d Update Rustfmt and RLS 2019-08-03 13:05:42 +02:00
gnzlbg
52caca0c45 Update Cargo.lock 2019-08-01 17:02:26 +02:00
Eric Huss
f2428a69d4 Update cargo, rls 2019-07-31 17:44:39 -07:00
Alex Crichton
d05c4d5459 Deduplicate rustc_demangle in librustc_codegen_llvm
This commit removes the crates.io dependency of `rustc-demangle` from
`rustc_codegen_llvm`. This crate is actually already pulled in to part
of the `librustc_driver` build and with the upcoming pipelining
implementation in Cargo it causes build issues if `rustc-demangle` is
left to its own devices.

This is not currently required, but once pipelining is enabled for
rustc's own build it will be required to build correctly.
2019-07-31 15:04:25 -07:00
Alex Crichton
3d2b6e79db Attempt to fix backtrace tests on i686-msvc
Some fixes for i686-msvc and Windows have landed on the `backtrace`
crate but hadn't made their way here yet. Let's update that and see if
it passes CI.
2019-07-31 10:59:32 -07:00
Igor Matuszewski
1b61db706a Enable nightly feature for crossbeam-utils dep
Last two commits bumped rustc-ap-* crates which also transitively
updated rustc_data_structures. That crate enables the "nightly"
whereas Cargo's dep does not hence why we need to unify the features
to deduplicate the artifacts.
2019-07-30 18:10:53 +02:00
Igor Matuszewski
ab27d67738 Update Rustfmt 2019-07-30 13:02:07 +02:00
Igor Matuszewski
d2d192ee4c Update RLS 2019-07-30 13:01:00 +02:00
Guillaume Gomez
3f4dbd390c Update minifier-rs version 2019-07-28 20:26:07 +02:00
Mazdak Farrokhzad
48802974aa
Rollup merge of #62974 - RalfJung:crossbeam, r=alexcrichton
bump crossbeam-epoch dependency

The new crossbeam-epoch release depends on a memoffset with a whole bunch of soundness holes fixed.

The old memoffset is still indirectly depended on (at least) by rustc-rayon, though -- a crate that looks rather unmaintained (no change in more than a year).
2019-07-28 11:11:10 +02:00
Vadim Petrochenkov
b5a0e6ea80 syntax_ext: proc_macro_decls -> proc_macro_harness
Few other minor renamings for consistency.
Remove one unused dependency from `rustc_passes`.
Fix libsyntax tests.
Fix rebase.
2019-07-27 14:16:16 +03:00
Vadim Petrochenkov
4ad0daa220 Move proc macro server into libsyntax 2019-07-27 13:55:25 +03:00
Vadim Petrochenkov
3eeec1c5d2 Break dependencies between syntax_ext and some other crates
Move `source_uitil` macros into `syntax_ext`
Cleanup dependencies of `rustc_driver`
2019-07-27 13:52:37 +03:00
Mazdak Farrokhzad
571a965143
Rollup merge of #62985 - phansch:support_ui_testing_flag, r=estebank
librustc_errors: Support ui-testing flag in annotate-snippet emitter

This adds support for the `-Z ui-testing` flag to the new
annotate-snippet diagnostic emitter.

Support for the flag was added to `annotate-snippet-rs` in these PRs:

* https://github.com/rust-lang/annotate-snippets-rs/pull/3
* https://github.com/rust-lang/annotate-snippets-rs/pull/5

r? @estebank

Closes #61811
2019-07-26 18:57:01 +02:00
Mazdak Farrokhzad
632ce7402f
Rollup merge of #62801 - bjorn3:remove_lower_128bit_ops, r=alexcrichton
Remove support for -Zlower-128bit-ops

It is broken and unused

cc https://github.com/rust-lang/rust/issues/58969

blocked https://github.com/rust-lang-nursery/compiler-builtins/pull/302 (removes definitions of the lang items removed in this PR)

r? @alexcrichton
2019-07-26 18:56:43 +02:00
Eric Huss
78f25e308c Update cargo 2019-07-25 19:49:18 -07:00
Philipp Hansch
dd0f2ac250
librustc_errors: Support ui-testing flag in annotate-snippet emitter
This adds support for the `-Z ui-testing` flag to the new
annotate-snippet diagnostic emitter.

The support for the flag was added to `annotate-snippet-rs` in these PRs:

* https://github.com/rust-lang/annotate-snippets-rs/pull/3
* https://github.com/rust-lang/annotate-snippets-rs/pull/5

Closes #61811
2019-07-25 21:03:53 +02:00
Ralf Jung
c7a599e4df bump crossbeam-epoch dependency 2019-07-25 15:57:25 +02:00
Vadim Petrochenkov
a93fdfedf3 Merge rustc_allocator into libsyntax_ext 2019-07-24 12:27:58 +03:00
Aleksey Kladov
395ee0b79f Introduce rustc_lexer
The idea here is to make a reusable library out of the existing
rust-lexer, by separating out pure lexing and rustc-specific concerns,
like spans, error reporting an interning.

So, rustc_lexer operates directly on `&str`, produces simple tokens
which are a pair of type-tag and a bit of original text, and does not
report errors, instead storing them as flags on the token.
2019-07-20 21:12:34 +03:00
bjorn3
e8a1e73ff5 Update compiler_builtins to 0.1.18 2019-07-20 11:27:13 +02:00
Guillaume Gomez
9d6b29af5a Update pulldown-cmark version 2019-07-20 11:01:04 +02:00
Alex Crichton
9b4f6de7a4 azure: Prepare configuration for 4-core machines
This commit updates some of our assorted Azure/CI configuration to
prepare for some 4-core machines coming online. We're still in the
process of performance testing them to get final numbers, but some
changes are worth landing ahead of this. The updates here are:

* Use `C:/` instead of `D:/` for submodule checkout since it should have
  plenty of space and the 4-core machines won't have `D:/`

* Update `lzma-sys` to 0.1.14 which has support for VS2019, where 0.1.10
  doesn't.

* Update `src/ci/docker/run.sh` to work when it itself is running inside
  of a docker container (see the comment in the file for more info)

* Print step timings on the `try` branch in addition to the `auto`
  branch in. The logs there should be seen by similarly many humans (not
  many) and can be useful for performance analysis after a `try` build
  runs.

* Install the WIX and InnoSetup tools manually on Windows instead of
  relying on pre-installed copies on the VM. This gives us more control
  over what's being used on the Azure cloud right now (we control the
  version) and in the 4-core machines these won't be pre-installed. Note
  that on AppVeyor we actually already were installing InnoSetup, we
  just didn't carry that over on Azure!
2019-07-19 06:49:19 -07:00
Eric Huss
04538c680c Update mdbook, cargo, books
This updates the last of the books using mdbook 0.1, finally
removing it from the build.
2019-07-17 12:46:36 -07:00
topecongiro
3e9604b29e Update rustfmt to 1.3.3 2019-07-17 13:54:57 +09:00
Ralf Jung
85d76a1b48 bump compiler_builtins 2019-07-15 16:58:07 +02:00
Mazdak Farrokhzad
5e1891c474
Rollup merge of #62577 - Zoxc:atomic-cell, r=matthewjasper
Add an AtomicCell abstraction

Split out from https://github.com/rust-lang/rust/pull/61923.
2019-07-13 16:18:35 +02:00
Albin Stjerna
e775bf33c0 Upgrade Polonius 2019-07-12 22:41:00 +02:00
Matthew Jasper
34ddc70c3f Move rustc_borrowck -> rustc_ast_borrowck 2019-07-11 18:54:02 +01:00
Matthew Jasper
be085d7c0f Remove rustc_mir dependency from rustc_borrowck 2019-07-11 18:54:02 +01:00
John Kåre Alsaker
498bdc9b42 Add an AtomicCell abstraction 2019-07-10 17:04:42 +02:00
Eric Huss
03a4068152 Update cargo 2019-07-09 16:47:45 -07:00
Shotaro Yamada
b06ed52cfd Remove unused dependencies 2019-07-09 00:17:42 +09:00
Mateusz Mikuła
2ac20e2be6 Update phf to get rid of rand 0.4 2019-07-07 21:08:49 +02:00
John Kåre Alsaker
2caf5d9a5b Update Cargo.lock 2019-07-07 03:23:00 +02:00
André Luis Leal Cardoso Junior
f80697215f Add linkcheck command to rustbook tool 2019-07-06 11:05:22 -03:00
Mazdak Farrokhzad
a8f8c7c78c
Rollup merge of #62151 - alexcrichton:update-openssl, r=Mark-Simulacrum
Update linked OpenSSL version

This bumps our linked OpenSSL version from 1.1.1a to 1.1.1c, picking up
some various bug fixes and minor security issue fixes.
2019-07-06 02:37:53 +02:00
Alex Crichton
2fb2e00f20 Update the rust-installer submodule
This pulls in a commit which uses parallel xz encoding which should
hopefully help shave some time off the dist builders which spend an
inordinate amount of time compressing this data.
2019-07-04 11:59:09 -07:00
Alex Crichton
16b37b5027 Update linked OpenSSL version
This bumps our linked OpenSSL version from 1.1.1a to 1.1.1c, picking up
some various bug fixes and minor security issue fixes.
2019-06-26 05:39:07 -07:00
Yuki Okushi
85ea4a1bf4 Update new_debug_unreachable 2019-06-25 23:09:25 +09:00
Eric Huss
342fa2be25 Update cargo 2019-06-24 11:57:20 -07:00
Mark Rousskov
e17b02d9b9 Use walkdir crate
It's more efficient than the fs::read_dir API
2019-06-23 09:10:24 -04:00
Mark Rousskov
5f1da8e533 Cache Regex's 2019-06-23 09:10:08 -04:00
Guillaume Gomez
3eeb543504 Handle fs errors through errors::Handler instead of eprintln and panic 2019-06-21 12:00:49 +02:00
Eric Huss
2dafa91310 Update mdbook 2019-06-20 19:47:44 -07:00
topecongiro
5a411a65d0
Update rustfmt and rls
Update rustfmt to 1.3.0.
2019-06-19 23:54:31 +09:00
Eric Huss
afa4827e98 Bump libgit2-sys to get it to compile on i686-pc-windows-gnu. 2019-06-17 14:34:43 -07:00
Eric Huss
aedb74b8c3 Update cargo 2019-06-17 14:34:43 -07:00
Mazdak Farrokhzad
ca06f8896b
Rollup merge of #61720 - alexcrichton:libstd-cfg-if-dep, r=sfackler
std: Remove internal definitions of `cfg_if!` macro

This is duplicated in a few locations throughout the sysroot to work
around issues with not exporting a macro in libstd but still wanting it
available to sysroot crates to define blocks. Nowadays though we can
simply depend on the `cfg-if` crate on crates.io, allowing us to use it
from there!
2019-06-13 14:51:56 +02:00
Ralf Jung
4e8626e4af update miri 2019-06-13 10:03:12 +02:00
Laurențiu Nicola
b888eb92c5 Bump some of the crates using rand 2019-06-12 19:39:14 +03:00
Mazdak Farrokhzad
d78260d781
Rollup merge of #61568 - Mark-Simulacrum:symbol-fmt-macros, r=estebank
Use Symbol, Span in libfmt_macros

I'm not super happy with this, personally, but I think it might be a decent start -- happy to take suggestions as to how to expand this or change things further.

r? @estebank

Fixes #60795
2019-06-12 04:22:47 +02:00
Alex Crichton
8eb7f36a3b std: Remove internal definitions of cfg_if! macro
This is duplicated in a few locations throughout the sysroot to work
around issues with not exporting a macro in libstd but still wanting it
available to sysroot crates to define blocks. Nowadays though we can
simply depend on the `cfg-if` crate on crates.io, allowing us to use it
from there!
2019-06-10 10:58:44 -07:00
Mark Rousskov
dc13072b7b Use Symbol for named arguments in fmt_macros 2019-06-09 13:45:16 -06:00
Igor Matuszewski
eb5aa7583d Update RLS
This includes https://github.com/rust-lang/rls/pull/1482 which should
finally fix the spurious tests in Rust CI (test-pass -> test-fail).
2019-06-09 16:14:52 +02:00
Igor Matuszewski
31dc27da91 Update RLS 2019-06-08 22:17:01 +02:00
varkor
a31848350b Update compiler_builtins 2019-06-06 21:27:07 +01: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
Philipp Hansch
3f727aeeb7
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 is to eventually switch over to using the library instead of
maintaining our own diagnostics output.

This commit 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 contribute as well.

[as]: https://github.com/rust-lang/annotate-snippets-rs
2019-06-04 18:46:00 +02:00
Manish Goregaokar
8704947ad2 Update clippy 2019-06-03 16:00:38 -07:00
Mark Mansi
0f822d775f query-fy type_name 2019-06-02 23:20:36 -05:00
Mark Mansi
74919df3a9 query-ify const_field 2019-06-02 23:03:58 -05:00
Ralf Jung
4dfed4a0ca update miri 2019-06-02 23:12:40 +02:00
Eduard-Mihai Burtescu
961fe5479f rustc: use indexmap instead of a plain vector for upvars. 2019-06-01 19:17:22 +03:00
Amanieu d'Antras
a386a9edcc Bump hashbrown to 0.4.0
Fixes #61357
2019-06-01 10:29:23 +01:00
Eduard-Mihai Burtescu
9cf35bfbe7 rustc_codegen_utils: remove symbol name dumping/checking harness, and mw impl. 2019-05-31 18:24:55 +03:00
Eduard-Mihai Burtescu
6386a31c5b rustc_codegen_utils: update mw's symbol mangler implementation. 2019-05-31 18:24:54 +03:00
Eduard-Mihai Burtescu
0e5f27b169 rustc_codegen_utils: add harness for dumping/checking symbol names, and mw mangling impl. 2019-05-31 18:24:54 +03:00
Eduard-Mihai Burtescu
2092963a18 rustc_codegen_utils: add new mangling scheme implementation. 2019-05-31 18:24:42 +03:00
Eduard-Mihai Burtescu
654d0596d3 rustc_codegen_utils: test demangler output, not just symbol names. 2019-05-31 18:23:03 +03:00
Eduard-Mihai Burtescu
e898905141 Update rustc-demangle version. 2019-05-31 18:23:02 +03:00
Mazdak Farrokhzad
040af62a5a
Rollup merge of #60802 - euclio:pulldown-cmark-panic, r=GuillaumeGomez
upgrade rustdoc's `pulldown-cmark` to 0.5.2

Fixes #60482.
2019-05-30 10:52:48 +02:00
Andy Russell
ed8a4d5bc1
upgrade rustdoc's pulldown-cmark to 0.5.2
Fixes #60482.
2019-05-29 10:59:59 -04:00
Oliver Scherer
e84c9f3799
Rollup merge of #60885 - euclio:strip-synstructure-consts, r=GuillaumeGomez
strip synstructure consts from compiler docs

Fixes #60150.

Unfortunately this PR depends on the use of the deprecated `--passes` flag in bootstrap to keep the `--strip-hidden` pass while still documenting private items. I've opened #60884 to track stabilization of a new flag that encapsulates this behavior.

r? @QuietMisdreavus
2019-05-29 14:41:03 +02:00
Nicholas Nethercote
21f28448e0 Add to_symbol methods. 2019-05-27 14:05:02 +10:00
Oliver Scherer
2a789518b0 Update cargo lockfile 2019-05-26 19:21:54 +02:00
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
Mazdak Farrokhzad
2ac8ec0463
Rollup merge of #61095 - 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 (rust-lang/cargo#6979)
- cargo package: detect new empty directories (rust-lang/cargo#6973)
- Add message caching. (rust-lang/cargo#6933)
- Fix typo (rust-lang/cargo#6974)
- Set `Finished` line correctly for debug=0. (rust-lang/cargo#6971)
- Clippy fixes (rust-lang/cargo#6970)
- Remove rustdoc `can_add_color_process`. (rust-lang/cargo#6968)
- Document new `doctest` field. (rust-lang/cargo#6965)
- Update some man pages that missed --offline. (rust-lang/cargo#6964)
- add public & private prop tests. (rust-lang/cargo#6962)
- zsh completion: Pull list of commands from cargo --list (rust-lang/cargo#6956)
- Change docs "inequality" for semver requirement. (rust-lang/cargo#6963)
- Update im-rc requirement from 12.1.0 to 13.0.0 (rust-lang/cargo#6959)
- Add `doctest` field into metadata (rust-lang/cargo#6953)
2019-05-25 04:55:29 +02:00
Eric Huss
d5e03530f7 Update cargo 2019-05-23 13:27:49 -07:00
John Kåre Alsaker
5bcc80be10 Update Cargo.lock 2019-05-23 18:51:48 +02:00
Alex Crichton
e59f0cc0d3 Bump compiler-builtins to 0.1.15
This commit bumps the `compiler-builtins` dependency to 0.1.15 which
expects to have the source for `compiler-rt` provided externally if the
`c` feature is enabled. This then plumbs through the necessary support
in the build system to ensure that if the `llvm-project` directory is
checked out and present that we enable the `c` feature of
`compiler-builtins` and compile in all the C intrinsics.
2019-05-22 07:46:36 -07:00
Alex Crichton
3c9790e429 Update the compiler_builtins crate
This updates to 0.1.13 for `compiler_builtins`, published to fix a few
issues. The feature changes here are updated because `compiler_builtins`
no longer enables the `c` feature by default but we want to do so
through our build still.

Closes #60747
Closes #60782
2019-05-17 07:17:15 -07:00
Mazdak Farrokhzad
23d91e272b
Rollup merge of #60805 - euclio:filetime-dep, r=Mark-Simulacrum
remove compiletest's dependency on `filetime`
2019-05-17 02:54:14 +02:00
Andy Russell
c95be3d033
strip synstructure consts from compiler docs 2019-05-16 14:32:28 -04:00
Eric Huss
6a09cfab0b Update cargo 2019-05-16 10:31:13 -07:00
Wesley Wiser
ea93215576 Bump measureme dependency to 0.3
measureme@0.3 adds a version header to the binary file format which will
help reduce tool breakage in the future.
2019-05-13 22:15:55 -04:00
Andy Russell
01bc58c5ee
remove compiletest's dependency on filetime 2019-05-13 17:42:55 -04:00
Manish Goregaokar
d17713599c Update clippy 2019-05-11 09:02:12 -07:00
Mazdak Farrokhzad
f27f14b60f
Rollup merge of #60671 - euclio:extern-crate, r=Centril
remove unneeded `extern crate`s from build tools
2019-05-09 23:56:16 +02:00
Andy Russell
b2f71fb540
remove unneeded extern crates from build tools 2019-05-09 12:03:13 -04:00
Alex Crichton
7e8035593d std: Update compiler-builtins crate
Pulls in a fix for ensuring that wasm targets have code in
compiler-builtins for `ldexp` which LLVM can generate references to.
2019-05-08 06:59:24 -07:00
Eric Huss
fc72e56e78 Update cargo 2019-05-06 18:19:21 -07:00
varkor
80f54ba881 Update Cargo.lock 2019-05-05 10:45:10 +01:00
Vadim Petrochenkov
f5b5ca8b23 Revert Cargo.lock changes accidentally introduced during rebase 2019-05-05 00:12:38 +03:00
Jesper Steen Møller
5deec307f7 Fix #45268 by saving all NodeId's for resolved traits. 2019-05-04 20:29:33 +02:00
Dan Gohman
c07b52e29a Bump libc dependency to 0.2.54. 2019-05-03 23:01:24 -07:00
Mazdak Farrokhzad
9199bb5f81
Rollup merge of #60373 - rasendubi:lang-features-sort-since, r=Centril
Tidy: ensure lang features are sorted by since

This is the tidy side of https://github.com/rust-lang/rust/issues/60361.

What is left is actually splitting features into groups and sorting by since.

This PR also likely to produce a small (a couple of lines) merge conflict with https://github.com/rust-lang/rust/pull/60362.

r? @Centril
2019-05-03 16:24:56 +02:00
varkor
e72f7e1e56 Update getopts to 0.2.18
This is a proof-of-concept that the dependency unification fix works.
2019-05-02 21:47:14 +01:00
Alexey Shmalko
8b82f685a5 Make find_attr_val a little bit more precise
`find_attr_val(&line, "since")` returns `Some(", issue = ")` when
`line` is set to the following line:

```
[unstable(feature = "checked_duration_since", issue = "58402")]
```

Make `find_attr_val` use regex that is a little bit more
precise (requires `=` after key name).

It still does not handle all cases (e.g., extra leading chars in key
name, or escaped quotes in value), but is good enough for now.
2019-05-02 16:38:23 +03:00
Ralf Jung
71338fc305 update miri 2019-05-02 09:43:52 +02:00
Mazdak Farrokhzad
a7cbd92d13
Rollup merge of #60385 - nnethercote:earlier-metadata, r=alexcrichton
Emit metadata files earlier

This will make cargo pipelining much more effective.
2019-05-02 01:09:26 +02:00
Nicholas Nethercote
38dffeba21 Move metadata writing earlier.
The commit moves metadata writing from `link_binary` to
`encode_metadata` (and renames the latter as
`encode_and_write_metadata`). This is at the very start of code
generation.
2019-05-01 17:17:13 +10:00
Mazdak Farrokhzad
1ec56d8550
Rollup merge of #60238 - topecongiro:rustfmt-1.2.2, r=alexcrichton
Update rustfmt to 1.2.2
2019-04-30 03:28:37 +02:00
Manish Goregaokar
505cae2a76 Update clippy 2019-04-29 08:48:17 -07:00
topecongiro
710083c09d Update rustfmt to 1.2.2 2019-04-27 18:07:41 +09:00
John Kåre Alsaker
0e05a9bb85 Update rustc-rayon version 2019-04-26 19:08:36 +02:00
Mazdak Farrokhzad
878a7d6ea5
Rollup merge of #60134 - GuillaumeGomez:fix-index-page, r=Manishearth
Fix index-page generation

Fixes #60096.

The minifier was minifying crates name in `searchIndex` key position, which was a bit problematic for multiple reasons.

r? @rust-lang/rustdoc
2019-04-26 03:50:14 +02:00
Matthias Krüger
f9945f58e2 submodules: update clippy from 9897442f to 8c0e038f
Changes:
````
Rustup for https://github.com/rust-lang/rust/pull/59042
Update pulldown_cmark to 0.5
Only run AppVeyor on r+, try and the master branch
Remove approx_constant known problems
Suppress let_and_return if let has attributes
Add test for or_fun_call macro suggestion
UI test cleanup: Extract needless_range_loop tests
Change "if types change" to "if you later change the type"
````
2019-04-25 13:18:44 +02:00
Eric Huss
882352a279 Update cargo, books 2019-04-23 21:39:27 -07:00
Amanieu d'Antras
e7f162fdd8 Update hashbrown to 0.3.0 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
ae388773e1 Update hashbrown to 0.2.2 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
5253366e19 Update hashbrown to 0.2.1 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
1fa7a21534 Make libstd depend on the hashbrown crate 2019-04-24 06:54:14 +08:00
Guillaume Gomez
d676386b1e Fix index-page generation 2019-04-23 22:44:27 +02:00
Andy Russell
303016485b
upgrade rustdoc's pulldown-cmark to 0.4.1 2019-04-22 09:11:26 -04:00
Igor Matuszewski
4fb570dea7 Switch to serde-enabled rls-* and update RLS appropriately
This also bumps RLS version to 1.36.
The updated rls-* packages use serde but *not* serde_derive thanks to
manual proc macro expansion. This is a hack, since rustc cannot handle
crates.io proc macros (duplicated in tools) when cross-compiling, so
that's the best we can do in order to support serde_json in save-analysis.
2019-04-21 12:52:07 +02:00
Igor Matuszewski
25451967ee save-analysis: Use serde instead of libserialize to dump JSON data 2019-04-21 12:45:16 +02:00
bjorn3
93a3b414e3 Move almost all of cg_llvm/back/link.rs to cg_ssa 2019-04-20 13:21:40 +02:00
Matthias Krüger
7b959c69a2 submodules: update clippy from fbb3a47b to cafbe7f2
Changes:
````
Update compiletest_rs
Typo
Fix dogfood error
Add lint PathBufPushOverwrite
Update *.stderr file
Remove code duplication
Format code
Add test for debug_assert!(false)
Don't lint debug_assert!(false)
Add run-rustfix for option_map_or_none lint
Move two cast_lossless tests to their correct files
Change naive_bytecount applicability MaybeIncorrect
Add tests for declare_lint_pass and impl_lint_pass
Use lint pass macros
Document `declare_lint_pass!`
Fix lint_without_lint_pass internal lint
Use {get,match}_def_path from LateContext
Remove uplifted functions {get,match}_def_path from Clippy
Add run-rustfix for len_zero lint
Add run-rustfix for bool_comparison lint
Add run-rustfix for deref_addrof lint
while_let_loop uses placeholders in suggestions
Remove rust-toolchain file from clippy_dev
Update adding_lints.md
Update PULL_REQUEST_TEMPLATE
Add new lint checklist
Create PULL_REQUEST_TEMPLATE
Only suggest .copied() for Option right now
Also suggest .copied() when .clone() is called on a Copy type
Suggest .copied() instead of .cloned() in map_clone when dealing with references
Deny rustc internal lints
Remove clippy::default_hash_types internal lint
Enable -Zunstable-options in .cargo/config
````
2019-04-19 20:43:22 +02:00
topecongiro
ca19ffe13f Update rustfmt to 1.2.1 2019-04-18 07:46:16 +09:00
Eric Huss
df7445b780 Update cargo 2019-04-16 11:01:01 -07:00
John Kåre Alsaker
b82ab24bbf Preallocate BUILTIN_ATTRIBUTES symbols and use a hash map instead of looping 2019-04-15 15:20:05 +02:00
John Kåre Alsaker
10855a36b5 Use a proc macro to declare preallocated symbols 2019-04-15 07:23:01 +02:00
Mazdak Farrokhzad
b9da8a7144
Rollup merge of #59856 - albins:update-polonius, r=nikomatsakis
update polonius-engine

This updates polonius-engine to [version 0.7.0](https://github.com/rust-lang/polonius/blob/master/RELEASES.md#v070), which adds a hybrid algorithm that starts off with performing a cheaper, location-insensitive analysis before proceeding with the full analysis.

r? @nikomatsakis
2019-04-14 17:49:18 +02:00
Ralf Jung
3f858516c0 update miri 2019-04-14 11:02:18 +02:00
Wesley Wiser
56e434d84d Use measureme in self-profiler
Related to #58372
Related to #58967
2019-04-12 20:27:29 -04:00
Albin Stjerna
c440c0a0fd update polonius-engine 2019-04-10 22:44:07 +02:00
John Kåre Alsaker
7b28ddc39d Update Cargo.lock 2019-04-10 21:18:35 +02:00
Matthias Krüger
beeeb4360e update Cargo.lock 2019-04-09 10:50:08 +02:00
Jacob Greenfield
28ea249ab5
Revert "Auto merge of #57842 - gnzlbg:extract_libtest, r=gnzlbg"
This reverts commit 3eb4890dfe, reversing
changes made to 7a4df3b53d.
2019-04-07 03:16:31 -04:00
Alex Crichton
1bf04c9ad7 std: Upgrade compiler_builtins to fix wasi linkage
Turns out we needed to exclude a number of math functions on the
`wasm32-unknown-wasi` target, and this was fixed in 0.1.9 of
compiler-builtins and this is pulling in the fix to libstd's own build.
2019-04-04 11:24:53 -07:00
Mazdak Farrokhzad
2074c9687f
Rollup merge of #59555 - RalfJung:miri, r=oli-obk
update miri

r? @oli-obk

Fixes https://github.com/rust-lang/rust/issues/59477
2019-04-04 15:09:00 +02:00
Petr Hosek
86d1678403 Support using LLVM's libunwind as the unwinder implementation
This avoids the dependency on host libraries such as libgcc_s which
may be undesirable in some deployment environments where these aren't
available.
2019-04-03 11:21:40 -07:00
Ralf Jung
087999ef58 try to fix rand feature flags 2019-04-03 14:02:57 +01:00
Mazdak Farrokhzad
274f80e4d4
Rollup merge of #59533 - Zoxc:arena-slices, r=michaelwoerister
Support allocating iterators with arenas

Split out from https://github.com/rust-lang/rust/pull/57173.

r? @michaelwoerister
2019-04-02 13:47:27 +02:00
Mazdak Farrokhzad
e655b91b7a
Rollup merge of #59452 - GuillaumeGomez:speedup-rustdoc, r=QuietMisdreavus
Speed up rustdoc run a bit

r? @QuietMisdreavus
2019-04-02 13:47:25 +02:00
John Kåre Alsaker
30e7e9c5f0 Support allocating iterators with arenas 2019-04-01 21:47:55 +02:00
Eric Huss
d2228ca2a5 Update cargo 2019-03-30 09:35:01 -07:00
Alex Crichton
ace71240d2 Add a new wasm32-unknown-wasi target
This commit adds a new wasm32-based target distributed through rustup,
supported in the standard library, and implemented in the compiler. The
`wasm32-unknown-wasi` target is intended to be a WebAssembly target
which matches the [WASI proposal recently announced.][LINK]. In summary
the WASI target is an effort to define a standard set of syscalls for
WebAssembly modules, allowing WebAssembly modules to not only be
portable across architectures but also be portable across environments
implementing this standard set of system calls.

The wasi target in libstd is still somewhat bare bones. This PR does not
fill out the filesystem, networking, threads, etc. Instead it only
provides the most basic of integration with the wasi syscalls, enabling
features like:

* `Instant::now` and `SystemTime::now` work
* `env::args` is hooked up
* `env::vars` will look up environment variables
* `println!` will print to standard out
* `process::{exit, abort}` should be hooked up appropriately

None of these APIs can work natively on the `wasm32-unknown-unknown`
target, but with the assumption of the WASI set of syscalls we're able
to provide implementations of these syscalls that engines can implement.
Currently the primary engine implementing wasi is [wasmtime], but more
will surely emerge!

In terms of future development of libstd, I think this is something
we'll probably want to discuss. The purpose of the WASI target is to
provide a standardized set of syscalls, but it's *also* to provide a
standard C sysroot for compiling C/C++ programs. This means it's
intended that functions like `read` and `write` are implemented for this
target with a relatively standard definition and implementation. It's
unclear, therefore, how we want to expose file descriptors and how we'll
want to implement system primitives. For example should `std::fs::File`
have a libc-based file descriptor underneath it? The raw wasi file
descriptor? We'll see! Currently these details are all intentionally
hidden and things we can change over time.

A `WasiFd` sample struct was added to the standard library as part of
this commit, but it's not currently used. It shows how all the wasi
syscalls could be ergonomically bound in Rust, and they offer a possible
implementation of primitives like `std::fs::File` if we bind wasi file
descriptors exactly.

Apart from the standard library, there's also the matter of how this
target is integrated with respect to its C standard library. The
reference sysroot, for example, provides managment of standard unix file
descriptors and also standard APIs like `open` (as opposed to the
relative `openat` inspiration for the wasi ssycalls). Currently the
standard library relies on the C sysroot symbols for operations such as
environment management, process exit, and `read`/`write` of stdio fds.
We want these operations in Rust to be interoperable with C if they're
used in the same process. Put another way, if Rust and C are linked into
the same WebAssembly binary they should work together, but that requires
that the same C standard library is used.

We also, however, want the `wasm32-unknown-wasi` target to be
usable-by-default with the Rust compiler without requiring a separate
toolchain to get downloaded and configured. With that in mind, there's
two modes of operation for the `wasm32-unknown-wasi` target:

1. By default the C standard library is statically provided inside of
   `liblibc.rlib` distributed as part of the sysroot. This means that
   you can `rustc foo.wasm --target wasm32-unknown-unknown` and you're
   good to go, a fully workable wasi binary pops out. This is
   incompatible with linking in C code, however, which may be compiled
   against a different sysroot than the Rust code was previously
   compiled against. In this mode the default of `rust-lld` is used to
   link binaries.

2. For linking with C code, the `-C target-feature=-crt-static` flag
   needs to be passed. This takes inspiration from the musl target for
   this flag, but the idea is that you're no longer using the provided
   static C runtime, but rather one will be provided externally. This
   flag is intended to also get coupled with an external `clang`
   compiler configured with its own sysroot. Therefore you'll typically
   use this flag with `-C linker=/path/to/clang-script-wrapper`. Using
   this mode the Rust code will continue to reference standard C
   symbols, but the definition will be pulled in by the linker configured.

Alright so that's all the current state of this PR. I suspect we'll
definitely want to discuss this before landing of course! This PR is
coupled with libc changes as well which I'll be posting shortly.

[LINK]:
[wasmtime]:
2019-03-29 15:58:17 -07:00
Mazdak Farrokhzad
38af98ee5f
Rollup merge of #59454 - topecongiro:rustfmt-1.2.0, r=nrc
Update rustfmt to 1.2.0

This release includes bug fixes and performance improvements from 1.1.0. Also it adds a new rustfmt tool attribute `#[rustfmt::skip::macros]`, which lets you skip formatting macro calls of your choice.

cc @nrc @Centril @Xanewok
2019-03-29 12:32:23 +01:00
Mazdak Farrokhzad
8e0855b5b7
Rollup merge of #59436 - gnzlbg:update_jemalloc, r=alexcrichton
Update jemalloc-sys to version 0.3.0

This PR updates jemalloc-sys from 0.1.8 to 0.3.0.
2019-03-29 12:32:21 +01:00
Guillaume Gomez
7f2c726d6c Speed up rustdoc run a bit 2019-03-27 19:07:48 +01:00
varkor
3683f51352 Update ena to version 0.13.0 2019-03-27 09:44:55 +00:00
varkor
443a2d4f86 Update ena 2019-03-27 09:44:55 +00:00
topecongiro
c728ae0fd1 Update rustfmt to 1.2.0 2019-03-27 10:42:13 +09:00
gnzlbg
b73886d947 Update Cargo.lock 2019-03-26 13:10:54 +01:00