Commit Graph

46048 Commits

Author SHA1 Message Date
Huon Wilson
29dcff3aa2 Support different scalar integer widths in Rust v. LLVM.
Some x86 C intrinsics are declared to take `int ...` (i.e. exposed in
Rust as `i32`), but LLVM implements them by taking `i8` instead.
2015-08-29 20:11:23 -07:00
Huon Wilson
daf8bdca57 Fix typos in some x86 and arm intrinsics. 2015-08-29 20:11:23 -07:00
Huon Wilson
3e9b726576 Style the generator script more PEP8y. 2015-08-29 19:26:48 -07:00
bors
f3f23bf9c5 Auto merge of #28086 - AlisdairO:diagnostics281, r=arielb1
As title :-)
Part of #24407.

r? @Manishearth
2015-08-30 00:38:05 +00:00
Huon Wilson
24416a2151 Autogenerate most x86 platform intrinsics. 2015-08-29 15:36:17 -07:00
Huon Wilson
5a167bdb4c Allow unused imports in the generator. 2015-08-29 15:36:17 -07:00
Huon Wilson
bea3f096ee Add support for arbitrary metadata for numbers and widths.
This means that each platform has total control over the formatting info
it needs.
2015-08-29 15:36:16 -07:00
Huon Wilson
083f613044 Autogenerate most ARM platform intrinsics. 2015-08-29 15:36:16 -07:00
Huon Wilson
3ef610b627 Autogenerate most AArch64 platform intrinsics. 2015-08-29 15:36:16 -07:00
Huon Wilson
73811917f4 Add the platform intrinsic generator script.
This python script will consume an appropriately formatted JSON file and
output either a Rust file for use in librustc_platform_intrinsics, or an
extern block for importing the intrinsics in an external library.

The --help flag has details.
2015-08-29 15:36:16 -07:00
Huon Wilson
72382d247a Avoid eagerly stripping the common platform prefix.
This works better with the code generation approach.
2015-08-29 15:36:16 -07:00
Huon Wilson
ee2de27996 Add support for aggregates in platform intrinsics.
This adds support for flattened intrinsics, which are called in Rust
with tuples but in LLVM without them (e.g. `foo((a, b))` becomes `foo(a,
b)`). Unflattened ones could be supported, but are not yet.
2015-08-29 15:36:16 -07:00
Huon Wilson
b03ca7f805 Separate integers into signed and unsigned.
This is necessary to reflect the ARM APIs accurately, since some
functions explicitly take an unsigned parameter and a signed one, of the
same integer shape, so the no-duplicates check will fail unless we
distinguish.
2015-08-29 15:36:16 -07:00
bors
9982314577 Auto merge of #28077 - jonas-schievink:attr-gateage, r=huonw
This allows marking attributes as whitelisted/crate-only independent of
their feature gate status.

Closes #24213
2015-08-29 21:59:24 +00:00
bors
09dd65c2f6 Auto merge of #28090 - mystor:derive-unsafe-trait, r=Manishearth 2015-08-29 19:07:19 +00:00
Michael Layzell
38d450fad2 Allow #[derive()] to generate unsafe trait impls 2015-08-29 14:50:05 -04:00
Alisdair Owens
8ae2b1d7dd add long diagnostics for E0122 2015-08-29 17:20:46 +01:00
Alisdair Owens
9ed30c6214 add diagnostics for E0281 2015-08-29 16:50:35 +01:00
Jonas Schievink
4b571b055d Handle gateage of built-in attributes seperately
This allows marking attributes as whitelisted/crate-only independent of
their feature gate status.

