1734 Commits

Author SHA1 Message Date
Pietro Albini
eb00b4792c
Rollup merge of #55447 - frewsxcv:frewsxcv-rename, r=Mark-Simulacrum
Fix invalid path in generate-deriving-span-tests.py.

This script broke after #53196 – the tests were moved.
2018-10-29 09:47:52 +01:00
Corey Farwell
ea026b865a Fix invalid path in generate-deriving-span-tests.py.
This script broke after #53196 after the tests were moved.
2018-10-28 12:12:00 -04:00
Konrad Borowski
42d3ef7f67
Remove unused re import in gdb_rust_pretty_printing 2018-10-28 12:14:54 +01:00
Konrad Borowski
613f9f2013
Remove unused sys import from generate-deriving-span-tests 2018-10-28 12:06:28 +01:00
Matthias Krüger
4972beaf65 fix typos in various places 2018-10-23 15:56:25 +02:00
Vadim Petrochenkov
52ede63263 Remove the parse-fail test suite 2018-10-21 14:06:28 +03:00
kennytm
d64c77a671
Rollup merge of #54989 - Munksgaard:fix-htmldocck-typos, r=tmandry
Fix spelling in the documentation to htmldocck.py

I was reading through htmldocck.py, and decided to attempt to clean it up a little bit. Let me know if you disagree with my edits.
2018-10-12 22:04:19 +08:00
Philip Munksgaard
6c7eb1406d Fix spelling in the documentation to htmldocck.py 2018-10-11 14:37:56 +02:00
Jorge Aparicio
faa733dd18 fix tidy 2018-10-09 08:58:02 +02:00
Jorge Aparicio
4d8310cef2 gdb_rust_pretty_printing: adapt to the changes in the layout of btree::LeafNode 2018-10-09 08:58:01 +02:00
Ralf Jung
e37d6d37e7 Revert "Auto merge of #53508 - japaric:maybe-uninit, r=RalfJung"
This reverts commit c6e3d7fa3113aaa64602507f39d4627c427742ff, reversing
changes made to 4591a245c7eec9f70d668982b1383cd2a6854af5.
2018-09-29 09:50:50 +02:00
Jorge Aparicio
dd9f019660 fix tidy 2018-09-22 21:01:21 +02:00
Jorge Aparicio
8482c93362 gdb_rust_pretty_printing: adapt to the changes in the layout of btree::LeafNode 2018-09-22 21:01:21 +02:00
Tom Tromey
8aae6ca44a Have rust-lldb look for the rust-enabled lldb
We're shipping a rust-enabled lldb, but the "lldb" executable is not
installed into the "bin" directory by rustup.  See the discussion in
https://github.com/rust-lang-nursery/rustup.rs/pull/1492 for
background on this decision.  There, we agreed to have rust-lldb
prefer the rust-enabled lldb if it is installed.

This patch changes dist.rs to put lldb into rustlib, following what
was done for the other LLVM tools in #53955, and then fixes rust-lldb
to prefer that lldb, if it exists.

See issue #48168
2018-09-07 09:13:47 -06:00
Philip Daniels
47aa475866 Fix direction of slashes in the help text example. 2018-08-30 20:23:41 +01:00
Philip Daniels
0902fc88db Add rust-gdbgui script.
This script invokes the gdbgui graphical GDB front-end
with the Rust pretty printers loaded. The script does not install
gdbgui, that must be done manually.
2018-08-28 22:05:04 +01:00
ftilde
d6426e8a25 Exec gdb and lldb in rust-* wrappers
This way the process we get by calling rust-{gdb,lldb} is an actual
{gdb,lldb} instance and not (perhaps surprisingly) a script waiting for
the debugger process to finish. Thus, sending a SIGINT to the spawned
process stops execution of the child, for example.
2018-08-19 00:00:00 +02:00
ftilde
73b5c7eda2 Avoid creation of command temp file in rust-lldb
Arguments are passed on the command line via --one-line-before-file
(instead of in a file via --source-before-file) to lldb.
2018-08-19 00:00:00 +02:00
Unknown
0d0c08f9bb pretty printing for btreemap 2018-08-15 13:48:10 +09:00
kennytm
e401638d08
Rollup merge of #53112 - fukatani:pretty-print-btreeset, r=michaelwoerister
pretty print BTreeSet

I want pretty printing for BTreeSet.
```rust
use std::collections::*;

fn main() {
  let mut s = BTreeSet::new();
  s.insert(5);
  s.insert(3);
  s.insert(7);
  s.remove(&3);
  println!("{:?}", s);
}
```

