Commit Graph

44358 Commits

Author SHA1 Message Date
bors
560b1dab15 Auto merge of #26677 - jroesch:fulfillment-context-refactor, r=nrc
This patch implements the next chunk of flattening out the type checking context. In a series of patches I moved around the necessary state and logic in order to delete the `Typer` and `ClosureTyper` traits. My next goal is to clean the interfaces and start to move the normalization code behind them.

r? @nrc I hope my PR is coherent, doing this too late at night ;)
2015-07-02 03:10:25 +00:00
Jared Roesch
c64bda3227 Update librustc_driver/test.rs 2015-07-01 19:29:17 -07:00
Alex Newman
0b7c4f57f6 Add netbsd amd64 support 2015-07-01 19:09:14 -07:00
bors
1768b1090a Auto merge of #26688 - nrc:map-parent-2, r=manishearth
r? @Manishearth
2015-07-02 01:40:28 +00:00
Remi Rampin
3278e793b2 Implement CoerceUnsized for arc::Weak 2015-07-01 17:58:05 -04:00
Remi Rampin
50421827ae Add test to dst-coerce-rc.rs 2015-07-01 17:54:54 -04:00
Nick Cameron
7713e141b7 Report memory use in time-passes
Reports the resident set size after each pass (linux-only).
2015-07-02 09:36:32 +12:00
Tshepang Lekhonkhobe
b643a0b679 doc: add missing space 2015-07-01 23:08:50 +02:00
Tshepang Lekhonkhobe
5976355b67 doc: there is just one trait in here
Also, the info is repeated in the following paragraph
2015-07-01 23:05:06 +02:00
Nick Cameron
8261599e62 Refactoring 2015-07-02 08:56:55 +12:00
Ariel Ben-Yehuda
2fc8571861 Fix deadlocks with RUST_LOG=rustc::middle::ty
These are RefCell deadlocks that cause the rustc task to die with the stderr
lock held, causing a real deadlock.

Fixes #26717.
2015-07-01 23:08:40 +03:00
Jared Roesch
ce089e50a4 Address nits 2015-07-01 13:08:25 -07:00
Remi Rampin
8bf4651e2c Implement CoerceUnsized for rc::Weak
Fixes #26704
2015-07-01 15:51:17 -04:00
bors
d2cf9f9632 Auto merge of #26658 - alexcrichton:windows-net-no-inherit, r=aturon
This was added after Windows 7 SP1, so it's not always available. Instead use
the `SetHandleInformation` function to flag a socket as not inheritable. This is
not atomic with respect to creating new processes, but it mirrors what Unix does
with respect to possibly using the atomic option in the future.

Closes #26543
2015-07-01 19:28:15 +00:00
bors
8a599c8cef Auto merge of #26034 - Gankro:deprecate-bits, r=alexcrichton
I've mirrored them out to crates (bit-vec and bit-set) that build on stable.

(not sure if this actually correctly deprecates them in std)
2015-07-01 17:55:20 +00:00
Alexis Beingessner
7850c8d0aa fallout of bitvec/bitset deprecation 2015-07-01 10:30:14 -07:00
Nick Hamann
c9c5ea7c13 Add a regression test for #8640.
This doesn't add a test for the main problem in #8640 since it seems that
was already fixed (including a test) in PR #19522. This just adds a test
for a program mentioned in the comments that used to erroneously compile.

Closes #8640.
2015-07-01 12:22:42 -05:00
Guillaume Gomez
28d2b39f45 Add E0277 error explanation 2015-07-01 19:15:53 +02:00
Guillaume Gomez
0ca7699837 Add examples in error explanation E0267 and E0268 2015-07-01 19:14:27 +02:00
Alex Crichton
18c39e126a msvc: Fix the link name for the lgamma
The function is apparently just called lgamma on MSVC
2015-07-01 09:35:55 -07:00
Alex Crichton
407fb293db msvc: Ignore extern-pass-empty on MSVC
The MSVC compiler doesn't like empty structs, so this test won't link on MSVC,
so it's ignored.
2015-07-01 09:35:55 -07:00
Alex Crichton
ae0eb675db msvc: Fix TLS destructors
Just like the original article our Windows TLS support is based on predicted,
this symbol must be linked in on MSVC to pull in the necessary support for TLS
variables. This commit fixes a number of unit tests which require that TLS
destructors are run.
2015-07-01 09:35:55 -07:00
Alex Crichton
91c22b6302 msvc: Lookup linker in windows registry
This commit alters the compiler to no longer "just run link.exe" but instead
probe the system's registry to find where the linker is located. The default
library search path (normally found through LIB) is also found through the
registry. This also brings us in line with the default behavior of Clang, and
much of the logic of where to look for information is copied over from Clang as
well. Finally, this commit removes the makefile logic for updating the
environment variables for the compiler, except for stage0 where it's still
necessary.

