Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
rust-lang/rust
0xAX/rust
12234/rust
4414/rust
APTy/rust
Acidburn0zzz/rust-lang
AerialX/rust
Alinuxfriend/rust
Arreth/rust
CNXTEoEorg/rust
DanielJCampbell/rust
DiamondLovesYou/rust
EllieAdam/rust
Epictetus/rust
GulajavaMinistudio/rust
JamesLinus/rust
MabezDev/rust-xtensa
Manishearth/rust
Nashenas88/rust
NickPepper/rust
P1start/rust
Raul630/rust
SONNYROBOT/rust
Tengfei1010/rust
XAMPPRocky/rust
XiangQingW/rust
Yoric/rust
Zoxc/rust
abossard/rust
alanfalloon/rust
alex/rust
alexcrichton/rust
alexrp/rust
alistra/rust
anasazi/rust
apoelstra/rust
arkaitzj/rust
atris/rust
avr-rust/rust
bendotc/rust
benjaminjackman/rust
berkus/rust
bjadamson/rust
bklooste/rust
blorf/rust-on-gpu
brianloveswords/rust
brson/rust
caiges/rust
catamorphism/rust
cavedweller/rust
charliesome/rust
chengky/rust
chirag08/rust
chmodawk/rust
chrisdew/rust
cjfrisz/rust
crabtw/rust
csae1152/rust
da-x/rust
dbp/rust
delewit/rust
dobkeratops/rust
dojotech/rust
drhodes/rust
driax/rust
eddyb/rust
eholk/rust
ehsan/rust
elliottslaughter/rust
elly/rust
erickt/rust
erikrose/rust
espadrine/rust
eter360/rust
funkill/rust
fzzzy/rust
gilescope/rust
glaubitz/rust
gmfawcett/rust
gordonlw/rust
grahame/rust
graydon/rust
green-panther/rust
gwillen/rust
harnoor992/rust
ids1024/rust
ischeinkman/libnx-rs-std
j-clark/rust
jamorton/rust
janus/rust
jdm/rust
jeanpuga/rust
jensnockert/rust
jld/rust
joelgarciajr84/rust
johnterickson/rust
jorendorff/rust
jrgold/rust
jruderman/rust
jwatt/rust
jwilberding/rust
jwise/rust
jyasskin/rust
kevina/rust
killerswan/rust
kleimkuhler/rust
kosslab-kr/rust
kumasento/rust
levonlloyd/rust
lht/rust
liigo/rust
liufeigit/rust
lkuper/rust
logie17/rust
lunarpulse/rust
macressler/rust
masondesu/rust
matricks/rust
mbrubeck/rust
mcandre/rust
megakorre/rust
mhenes/rust
michaelwoerister/rust
milkowski/rust
miselin/rust
mitsuhiko/rust
mmeyerho/rust
mneumann/rust
mounir34/rust
mpark/rust
mrmonday/rust
mujiatong/rust
muyayo/rust
nathanielherman/rust
nbaksalyar/rust
nbp/rust
nielx/rust
nikomatsakis/rust
nrc/rust
oyiptong/rust
ozzie00/rust
pcwalton/rust
pkarvou/rust
poiru/rust
pwoolcoc/rust
rbancroft/rust
redox-os/rust
reuben/rust
robyoung/rust
rozbb/rust
rpearl/rust
rtanglao/rust
rust-highfive/rust
rustlang/rust
rusty-horizon/horizon-nx-std
rwaldron/rust
samgiles/rust
sarojaba/rust-doc-korean
sayrer/rust
sdeniskos/rust
semarie/rust
sferik/rust
shepmaster/rust
shinglyu/rust
shinta42/rust
sigma318/rust
smaeul/rust
songshaodong/rust
stereotype441/rust
steveklabnik/rust
strangeglyph/rust
sunlightboy/rust
tbu-/rust
tclfs/rust
tedhorst/rust
tfviv79/rust
thomaslee/rust
tohava/rust
tomaka/rust
toshok/rust
tromey/rust
trulliandloeb/rust
tshakah/rust
uasi/rust
vadimcn/rust
varkor/rust
vendula/rust
vhbit/rust
vy12021/rust
waywardmonkeys/rust
webea/rust
wesj/rust
whtoo/rust
williamw520/rust
wilsonk/rust
withoutboats/rust
yamidevs/rust
yodalee/rust
ysbaddaden/rust
zhaobr/rust
Nothing to show
base: 3bcda48a30b21e46b81a7989deb30a3ba85fb918
Choose a Head Repository
rust-lang/rust
0xAX/rust
12234/rust
4414/rust
APTy/rust
Acidburn0zzz/rust-lang
AerialX/rust
Alinuxfriend/rust
Arreth/rust
CNXTEoEorg/rust
DanielJCampbell/rust
DiamondLovesYou/rust
EllieAdam/rust
Epictetus/rust
GulajavaMinistudio/rust
JamesLinus/rust
MabezDev/rust-xtensa
Manishearth/rust
Nashenas88/rust
NickPepper/rust
P1start/rust
Raul630/rust
SONNYROBOT/rust
Tengfei1010/rust
XAMPPRocky/rust
XiangQingW/rust
Yoric/rust
Zoxc/rust
abossard/rust
alanfalloon/rust
alex/rust
alexcrichton/rust
alexrp/rust
alistra/rust
anasazi/rust
apoelstra/rust
arkaitzj/rust
atris/rust
avr-rust/rust
bendotc/rust
benjaminjackman/rust
berkus/rust
bjadamson/rust
bklooste/rust
blorf/rust-on-gpu
brianloveswords/rust
brson/rust
caiges/rust
catamorphism/rust
cavedweller/rust
charliesome/rust
chengky/rust
chirag08/rust
chmodawk/rust
chrisdew/rust
cjfrisz/rust
crabtw/rust
csae1152/rust
da-x/rust
dbp/rust
delewit/rust
dobkeratops/rust
dojotech/rust
drhodes/rust
driax/rust
eddyb/rust
eholk/rust
ehsan/rust
elliottslaughter/rust
elly/rust
erickt/rust
erikrose/rust
espadrine/rust
eter360/rust
funkill/rust
fzzzy/rust
gilescope/rust
glaubitz/rust
gmfawcett/rust
gordonlw/rust
grahame/rust
graydon/rust
green-panther/rust
gwillen/rust
harnoor992/rust
ids1024/rust
ischeinkman/libnx-rs-std
j-clark/rust
jamorton/rust
janus/rust
jdm/rust
jeanpuga/rust
jensnockert/rust
jld/rust
joelgarciajr84/rust
johnterickson/rust
jorendorff/rust
jrgold/rust
jruderman/rust
jwatt/rust
jwilberding/rust
jwise/rust
jyasskin/rust
kevina/rust
killerswan/rust
kleimkuhler/rust
kosslab-kr/rust
kumasento/rust
levonlloyd/rust
lht/rust
liigo/rust
liufeigit/rust
lkuper/rust
logie17/rust
lunarpulse/rust
macressler/rust
masondesu/rust
matricks/rust
mbrubeck/rust
mcandre/rust
megakorre/rust
mhenes/rust
michaelwoerister/rust
milkowski/rust
miselin/rust
mitsuhiko/rust
mmeyerho/rust
mneumann/rust
mounir34/rust
mpark/rust
mrmonday/rust
mujiatong/rust
muyayo/rust
nathanielherman/rust
nbaksalyar/rust
nbp/rust
nielx/rust
nikomatsakis/rust
nrc/rust
oyiptong/rust
ozzie00/rust
pcwalton/rust
pkarvou/rust
poiru/rust
pwoolcoc/rust
rbancroft/rust
redox-os/rust
reuben/rust
robyoung/rust
rozbb/rust
rpearl/rust
rtanglao/rust
rust-highfive/rust
rustlang/rust
rusty-horizon/horizon-nx-std
rwaldron/rust
samgiles/rust
sarojaba/rust-doc-korean
sayrer/rust
sdeniskos/rust
semarie/rust
sferik/rust
shepmaster/rust
shinglyu/rust
shinta42/rust
sigma318/rust
smaeul/rust
songshaodong/rust
stereotype441/rust
steveklabnik/rust
strangeglyph/rust
sunlightboy/rust
tbu-/rust
tclfs/rust
tedhorst/rust
tfviv79/rust
thomaslee/rust
tohava/rust
tomaka/rust
toshok/rust
tromey/rust
trulliandloeb/rust
tshakah/rust
uasi/rust
vadimcn/rust
varkor/rust
vendula/rust
vhbit/rust
vy12021/rust
waywardmonkeys/rust
webea/rust
wesj/rust
whtoo/rust
williamw520/rust
wilsonk/rust
withoutboats/rust
yamidevs/rust
yodalee/rust
ysbaddaden/rust
zhaobr/rust
Nothing to show
compare: 45fba43b3d5b4d1944268cf973099bfacb11bf4c
Commits on Jan 18, 2018
Document the behaviour of infinite iterators on potentially-computabl…
…e methods