```
(gdb) b 9
(gdb) p s
$1 = BTreeSet<i32> with 2 elements = {[0] = 5, [1] = 7}
```
This is analogy of pretty printing for C++ std::set.
2018-08-14 23:59:04 +08:00
Unknown
6e562d24c6 fix behavior 2018-08-13 23:01:48 +09:00
Unknown
b95f6f2e8f bug fix 2018-08-13 17:30:09 +09:00
fukatani
b6d4d40321 pretty print BTreeSet 2018-08-06 23:00:19 +09:00
varkor
64185f205d Remove unnecessary or invalid feature attributes 2018-08-05 15:54:48 +01:00
Unknown
9845ee0886 fix coding style 2018-07-29 23:45:32 +09:00
Unknown
b6d3143488 pretty print for std::collections::vecdeque 2018-07-29 15:43:54 +09:00
ljedrz
e7f63f1756 Enable default inlining in platform intrinsics 2018-07-16 14:36:00 +02:00
est31
56e46255b3 Add some more additional functions to the shim
They are all needed now due to the stdsimd update.
2018-07-02 18:23:57 +02:00
Guillaume Gomez
d024d6a51e slightly improve rustdoc xml path error 2018-06-04 09:51:41 +02:00
Benjamin Lamowski
f6df1740b6 rust-gdb: work around the re-used -d argument in cgdb
Use --directory= instead of -d, because cgdb reuses the short option.
2018-05-21 20:58:19 -04:00
varkor
98e3e82ece Use UFCS 2018-04-25 11:26:47 +01:00
varkor
6eb4f0f7fd Ensure derive(PartialOrd) is no longer accidentally exponential
Previously, two comparison operations would be generated for each field, each of which could delegate to another derived PartialOrd. Now we use ordering and optional chaining to ensure each pair of fields is only compared once.
2018-04-25 11:26:47 +01:00
bors
bc001fa07f Auto merge of #49881 - varkor:partialord-opt, r=Manishearth
Fix derive(PartialOrd) and optimise final field operation

```rust
// Before (`lt` on 2-field struct)
self.f1 < other.f1 || (!(other.f1 < self.f1) &&
(self.f2 < other.f2 || (!(other.f2 < self.f2) &&
(false)
))
)

// After
self.f1 < other.f1 || (!(other.f1 < self.f1) &&
self.f2 < other.f2
)

// Before (`le` on 2-field struct)
self.f1 < other.f1 || (!(other.f1 < self.f1) &&
(self.f2 < other.f2 || (!(other.f2 < self.f2) &&
(true)
))
)

// After
self.f1 < other.f1 || (self.f1 == other.f1 &&
self.f2 <= other.f2
)
```

(The big diff is mainly because of a past faulty rustfmt application that I corrected 😒)

Fixes #49650 and fixes #49505.
2018-04-15 03:54:15 +00:00
kennytm
070a7719bb
Rollup merge of #49886 - varkor:generate-deriving-span-tests-usability, r=nikomatsakis
Ignore copyright year when generating deriving span tests

Previously, generate-deriving-span-tests.py would regenerate all the tests anew, even if they hadn't changed. This creates unnecessary diffs that only change the copyright year. Now we check to see if any of the content of the test has changed before generating the new one.
2018-04-14 15:22:27 +08:00
Simon Sapin
3613b0b52f Move the core::char module to its own directory 2018-04-12 00:13:52 +02:00
varkor
05eed5279e Update compile-fail tests
These now spit out errors for `<=` and `>=` as well.
2018-04-11 21:28:34 +01:00
varkor
0b393e0538 Ignore copyright year when generating deriving span tests
Previously, generate-deriving-span-tests.py would regenerate all the tests anew, even if they hadn't changed. This creates unnecessary diffs that only change the copyright year. Now we check to see if any of the content of the test has changed before generating the new one.
2018-04-11 19:54:48 +01:00
Sébastien Marie
de1c929ada Use GNU version of fgrep/egrep tool if available
It is mostly for BSD system. Some tests (run-make/issue-35164 and
run-make/cat-and-grep-sanity-check) are failing with BSD
fgrep, whereas they pass with gnu version (gfgrep).
2018-03-22 14:38:05 +01:00
Corey Farwell
3a17f293b5 Remove unused 'src/etc/ziggurat_tables.py' Python script.
This Python script was used to generate a `ziggurat_tables.rs` file in
librand, but librand was moved out of the repo.