The motivation for this change is rooted in two positions:

* Not having to set up these environment variables is much less hassle both for
  the bootstrap and for running the compiler itself. This means that the
  compiler can be run outside of VS shells and be run inside of cmd.exe or a
  MSYS shell.

* When dealing with cross compilation, there's not actually a set of environment
  variables that can be set for the compiler. This means, for example, if a
  Cargo compilation is targeting 32-bit from 64-bit you can't actually set up
  one set of environment variables. Having the compiler deal with the logic
  instead is generally much more convenient!
2015-07-01 09:35:55 -07:00
Alex Crichton
f9de964ccf msvc: Enable landing pads by default
This commit turns on landing pads for MSVC by default, which means that we'll
now be running cleanups for values on the stack when an exception is thrown.
This commit "fixes" the previously seen LLVM abort by attaching the `noinline`
attribute to all generated drop glue to prevent landing pads from being inlined
into other landing pads.

The performance of MSVC is highly likely to decrease from this commit, but there
are various routes we can taken in the future if this ends up staying for quite
a while, such as generating a shim function only called from landing pads which
calls the actual drop glue, and this shim is marked noinline.

For now, however, this patch enables MSVC to successfully bootstrap itself!
2015-07-01 09:35:54 -07:00
Steve Klabnik
55641720aa Expand docs for recv
Add an example, plus some text that covers the buffering nature of
channels.

Fixes #26497
2015-07-01 12:25:25 -04:00
bors
9d67b9f0f9 Auto merge of #26675 - azerupi:doc-js-keyevent, r=alexcrichton
Like explained in #26016, typing `?` had no effect with non-english keyboard layouts in the docs. 

This patch seems to resolve this issue, **tested with AZERTY keyboard in Google Chrome and Firefox**. I haven't tested it with more exotic keyboard layouts or with other browsers though.

This code is based on the information found on: http://javascript.info/tutorial/keyboard-events

**More specifically:**

> The only event which reliably provides the character is keypress.

**And**

>```
// event.type must be keypress
function getChar(event) {
  if (event.which == null) {
    return String.fromCharCode(event.keyCode) // IE
  } else if (event.which!=0 && event.charCode!=0) {
    return String.fromCharCode(event.which)   // the rest
  } else {
    return null // special key
  }
}
```

`?` and `S` work, `escape` however does not (on an Azerty keyboard). 

It would be good if some people could test it with other browsers and keyboard layouts: http://www.mathieudavid.org/test/rustdoc/std/index.html

**Edit:**
- swedish layout works on Firefox and Chromium
- french (azerty) mac layout works on Safari
2015-07-01 16:21:10 +00:00
bors
d4fe2a0027 Auto merge of #26711 - bluss:doc-hide-rand, r=steveklabnik
A follow up to #26530, hide SampleRange too. The numerical types implement this trait.
2015-07-01 13:39:57 +00:00
Guillaume Gomez
d2e6ddabc4 Add E0124 error explanation 2015-07-01 13:07:29 +02:00
Ulrik Sverdrup
7dc50b1a07 Hide SampleRange trait from docs 2015-07-01 12:05:57 +02:00
bors
a9e26b5ced Auto merge of #26540 - oli-obk:issue11715, r=nrc
closes #25037
closes #11715