It’s not entirely clear from the current documentation what behaviour
calling a method such as `min` on an infinite iterator like `RangeFrom`
is. One might expect this to terminate, but in fact, for infinite
iterators, `min` is always nonterminating (at least in the standard
library). This adds a quick note about this behaviour for clarification.
Commits on Jan 19, 2018
Commits on Jan 21, 2018
Commits on Jan 26, 2018
derive PartialEq and Eq for `ParseCharError`
unlike the other Parse*Error types, ParseCharError didn't have these implemented for whatever reason
Commits on Jan 28, 2018
Commits on Jan 29, 2018
Create a directory for --out-dir if it does not already exist
Currently if `--out-dir` is set to a non-existent directory, the
compiler will throw unfriendly messages like `error: could not write
output to subdir/example.crate.allocator.rcgu.o: No such file or
directory`, which, while not completely unreadable, isn’t very
user-friendly either. This change creates the directory automatically
if it does not yet exist.
Commits on Feb 05, 2018
Commits on Feb 07, 2018
Fix ICE for mismatched args on target without span
Commit 7ed00ca improved our error reporting by including the target
function in our error messages when there is an argument count mismatch.
A simple example from the UI tests is:

```
error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 0 arguments
  --> $DIR/closure-arg-count.rs:32:53
   |
32 |     let _it = vec![1, 2, 3].into_iter().enumerate().map(foo);
   |                                                     ^^^ expected function that takes a single 2-tuple as argument
...
44 | fn foo() {}
   | -------- takes 0 arguments
```

However, this assumed the target span was always available. This does
not hold true if the target function is in `std` or another crate. A
simple example from #48046 is assigning `str::split` to a function type
with a different number of arguments.

Fix by removing all of the labels and suggestions related to the target
span when it's not found.

Fixes #48046
Commits on Feb 08, 2018
Add `rustc_args_required_const` to the feature whitelist
Unfortunately left out it means that when the `#![feature(proc_macro)]` flag is
in effect it fails to find `rustc_args_required_const` for expansion. This
version, however, is verified to work with stdsimd's requirements!
Disallow function pointers to #[rustc_args_required_const]
This commit disallows acquiring a function pointer to functions tagged as
`#[rustc_args_required_const]`. This is intended to be used as future-proofing
for the stdsimd crate to avoid taking a function pointer to any intrinsic which
has a hard requirement that one of the arguments is a constant value.
Commits on Feb 09, 2018
rustbuild: Pass `ccache` to build scripts
Right now the ccache setting is only used for LLVM, but this tweaks it to also
be used for build scripts so C++ builds like `librustc_llvm` can be a bit
speedier.
ci: Actually bootstrap on i686 dist
Right now the `--build` option was accidentally omitted, so we're bootstraping
from `x86_64` to `i686`. In addition to being slower (more compiles) that's not
actually bootstrapping!
Add fetch_nand.
cc #13226 (the tracking issue)
Commits on Feb 10, 2018
rustc: Upgrade to LLVM 6
The following submodules have been updated for a new version of LLVM:

- `src/llvm`
- `src/libcompiler_builtins` - transitively contains compiler-rt
- `src/dlmalloc`

This also updates the docker container for dist-i686-freebsd as the old 16.04
container is no longer capable of building LLVM. The
compiler-rt/compiler-builtins and dlmalloc updates are pretty routine without
much interesting happening, but the LLVM update here is of particular note.
Unlike previous updates I haven't cherry-picked all existing patches we had on
top of our LLVM branch as we have a [huge amount][patches4] and have at this
point forgotten what most of them are for. Instead I started from the current
`release_60` branch in LLVM and only applied patches that were necessary to get
our tests working and building.

The current set of custom rustc-specific patches included in this LLVM update are:

* rust-lang/llvm@1187443 - this is how we actually implement
  `cfg(target_feature)` for now and continues to not be upstreamed. While a
  hazard for SIMD stabilization this commit is otherwise keeping the status
  quo of a small rustc-specific feature.
* rust-lang/llvm@013f2ec - this is a rustc-specific optimization that we haven't
  upstreamed, notably teaching LLVM about our allocation-related routines (which
  aren't malloc/free). Once we stabilize the global allocator routines we will
  likely want to upstream this patch, but for now it seems reasonable to keep it
  on our fork.
* rust-lang/llvm@a65bbfd - I found this necessary to fix compilation of LLVM in
  our 32-bit linux container. I'm not really sure why it's necessary but my
  guess is that it's because of the absolutely ancient glibc that we're using.
  In any case it's only updating pieces we're not actually using in LLVM so I'm
  hoping it'll turn out alright. This doesn't seem like something we'll want to
  upstream.c
* rust-lang/llvm@77ab1f0 - this is what's actually enabling LLVM to build in our
  i686-freebsd container, I'm not really sure what's going on but we for sure
  probably don't want to upstream this and otherwise it seems not too bad for
  now at least.
* rust-lang/llvm@9eb9267 - we currently suffer on MSVC from an [upstream bug]
  which although diagnosed to a particular revision isn't currently fixed
  upstream (and the bug itself doesn't seem too active). This commit is a
  partial revert of the suspected cause of this regression (found via a
  bisection). I'm sort of hoping that this eventually gets fixed upstream with a
  similar fix (which we can replace in our branch), but for now I'm also hoping
  it's a relatively harmless change to have.

After applying these patches (plus one [backport] which should be [backported
upstream][llvm-back]) I believe we should have all tests working on all
platforms in our current test suite. I'm like 99% sure that we'll need some more
backports as issues are reported for LLVM 6 when this propagates through
nightlies, but that's sort of just par for the course nowadays!

In any case though some extra scrutiny of the patches here would definitely be
welcome, along with scrutiny of the "missing patches" like a [change to pass
manager order](rust-lang/llvm@2717444), [another change to pass manager
order](rust-lang/llvm@c782feb), some [compile fixes for
sparc](rust-lang/llvm@1a83de6), and some [fixes for
solaris](rust-lang/llvm@c2bfe0a).

[patches4]: rust-lang/llvm@5401fdf...rust-llvm-release-4-0-1
[backport]: rust-lang/llvm@5c54c25
[llvm-back]: https://bugs.llvm.org/show_bug.cgi?id=36114
[upstream bug]: https://bugs.llvm.org/show_bug.cgi?id=36096

---

The update to LLVM 6 is desirable for a number of reasons, notably:

* This'll allow us to keep up with the upstream wasm backend, picking up new
  features as they start landing.
* Upstream LLVM has fixed a number of SIMD-related compilation errors,
  especially around AVX-512 and such.
* There's a few assorted known bugs which are fixed in LLVM 5 and aren't fixed
  in the LLVM 4 branch we're using.
* Overall it's not a great idea to stagnate with our codegen backend!

This update is mostly powered by #47730 which is allowing us to update LLVM
*independent* of the version of LLVM that Emscripten is locked to. This means
that when compiling code for Emscripten we'll still be using the old LLVM 4
backend, but when compiling code for any other target we'll be using the new
LLVM 6 target. Once Emscripten updates we may no longer need this distinction,
but we're not sure when that will happen!

Closes #43370
Closes #43418
Closes #47015
Closes #47683
Closes rust-lang-nursery/stdsimd#157
Closes rust-lang-nursery/rust-wasm#3
Auto merge of #47828 - alexcrichton:llvm-6, r=nikomatsakis
rustc: Upgrade to LLVM 6

The following submodules have been updated for a new version of LLVM:

- `src/llvm`
- `src/libcompiler_builtins` - transitively contains compiler-rt
- `src/dlmalloc`

This also updates the docker container for dist-i686-freebsd as the old 16.04
container is no longer capable of building LLVM. The
compiler-rt/compiler-builtins and dlmalloc updates are pretty routine without
much interesting happening, but the LLVM update here is of particular note.
Unlike previous updates I haven't cherry-picked all existing patches we had on
top of our LLVM branch as we have a [huge amount][patches4] and have at this
point forgotten what most of them are for. Instead I started from the current
`release_60` branch in LLVM and only applied patches that were necessary to get
our tests working and building.

The [current set of custom rustc-specific patches](rust-lang/llvm@f128612...rust-llvm-release-6-0-0) included in this LLVM update are:

* rust-lang/llvm@1187443 - this is how we actually implement
  `cfg(target_feature)` for now and continues to not be upstreamed. While a
  hazard for SIMD stabilization this commit is otherwise keeping the status
  quo of a small rustc-specific feature.
* rust-lang/llvm@013f2ec - this is a rustc-specific optimization that we haven't
  upstreamed, notably teaching LLVM about our allocation-related routines (which
  aren't malloc/free). Once we stabilize the global allocator routines we will
  likely want to upstream this patch, but for now it seems reasonable to keep it
  on our fork.
* rust-lang/llvm@a65bbfd - I found this necessary to fix compilation of LLVM in
  our 32-bit linux container. I'm not really sure why it's necessary but my
  guess is that it's because of the absolutely ancient glibc that we're using.
  In any case it's only updating pieces we're not actually using in LLVM so I'm
  hoping it'll turn out alright. This doesn't seem like something we'll want to
  upstream.c
* rust-lang/llvm@77ab1f0 - this is what's actually enabling LLVM to build in our
  i686-freebsd container, I'm not really sure what's going on but we for sure
  probably don't want to upstream this and otherwise it seems not too bad for
  now at least.
* rust-lang/llvm@9eb9267 - we currently suffer on MSVC from an [upstream bug]
  which although diagnosed to a particular revision isn't currently fixed
  upstream (and the bug itself doesn't seem too active). This commit is a
  partial revert of the suspected cause of this regression (found via a
  bisection). I'm sort of hoping that this eventually gets fixed upstream with a
  similar fix (which we can replace in our branch), but for now I'm also hoping
  it's a relatively harmless change to have.

After applying these patches (plus one [backport] which should be [backported
upstream][llvm-back]) I believe we should have all tests working on all
platforms in our current test suite. I'm like 99% sure that we'll need some more
backports as issues are reported for LLVM 6 when this propagates through
nightlies, but that's sort of just par for the course nowadays!

In any case though some extra scrutiny of the patches here would definitely be
welcome, along with scrutiny of the "missing patches" like a [change to pass
manager order](rust-lang/llvm@2717444), [another change to pass manager
order](rust-lang/llvm@c782feb), some [compile fixes for
sparc](rust-lang/llvm@1a83de6), and some [fixes for
solaris](rust-lang/llvm@c2bfe0a).

[patches4]: rust-lang/llvm@5401fdf...rust-llvm-release-4-0-1
[backport]: rust-lang/llvm@5c54c25
[llvm-back]: https://bugs.llvm.org/show_bug.cgi?id=36114
[upstream bug]: https://bugs.llvm.org/show_bug.cgi?id=36096

---

The update to LLVM 6 is desirable for a number of reasons, notably:

* This'll allow us to keep up with the upstream wasm backend, picking up new
  features as they start landing.
* Upstream LLVM has fixed a number of SIMD-related compilation errors,
  especially around AVX-512 and such.
* There's a few assorted known bugs which are fixed in LLVM 5 and aren't fixed
  in the LLVM 4 branch we're using.
* Overall it's not a great idea to stagnate with our codegen backend!

This update is mostly powered by #47730 which is allowing us to update LLVM
*independent* of the version of LLVM that Emscripten is locked to. This means
that when compiling code for Emscripten we'll still be using the old LLVM 4
backend, but when compiling code for any other target we'll be using the new
LLVM 6 target. Once Emscripten updates we may no longer need this distinction,
but we're not sure when that will happen!

Closes #43370
Closes #43418
Closes #47015
Closes #47683
Closes rust-lang-nursery/stdsimd#157
Closes rust-lang-nursery/rust-wasm#3
Rollup merge of #47790 - tinaun:patch-1, r=sfackler
derive PartialEq and Eq for `ParseCharError`

unlike the other Parse*Error types, ParseCharError didn't have these implemented for whatever reason
Rollup merge of #47835 - Mark-Simulacrum:remove-data-structs, r=nikom…
…atsakis

Remove unused data structures

Cleanup; as far as I can tell the compiler no longer uses these.
Rollup merge of #47854 - varkor:create-out-dir, r=pnkfelix
Create a directory for --out-dir if it does not already exist

Currently if `--out-dir` is set to a non-existent directory, the compiler will throw unfriendly messages like `error: could not write output to subdir/example.crate.allocator.rcgu.o: No such file or
directory`, which, while not completely unreadable, isn’t very user-friendly either. This change creates the directory automatically if it does not yet exist.
Rollup merge of #48015 - o01eg:disableable-installation, r=alexcrichton
Customizable extended tools

This PR adds `build.tools` option to manage installation of extended rust tools.

By default it doesn't change installation. All tools are built and `rls` and `rustfmt` allowed to fail installation.

If some set of tools chosen only those tools are built and installed without any fails allowed.

It solves some slotting issues with extended build enabled: https://bugs.gentoo.org/show_bug.cgi?id=645498
Rollup merge of #48047 - etaoins:fix-ice-for-mismatched-args-on-targe…
…t-without-span, r=estebank

Fix ICE for mismatched args on target without span

Commit 7ed00ca improved our error reporting by including the target function in our error messages when there is an argument count mismatch. A simple example from the UI tests is:

```
error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 0 arguments
  --> $DIR/closure-arg-count.rs:32:53
   |
32 |     let _it = vec![1, 2, 3].into_iter().enumerate().map(foo);
   |                                                     ^^^ expected function that takes a single 2-tuple as argument
...
44 | fn foo() {}
   | -------- takes 0 arguments
```

However, this assumed the target span was always available. This does not hold true if the target function is in `std` or another crate. A simple example from #48046 is assigning `str::split` to a function type with a different number of arguments.

Fix by omitting all of the labels and suggestions related to the target span when it's not found.

Fixes #48046

r? @estebank
Rollup merge of #48051 - ollie27:rustdoc_fn_unit_return, r=QuietMisdr…
…eavus

rustdoc: Hide `-> ()` in cross crate inlined Fn* bounds
Rollup merge of #48058 - cuviper:binaryen-gcc8, r=alexcrichton
Update binaryen to fix -Werror with GCC 8

r? @alexcrichton
Rollup merge of #48059 - alexcrichton:sccachebs, r=Mark-Simulacrum
rustbuild: Pass `ccache` to build scripts

Right now the ccache setting is only used for LLVM, but this tweaks it to also
be used for build scripts so C++ builds like `librustc_llvm` can be a bit
speedier.
Rollup merge of #48064 - Manishearth:intra-doc-bail, r=QuietMisdreavus
intra-doc-links: bail early for linky things

r? @QuietMisdreavus
Rollup merge of #48078 - alexcrichton:fix-required-const-and-proc-mac…
…ro, r=eddyb

Disallow function pointers to #[rustc_args_required_const]

This commit disallows acquiring a function pointer to functions tagged as
`#[rustc_args_required_const]`. This is intended to be used as future-proofing
for the stdsimd crate to avoid taking a function pointer to any intrinsic which
has a hard requirement that one of the arguments is a constant value.

Note that the first commit here isn't related specifically to this feature, but was necessary to get this working in stdsimd!
Rollup merge of #48080 - GuillaumeGomez:mobile-docs-fixes, r=QuietMis…
…dreavus

Hide theme button under menu in mobile mode and fix top margin issue …

Fixes #48060.

r? @QuietMisdreavus
Rollup merge of #48086 - Zoxc:gen-fix, r=nikomatsakis
Fix visitation order of calls so that it matches execution order. Fixes #48048

r? @nikomatsakis
Rollup merge of #48098 - alexcrichton:fix-i686-dist-bootstrap, r=Mark…
…-Simulacrum

ci: Actually bootstrap on i686 dist

Right now the `--build` option was accidentally omitted, so we're bootstraping
from `x86_64` to `i686`. In addition to being slower (more compiles) that's not
actually bootstrapping!
Rollup merge of #48107 - matthiaskrgr:typo__substract_to_subtract, r=…
…kennytm

fix typo: substract -> subtract
Rollup merge of #48100 - Mark-Simulacrum:fetch-nand, r=alexcrichton
Add fetch_nand to atomics

I think this is all fine but I have little familiarity with the atomic code (or libcore in general) so I may have accidentally done something wrong here...

cc #13226 (the tracking issue)
Update the dlmalloc submodule
A bug was recently fixed in dlmalloc which meant that released memory to the
system accidentally wasn't getting reused, causing programs to be far slower
than they should be!
Explain unusual debugging code in librustc
Introduced in #47828 to help track down some bugs, it landed a bit hastily so
this is intended on cleaning it up a bit.
Rollup merge of #48085 - alexcrichton:update-dlmalloc, r=Mark-Simulacrum
Update the dlmalloc submodule

A bug was recently fixed in dlmalloc which meant that released memory to the
system accidentally wasn't getting reused, causing programs to be far slower
than they should be!
Rollup merge of #48120 - matthiaskrgr:typos_src_1, r=alexcrichton
fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}}

via codespell
Rollup merge of #48124 - alexcrichton:clean-up-debugging, r=kennytm
Explain unusual debugging code in librustc

Introduced in #47828 to help track down some bugs, it landed a bit hastily so
this is intended on cleaning it up a bit.
Rollup merge of #47547 - varkor:infinite-iterators-warning-doc, r=fre…
…wsxcv

Document the behaviour of infinite iterators on potentially-computable methods

It’s not entirely clear from the current documentation what behaviour
calling a method such as `min` on an infinite iterator like `RangeFrom`
is. One might expect this to terminate, but in fact, for infinite
iterators, `min` is always nonterminating (at least in the standard
library). This adds a quick note about this behaviour for clarification.
Auto merge of #48113 - kennytm:rollup, r=kennytm
Rollup of 20 pull requests

- Successful merges: #47790, #47835, #47854, #48015, #48047, #48051, #48058, #48059, #48064, #48078, #48080, #48086, #48098, #48101, #48107, #48100, #48085, #48120, #48124, #47547
- Failed merges:
Showing with 437 additions and 545 deletions.
  1. +4 −0 config.toml.example
  2. +1 −1 src/binaryen
  3. +23 −6 src/bootstrap/builder.rs
  4. +4 −1 src/bootstrap/config.rs
  5. +1 −0 src/bootstrap/configure.py
  6. +7 −0 src/bootstrap/dist.rs
  7. +23 −7 src/bootstrap/install.rs
  8. +1 −1 src/bootstrap/lib.rs
  9. +1 −1 src/bootstrap/native.rs
  10. +1 −1 src/bootstrap/test.rs
  11. +1 −1 src/ci/docker/dist-i686-freebsd/Dockerfile
  12. +2 −1 src/ci/docker/dist-i686-linux/Dockerfile
  13. +1 −1 src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh
  14. +1 −1 src/dlmalloc
  15. +1 −1 src/doc/book
  16. +1 −1 src/doc/nomicon
  17. +1 −1 src/doc/reference
  18. +1 −1 src/doc/rust-by-example
  19. +2 −2 src/etc/installer/msi/rust.wxs
  20. +1 −1 src/etc/platform-intrinsics/generator.py
  21. +1 −1 src/etc/test-float-parse/runtests.py
  22. +1 −1 src/libbacktrace/ltmain.sh
  23. +1 −1 src/libbacktrace/macho.c
  24. +1 −1 src/libcompiler_builtins
  25. +1 −1 src/libcore/char.rs
  26. +4 −0 src/libcore/iter/iterator.rs
  27. +14 −0 src/libcore/iter/mod.rs
  28. +1 −1 src/libcore/macros.rs
  29. +2 −2 src/libcore/ops/arith.rs
  30. +46 −0 src/libcore/sync/atomic.rs
  31. +14 −0 src/libcore/tests/atomic.rs
  32. +1 −0 src/libcore/tests/lib.rs
  33. +1 −1 src/libfmt_macros/lib.rs
  34. +1 −1 src/librustc/hir/intravisit.rs
  35. +49 −44 src/librustc/traits/error_reporting.rs
  36. +0 −363 src/librustc_data_structures/blake2b.rs
  37. +0 −2 src/librustc_data_structures/lib.rs
  38. +0 −47 src/librustc_data_structures/veccell/mod.rs
  39. +7 −0 src/librustc_driver/driver.rs
  40. +4 −0 src/librustc_mir/interpret/eval_context.rs
  41. +11 −3 src/librustc_resolve/resolve_imports.rs
  42. +4 −0 src/librustc_trans/mir/constant.rs
  43. +4 −0 src/librustc_trans/mir/rvalue.rs
  44. +32 −0 src/librustc_typeck/check/mod.rs
  45. +4 −0 src/librustdoc/clean/mod.rs
  46. +3 −1 src/librustdoc/clean/simplify.rs
  47. +6 −31 src/librustdoc/html/static/main.js
  48. +1 −1 src/librustdoc/html/static/rustdoc.css
  49. +5 −0 src/libsyntax/feature_gate.rs
  50. +1 −1 src/llvm
  51. +2 −0 src/rustllvm/RustWrapper.cpp
  52. +1 −1 src/rustllvm/llvm-rebuild-trigger
  53. +20 −0 src/test/compile-fail/rustc-args-required-const2.rs
  54. +28 −6 src/test/run-pass/backtrace-debuginfo.rs
  55. +13 −0 src/test/rustdoc/auxiliary/unit-return.rs
  56. +27 −0 src/test/rustdoc/unit-return.rs
  57. +23 −0 src/test/ui/generator/issue-48048.rs
  58. +10 −0 src/test/ui/generator/issue-48048.stderr
  59. +1 −1 src/test/ui/mismatched_types/binops.rs
  60. +2 −2 src/test/ui/mismatched_types/binops.stderr
  61. +3 −0 src/test/ui/mismatched_types/closure-arg-count.rs
  62. +9 −3 src/test/ui/mismatched_types/closure-arg-count.stderr
@@ -151,6 +151,10 @@
# default.
#extended = false

# Installs choosen set of extended tools if enables. By default builds all.
# If choosen tool failed to build the installation fails.
#tools = ["cargo", "rls", "rustfmt", "analysis", "src"]

# Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose
#verbose = 0

@@ -570,7 +570,7 @@ impl<'a> Builder<'a> {
// build scripts in that situation.
//
// If LLVM support is disabled we need to use the snapshot compiler to compile
// build scripts, as the new compiler doesnt support executables.
// build scripts, as the new compiler doesn't support executables.
if mode == Mode::Libstd || !self.build.config.llvm_enabled {
cargo.env("RUSTC_SNAPSHOT", &self.initial_rustc)
.env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_snapshot_libdir());
@@ -600,9 +600,25 @@ impl<'a> Builder<'a> {
//
// FIXME: the guard against msvc shouldn't need to be here
if !target.contains("msvc") {
let cc = self.cc(target);
cargo.env(format!("CC_{}", target), cc)
.env("CC", cc);
let ccache = self.config.ccache.as_ref();
let ccacheify = |s: &Path| {
let ccache = match ccache {
Some(ref s) => s,
None => return s.display().to_string(),
};
// FIXME: the cc-rs crate only recognizes the literal strings
// `ccache` and `sccache` when doing caching compilations, so we
// mirror that here. It should probably be fixed upstream to
// accept a new env var or otherwise work with custom ccache
// vars.
match &ccache[..] {
"ccache" | "sccache" => format!("{} {}", ccache, s.display()),
_ => s.display().to_string(),
}
};
let cc = ccacheify(&self.cc(target));
cargo.env(format!("CC_{}", target), &cc)
.env("CC", &cc);

let cflags = self.cflags(target).join(" ");
cargo.env(format!("CFLAGS_{}", target), cflags.clone())
@@ -617,8 +633,9 @@ impl<'a> Builder<'a> {
}

if let Ok(cxx) = self.cxx(target) {
cargo.env(format!("CXX_{}", target), cxx)
.env("CXX", cxx)
let cxx = ccacheify(&cxx);
cargo.env(format!("CXX_{}", target), &cxx)
.env("CXX", &cxx)
.env(format!("CXXFLAGS_{}", target), cflags.clone())
.env("CXXFLAGS", cflags);
}
@@ -13,7 +13,7 @@
//! This module implements parsing `config.toml` configuration files to tweak
//! how the build runs.

use std::collections::HashMap;
use std::collections::{HashMap, HashSet};
use std::env;
use std::fs::File;
use std::io::prelude::*;
@@ -52,6 +52,7 @@ pub struct Config {
pub target_config: HashMap<Interned<String>, Target>,
pub full_bootstrap: bool,
pub extended: bool,
pub tools: Option<HashSet<String>>,
pub sanitizers: bool,
pub profiler: bool,
pub ignore_git: bool,
@@ -191,6 +192,7 @@ struct Build {
python: Option<String>,
full_bootstrap: Option<bool>,
extended: Option<bool>,
tools: Option<HashSet<String>>,
verbose: Option<usize>,
sanitizers: Option<bool>,
profiler: Option<bool>,
@@ -395,6 +397,7 @@ impl Config {
set(&mut config.vendor, build.vendor);
set(&mut config.full_bootstrap, build.full_bootstrap);
set(&mut config.extended, build.extended);
config.tools = build.tools;
set(&mut config.verbose, build.verbose);
set(&mut config.sanitizers, build.sanitizers);
set(&mut config.profiler, build.profiler);
@@ -144,6 +144,7 @@ def v(*args):
o("full-bootstrap", "build.full-bootstrap", "build three compilers instead of two")
o("extended", "build.extended", "build an extended rust tool set")

v("tools", "build.tools", "List of extended tools will be installed")
v("build", "build.build", "GNUs ./configure syntax LLVM build triple")
v("host", None, "GNUs ./configure syntax LLVM host triples")
v("target", None, "GNUs ./configure syntax LLVM target triples")
@@ -31,6 +31,7 @@ use channel;
use util::{cp_r, libdir, is_dylib, cp_filtered, copy, replace_in_file};
use builder::{Builder, RunConfig, ShouldRun, Step};
use compile;
use native;
use tool::{self, Tool};
use cache::{INTERNER, Interned};
use time;
@@ -898,6 +899,12 @@ impl Step for PlainSourceTarball {
.arg("--vers").arg(CARGO_VENDOR_VERSION)
.arg("cargo-vendor")
.env("RUSTC", &build.initial_rustc);
if let Some(dir) = build.openssl_install_dir(build.config.build) {
builder.ensure(native::Openssl {
target: build.config.build,
});
cmd.env("OPENSSL_DIR", dir);
}
build.run(&mut cmd);
}

@@ -22,6 +22,7 @@ use dist::{self, pkgname, sanitize_sh, tmpdir};

use builder::{Builder, RunConfig, ShouldRun, Step};
use cache::Interned;
use config::Config;

pub fn install_docs(builder: &Builder, stage: u32, host: Interned<String>) {
install_sh(builder, "docs", "rust-docs", stage, Some(host));
@@ -144,6 +145,19 @@ macro_rules! install {
pub host: Interned<String>,
}

impl $name {
#[allow(dead_code)]
fn should_build(config: &Config) -> bool {
config.extended && config.tools.as_ref()
.map_or(true, |t| t.contains($path))
}

#[allow(dead_code)]
fn should_install(builder: &Builder) -> bool {
builder.config.tools.as_ref().map_or(false, |t| t.contains($path))
}
}

impl Step for $name {
type Output = ();
const DEFAULT: bool = true;
@@ -185,32 +199,34 @@ install!((self, builder, _config),
install_std(builder, self.stage, *target);
}
};
Cargo, "cargo", _config.extended, only_hosts: true, {
Cargo, "cargo", Self::should_build(_config), only_hosts: true, {
builder.ensure(dist::Cargo { stage: self.stage, target: self.target });
install_cargo(builder, self.stage, self.target);
};
Rls, "rls", _config.extended, only_hosts: true, {
if builder.ensure(dist::Rls { stage: self.stage, target: self.target }).is_some() {
Rls, "rls", Self::should_build(_config), only_hosts: true, {
if builder.ensure(dist::Rls { stage: self.stage, target: self.target }).is_some() ||
Self::should_install(builder) {
install_rls(builder, self.stage, self.target);
} else {
println!("skipping Install RLS stage{} ({})", self.stage, self.target);
}
};
Rustfmt, "rustfmt", _config.extended, only_hosts: true, {
if builder.ensure(dist::Rustfmt { stage: self.stage, target: self.target }).is_some() {
Rustfmt, "rustfmt", Self::should_build(_config), only_hosts: true, {
if builder.ensure(dist::Rustfmt { stage: self.stage, target: self.target }).is_some() ||
Self::should_install(builder) {
install_rustfmt(builder, self.stage, self.target);
} else {
println!("skipping Install Rustfmt stage{} ({})", self.stage, self.target);
}
};
Analysis, "analysis", _config.extended, only_hosts: false, {
Analysis, "analysis", Self::should_build(_config), only_hosts: false, {
builder.ensure(dist::Analysis {
compiler: builder.compiler(self.stage, self.host),
target: self.target
});
install_analysis(builder, self.stage, self.target);
};
Src, "src", _config.extended, only_hosts: true, {
Src, "src", Self::should_build(_config) , only_hosts: true, {
builder.ensure(dist::Src);
install_src(builder, self.stage);
}, ONLY_BUILD;
@@ -666,7 +666,7 @@ impl Build {
}
}

/// Returns the path to the linker for the given target if it needs to be overriden.
/// Returns the path to the linker for the given target if it needs to be overridden.
fn linker(&self, target: Interned<String>) -> Option<&Path> {
if let Some(linker) = self.config.target_config.get(&target)
.and_then(|c| c.linker.as_ref()) {
@@ -186,7 +186,7 @@ impl Step for Llvm {
}

// http://llvm.org/docs/HowToCrossCompileLLVM.html
if target != build.build {
if target != build.build && !emscripten {
builder.ensure(Llvm {
target: build.build,
emscripten: false,
@@ -902,7 +902,7 @@ impl Step for Compiletest {
}
}
if suite == "run-make" && !build.config.llvm_enabled {
println!("Ignoring run-make test suite as they generally dont work without LLVM");
println!("Ignoring run-make test suite as they generally don't work without LLVM");
return;
}

@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:18.04

RUN apt-get update && apt-get install -y --no-install-recommends \
clang \
@@ -86,7 +86,8 @@ ENV RUST_CONFIGURE_ARGS \
--enable-extended \
--enable-sanitizers \
--enable-profiler \
--enable-emscripten
--enable-emscripten \
--build=i686-unknown-linux-gnu
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

# This is the only builder which will create source tarballs
@@ -54,7 +54,7 @@ cd usr/src
# The options, in order, do the following
# * this is an unprivileged build
# * output to a predictable location
# * disable various uneeded stuff
# * disable various unneeded stuff
MKUNPRIVED=yes TOOLDIR=/x-tools/x86_64-unknown-netbsd \
MKSHARE=no MKDOC=no MKHTML=no MKINFO=no MKKMOD=no MKLINT=no MKMAN=no MKNLS=no MKPROFILE=no \
hide_output ./build.sh -j10 -m amd64 tools
Submodule dlmalloc updated 2 files
+2 −2 src/dlmalloc.rs
+7 −10 src/wasm.rs
Submodule book updated 32 files
+2 −2 second-edition/dictionary.txt
+1 −0 second-edition/dot/trpl04-01.dot
+1 −0 second-edition/dot/trpl04-02.dot
+1 −0 second-edition/dot/trpl04-03.dot
+1 −0 second-edition/dot/trpl04-04.dot
+1 −0 second-edition/dot/trpl04-05.dot
+1 −0 second-edition/dot/trpl04-06.dot
+1 −0 second-edition/dot/trpl15-01.dot
+1 −0 second-edition/dot/trpl15-02.dot
+1 −0 second-edition/dot/trpl15-03.dot
+797 −1,274 second-edition/nostarch/chapter15.md
+ second-edition/nostarch/odt/chapter15.docx
+1 −1 second-edition/src/ch08-01-vectors.md
+2 −2 second-edition/src/ch10-02-traits.md
+37 −78 second-edition/src/ch15-00-smart-pointers.md
+116 −188 second-edition/src/ch15-01-box.md
+133 −201 second-edition/src/ch15-02-deref.md
+66 −111 second-edition/src/ch15-03-drop.md
+95 −119 second-edition/src/ch15-04-rc.md
+178 −217 second-edition/src/ch15-05-interior-mutability.md
+183 −257 second-edition/src/ch15-06-reference-cycles.md
+1 −1 second-edition/src/ch17-02-trait-objects.md
+6 −6 second-edition/src/ch18-01-all-the-places-for-patterns.md
+52 −49 second-edition/src/img/trpl04-01.svg
+75 −70 second-edition/src/img/trpl04-02.svg
+101 −95 second-edition/src/img/trpl04-03.svg
+76 −71 second-edition/src/img/trpl04-04.svg
+67 −62 second-edition/src/img/trpl04-05.svg
+95 −90 second-edition/src/img/trpl04-06.svg
+31 −30 second-edition/src/img/trpl15-01.svg
+14 −13 second-edition/src/img/trpl15-02.svg
+68 −53 second-edition/src/img/trpl15-03.svg
Submodule nomicon updated 1 files
+5 −5 src/send-and-sync.md
@@ -18,7 +18,7 @@
<!-- Upgrade code should be different for each platform -->
<?if $(sys.BUILDARCH)="x64" ?>
<?if $(env.CFG_ABI)="GNU" ?>
<!-- UpgradeCode shoud stay the same for all MSI versions in channel -->
<!-- UpgradeCode should stay the same for all MSI versions in channel -->
<?if $(env.CFG_CHANNEL)="stable" ?>
<?define UpgradeCode="B440B077-F8D1-4730-8E1D-D6D37702B4CE" ?>
<?elseif $(env.CFG_CHANNEL)="beta" ?>
@@ -129,7 +129,7 @@

<!-- Path of cmd.exe for the shortcut -->
<Property Id="SHORTCUTTARGET" Value="%windir%\System32\cmd.exe" />
<!-- Microsoft Installer will resolve any Enviroment Variables in the working directory at install time -->
<!-- Microsoft Installer will resolve any Environment Variables in the working directory at install time -->
<Property Id="SHORTCUTWKDIR" Value="%SystemDrive%\" />

<InstallUISequence>
@@ -591,7 +591,7 @@ def parse_args():
The X86 architecture is specified as multiple files (for the different
instruction sets that x86 supports). To generate the compiler
definitions one needs to pass the script a "platform information file"
(with the -i flag) next to the files of the different intruction sets.
(with the -i flag) next to the files of the different instruction sets.
For example, to generate the X86 compiler-definitions for SSE4.2, just:
python generator.py --format compiler-defs -i x86/info.json sse42.json
@@ -41,7 +41,7 @@
(as a fraction, using the ``fractions`` module).
Given an input string and the corresponding float computed via Rust, simply
decode the float into f * 2^k (for intergers f, k) and the ULP.
decode the float into f * 2^k (for integers f, k) and the ULP.
We can now easily compute the error and check if it is within 0.5 ULP as it
should be. Zero and infinites are handled similarly:
@@ -487,7 +487,7 @@ func_mkdir_p ()
# While some portion of DIR does not yet exist...
while test ! -d "$my_directory_path"; do
# ...make a list in topmost first order. Use a colon delimited
# list incase some portion of path contains whitespace.
# list in case some portion of path contains whitespace.
my_dir_list="$my_directory_path:$my_dir_list"

# If the last portion added has no slash in it, the list is done
@@ -327,7 +327,7 @@ macho_get_commands (struct backtrace_state *state, int descriptor,
goto end;
file_header_view_valid = 1;

// The endianess of the slice may be different than the fat image
// The endianness of the slice may be different than the fat image
switch (*(uint32_t *) file_header_view.data)
{
case MH_MAGIC:
@@ -211,7 +211,7 @@ impl From<u8> for char {

/// An error which can be returned when parsing a char.
#[stable(feature = "char_from_str", since = "1.20.0")]
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ParseCharError {
kind: CharErrorKind,
}
@@ -1431,6 +1431,10 @@ pub trait Iterator {
/// Folding is useful whenever you have a collection of something, and want
/// to produce a single value from it.
///
/// Note: `fold()`, and similar methods that traverse the entire iterator,
/// may not terminate for infinite iterators, even on traits for which a
/// result is determinable in finite time.
///
/// # Examples
///
/// Basic usage:
@@ -298,7 +298,21 @@
//!
//! This will print the numbers `0` through `4`, each on their own line.
//!
//! Bear in mind that methods on infinite iterators, even those for which a
//! result can be determined mathematically in finite time, may not terminate.
//! Specifically, methods such as [`min`], which in the general case require
//! traversing every element in the iterator, are likely not to return
//! successfully for any infinite iterators.
//!
//! ```no_run
//! let ones = std::iter::repeat(1);
//! let least = ones.min().unwrap(); // Oh no! An infinite loop!
//! // `ones.min()` causes an infinite loop, so we won't reach this point!
//! println!("The smallest number one is {}.", least);
//! ```
//!
//! [`take`]: trait.Iterator.html#method.take
//! [`min`]: trait.Iterator.html#method.min

#![stable(feature = "rust1", since = "1.0.0")]

@@ -327,7 +327,7 @@ macro_rules! debug_assert_ne {
/// }
/// }
///
/// // The prefered method of quick returning Errors
/// // The preferred method of quick returning Errors
/// fn write_to_file_question() -> Result<(), MyError> {
/// let mut file = File::create("my_best_friends.txt")?;
/// file.write_all(b"This is a list of my best friends.")?;
@@ -181,7 +181,7 @@ add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
/// ```
#[lang = "sub"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_on_unimplemented(message="cannot substract `{RHS}` from `{Self}`",
#[rustc_on_unimplemented(message="cannot subtract `{RHS}` from `{Self}`",
label="no implementation for `{Self} - {RHS}`")]
pub trait Sub<RHS=Self> {
/// The resulting type after applying the `-` operator.
@@ -716,7 +716,7 @@ add_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
/// ```
#[lang = "sub_assign"]
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_on_unimplemented(message="cannot substract-assign `{Rhs}` from `{Self}`",
#[rustc_on_unimplemented(message="cannot subtract-assign `{Rhs}` from `{Self}`",
label="no implementation for `{Self} -= {Rhs}`")]
pub trait SubAssign<Rhs=Self> {
/// Performs the `-=` operation.
Oops, something went wrong.

No commit comments for this range

You can’t perform that action at this time.