Closes #24213
2015-08-29 11:37:40 +02:00
bors
3f002a4c6e Auto merge of #28080 - huonw:travis++, r=alexcrichton
It is very difficult to find tidy problems in the midst of the output of
the LLVM/jemalloc/etc. build, and travis is great for the former, so
lets remove that problem.
2015-08-29 06:36:51 +00:00
Huon Wilson
91a9260a16 Run tidy by itself on travis.
It is very difficult to find tidy problems in the midst of the output of
the LLVM/jemalloc/etc. build, and travis is great for the former, so
lets remove that problem.
2015-08-28 22:59:00 -07:00
bors
477561de4e Auto merge of #28078 - apasel422:patch-1, r=alexcrichton 2015-08-29 04:58:45 +00:00
bors
e9111e6a0e Auto merge of #28070 - mdchoate:patch-1, r=alexcrichton 2015-08-29 03:20:37 +00:00
Andrew Paseltiner
010b7f3621 Remove superfluous line from Nomicon 2015-08-28 22:07:02 -04:00
bors
d3b367efb3 Auto merge of #28042 - Jake-Shadle:master, r=steveklabnik
Encountered an issue with `pacman` while going through the guide for installing the `mingw` toolchain on Windows with `msys2`, after some googling I found the [solution](https://github.com/Alexpux/MSYS2-packages/issues/163#issuecomment-73555971).

I thought it would be good to update the README so people don't get frustrated. 😃 

r? @steveklabnik
2015-08-29 01:43:16 +00:00
bors
d50352419e Auto merge of #28043 - apasel422:rfc-1194, r=alexcrichton 2015-08-29 00:06:04 +00:00
bors
3c100de75a Auto merge of #27900 - SimonSapin:Chars_as_str, r=alexcrichton
See #27775.

r? @alexcrichton
2015-08-28 22:29:23 +00:00
bors
5d955e1740 Auto merge of #28068 - apasel422:debug-builders, r=sfackler
This appears to have been an oversight, as the structs are stable but only nameable through `core::fmt`.
2015-08-28 20:52:16 +00:00
Simon Sapin
e33650c16f Add .as_str() to str::Chars and str::CharIndices. See #27775. 2015-08-28 22:44:17 +02:00
bors
55ad22fa8f Auto merge of #28067 - apasel422:issue-20803, r=alexcrichton
closes #20803
2015-08-28 19:15:12 +00:00
Michael Choate
645d7ae739 Fix typo in loops.md 2015-08-28 14:34:15 -04:00
Jake Shadle
7ab8ed84fd Update README.md
Use suggested composite command instead of 2 separate commands.
2015-08-28 20:24:13 +02:00
Andrew Paseltiner
f6cfad6848 re-export debug builders in std::fmt 2015-08-28 13:39:25 -04:00
bors
0e8538d477 Auto merge of #28063 - steveklabnik:gh28053, r=alexcrichton
Fixes #28053
2015-08-28 17:15:07 +00:00
Andrew Paseltiner
4f3f55cc66 add test for #20803
closes #20803
2015-08-28 12:54:17 -04:00
Andrew Paseltiner
f9b63d3973 implement RFC 1194 2015-08-28 12:41:54 -04:00
Steve Klabnik
1c44722375 Be explicit about using crates.io's libc crate
Fixes #28053
2015-08-28 11:43:23 -04:00
bors
ab792abf1f Auto merge of #28047 - steveklabnik:doc_print, r=alexcrichton 2015-08-28 13:48:09 +00:00
Cesar Eduardo Barros
73e7a72695 Add issue number to read_exact unstable declarations 2015-08-28 06:33:50 -03:00
Jake Shadle
371c0ead1f Update README.md
Folded in suggestion from @brson to simply put the mirror update step in the regular set of tool chain install commands.
2015-08-28 09:46:23 +02:00
bors
6f28232756 Auto merge of #28054 - zaeleus:ios-imports, r=alexcrichton
This fixes building for ios targets caused by 7925c79.
2015-08-28 04:28:23 +00:00
bors
3a80411415 Auto merge of #28038 - durka:grep-unstable-issue-refs, r=alexcrichton
After submitting #28031, I ran a [script](https://gist.github.com/durka/a5243440697c780f669b) on the rest of src/ and found some anomalies. In this PR are the fixes that I thought were obvious (but I might be wrong!). The others I've submitted in issue #28037.
2015-08-28 02:49:45 +00:00
bors
20a8412e09 Auto merge of #27956 - withoutboats:extend_string, r=alexcrichton
If you have an `Iterator<Item=String>` (say because those items were generated using `.to_string()` or similarly), borrow semantics do not permit you map that to an `Iterator<&'a str>`. These two implementations close a small gap in the `String` API.

At the same time I've also made the names of the parameters to `String`'s `Extend` and `FromIterator` implementations consistent.
2015-08-28 01:06:51 +00:00
Michael Macias
c5ab1166e7 std: Fix backtrace imports for ios targets
This fixes building for ios targets caused by 7925c79.
2015-08-27 18:47:15 -05:00
bors
8dba06aeee Auto merge of #28052 - Manishearth:rollup, r=Manishearth
- Successful merges: #28010, #28013, #28022, #28029, #28033, #28039, #28045, #28048
- Failed merges:
2015-08-27 23:25:38 +00:00
Steve Klabnik
d9819b76d2 Add some examples for the print! macro 2015-08-27 19:02:45 -04:00
Manish Goregaokar
a63cd9b5a1 Rollup merge of #28048 - steveklabnik:doc_unimplemented, r=alexcrichton 2015-08-28 03:38:38 +05:30
Manish Goregaokar
1c7c6adf5f Rollup merge of #28045 - apasel422:iter, r=sfackler 2015-08-28 03:38:38 +05:30
Manish Goregaokar
07d1a22ce5 Rollup merge of #28039 - birkenfeld:option_result_ref_intoiter, r=alexcrichton
Fixes #27996.

Does this need any `#[stable]`/`#[unstable]` attributes?
2015-08-28 03:38:37 +05:30
Manish Goregaokar
0833d87762 Rollup merge of #28033 - Manishearth:compilerexpn, r=eddyb
We were using them for every expansion, instead of using `Name`.

Also converted `CompilerExpansion` into an enum so its nicer to use and takes up less space.

Will profile later, but this should be a small improvement in memory usage.

r? @eddyb
2015-08-28 03:38:37 +05:30