r? @nrc
2015-07-01 08:49:17 +00:00
Mathieu David
49b73e46d6 In js from the docs, change keyboard eventlistener to be compatible with non-english keyboard layouts. Fixes #26016 Fixes #16572 2015-07-01 10:11:23 +02:00
bors
a5dec98802 Auto merge of #26703 - nrc:dxr-servo-fix, r=huonw
r? @huonw
2015-07-01 07:04:53 +00:00
Alex Crichton
8890089556 std: Avoid the WSA_FLAG_NO_HANDLE_INHERIT option
This was added after Windows 7 SP1, so it's not always available. Instead use
the `SetHandleInformation` function to flag a socket as not inheritable. This is
not atomic with respect to creating new processes, but it mirrors what Unix does
with respect to possibly using the atomic option in the future.

Closes #26543
2015-06-30 22:34:16 -07:00
Nick Cameron
a1d40c81f9 save-analysis: skip generated content in patterns 2015-07-01 15:53:08 +12:00
bors
1fc0f68548 Auto merge of #26698 - alexcrichton:char-fmt, r=huonw
This recently regressed in #24689, and this updates the `Display` implementation
to take formatting flags into account.

Closes #26625
2015-07-01 03:35:46 +00:00
Alex Crichton
98566ea951 std: Fix formatting flags for chars
This recently regressed in #24689, and this updates the `Display` implementation
to take formatting flags into account.

Closes #26625
2015-06-30 19:26:03 -07:00
bors
bf3c979ec3 Auto merge of #26696 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #26373, #26506, #26580, #26622, #26627, #26651, #26678, #26692
- Failed merges:
2015-06-30 23:46:57 +00:00
bors
dc309d79e9 Auto merge of #26686 - arielb1:associated-type-defaults-actually-work, r=eddyb
Fixes #26636.

r? @eddyb
2015-06-30 21:39:46 +00:00
Ariel Ben-Yehuda
a18d9842ed Make the unused_mut lint smarter with respect to locals.
Fixes #26332
2015-07-01 00:12:12 +03:00
Ariel Ben-Yehuda
2f45294a50 Clean-up assignment checking in borrowck 2015-07-01 00:12:12 +03:00
bors
fdf219dd42 Auto merge of #26663 - Eljay:fix-repr-attribute, r=sanxiyn
Fixes #26646.

Loops over all `#[repr(..)]` attributes instead of stopping at the first one to make sure they are all marked as used. Previously it stopped after the first `#[repr(C)]` was found causing all other attributes to be skipped by the linter.
2015-06-30 20:07:18 +00:00
Christian Weinz
e727dd5811 Update complement-design-faq.md
The ‘_‘ wildcard handles exactly not specific cases but all nut specified.
2015-06-30 17:02:10 -03:00
Steve Klabnik
08f9b98e57 Rollup merge of #26692 - steveklabnik:gh26620, r=alexcrichton
Fixes #26620
2015-06-30 15:37:45 -04:00
Steve Klabnik
8b81f76593 Make note of Ord's derive ordering
Fixes #26620
2015-06-30 19:37:34 -04:00
Steve Klabnik
26ff4714dd Rollup merge of #26678 - bluss:doc-fmt, r=steveklabnik
fmt: Update docs and mention :#? pretty-printing

Expose `:#?` well in the docs for fmt and Debug itself. Also update some out of date information and fix formatting in `std::fmt` docs.
2015-06-30 15:37:45 -04:00
Steve Klabnik
65b5c15384 Rollup merge of #26651 - GuillaumeGomez:patch-2, r=Manishearth
Part of #24407.
cc @michaelsproul
r? @Manishearth
2015-06-30 15:37:45 -04:00
Steve Klabnik
825e48fadf Rollup merge of #26627 - tshepang:stdin-example, r=steveklabnik 2015-06-30 15:37:45 -04:00
Steve Klabnik
cf1c5b22d8 Rollup merge of #26622 - tshepang:indents, r=sanxiyn 2015-06-30 15:37:44 -04:00
Steve Klabnik
bac361558e Rollup merge of #26580 - adamheins:master, r=steveklabnik
I found a sentence that felt a bit awkward to read in its current form, so I added a comma to break it up.
2015-06-30 15:37:44 -04:00
Steve Klabnik
96dd82ff9c Rollup merge of #26506 - tshepang:doc-fix, r=steveklabnik 2015-06-30 15:37:44 -04:00