* https://github.com/rust-lang/rust/commits/master/src/librand/distributions/ziggurat_tables.rs
* https://github.com/rust-lang-nursery/rand/blob/master/utils/ziggurat_tables.py
2018-03-06 19:35:16 -05:00
Corey Farwell
2ec47e07ee Remove seemingly unused sugarise-doc-comments Python script.
This Python script converts documentation comments from the
`#[doc = "..."]` attribute to the `///` syntax. It was added six
years ago, presumably to help with the transition when `///` was
implemented and hasn't really been touched since. I don't think there's
much value in keeping it around at this point.
2018-03-05 20:27:02 -05:00
Alex Crichton
d69b24805b rust: Import LLD for linking wasm objects
This commit imports the LLD project from LLVM to serve as the default linker for
the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently
removed along with "binaryen linker" support in rustc.

Moving to LLD brings with it a number of benefits for wasm code:

* LLD is itself an actual linker, so there's no need to compile all wasm code
  with LTO any more. As a result builds should be *much* speedier as LTO is no
  longer forcibly enabled for all builds of the wasm target.
* LLD is quickly becoming an "official solution" for linking wasm code together.
  This, I believe at least, is intended to be the main supported linker for
  native code and wasm moving forward. Picking up support early on should help
  ensure that we can help LLD identify bugs and otherwise prove that it works
  great for all our use cases!
* Improvements to the wasm toolchain are currently primarily focused around LLVM
  and LLD (from what I can tell at least), so it's in general much better to be
  on this bandwagon for bugfixes and new features.
* Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD
  will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which
  means a postprocessor is no longer needed to show off Rust's "small wasm
  binary size".

LLD is added in a pretty standard way to rustc right now. A new rustbuild target
was defined for building LLD, and this is executed when a compiler's sysroot is
being assembled. LLD is compiled against the LLVM that we've got in tree, which
means we're currently on the `release_60` branch, but this may get upgraded in
the near future!

LLD is placed into rustc's sysroot in a `bin` directory. This is similar to
where `gcc.exe` can be found on Windows. This directory is automatically added
to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd`
linker which implements the interface that `wasm-ld`, LLD's frontend, expects.

Like Emscripten the LLD target is currently only enabled for Tier 1 platforms,
notably OSX/Windows/Linux, and will need to be installed manually for compiling
to wasm on other platforms. LLD is by default turned off in rustbuild, and
requires a `config.toml` option to be enabled to turn it on.

Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD
has a native option for controlling this.

[gc]: https://reviews.llvm.org/D42511
2018-03-03 20:21:35 -08:00
Matthias Krüger
7ee3e39f64 fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}} 2018-02-10 12:22:57 +01:00
Diggory Blake
36695a37c5 Implement extensible syscall interface for wasm 2018-01-30 23:22:19 +00:00
varkor
20eece1f77 Correct the return type for x86_mm256_sad_epu8
Fixes #43439.
2017-12-21 22:58:03 +00:00
Antal Szabó
926865ba2e Distribute intrinsic.natvis with the compiler for windows-msvc. 2017-12-17 23:27:40 +01:00
Sébastien Santoro
a4b4a73328 Use more convenient and UNIX-agnostic shebang
When using bash-specific features, scripts using env to call bash
are more convenient, as bash be installed in different places
according the OS.

Same applies for other languages' interpreters.
2017-12-02 01:03:59 +00:00
bors
77ab3a1d5f Auto merge of #46207 - kennytm:kill-grep, r=alexcrichton
Replace most call to grep in run-make by a script that cat the input.

Introduced a new `src/etc/cat-and-grep.sh` script (called in run-make as `$(CGREP)`), which prints the input and do a grep simultaneously. This is mainly used to debug spurious failures in run-make, such as the spurious error in #45810, as well as real errors such as #46126.

(cc #40713)

Some `grep` still remains, mainly the `grep -c` calls that count the number of matches and print the result to stdout.
2017-11-28 23:23:03 +00:00
Alex Crichton
73970bf6f2 ci: Start running wasm32 tests on Travis
This commit allocates a builder to running wasm32 tests on Travis. Not all test
suites pass right now so this is starting out with just the run-pass and the
libcore test suites. This'll hopefully give us a pretty broad set of coverage
for integration in rustc itself as well as a somewhat broad coverage of the llvm
backend itself through integration/unit tests.
2017-11-28 09:27:35 -08:00
kennytm
ab788a2ee1
Replace most call to grep in run-make by a script that cat the input.
Introduced a new src/etc/cat-and-grep.sh script (called in run-make as
$(CGREP)), which prints the input and do a grep simultaneously. This is
mainly used to debug spurious failures in run-make, such as the sanitizer
error in #45810, as well as real errors such as #46126.
2017-11-28 23:36:12 +08:00
Martin Lindhe
ece9a57d1b fix some typos 2017-11-21 15:33:45 +01:00