Commit Graph

1199 Commits

Author SHA1 Message Date
Alisdair Owens
130e8d4ff2 add long diagnostics for E0214 2015-09-03 17:01:50 +01:00
Nick Cameron
facdf2ebb1 Add an intital HIR and lowering step 2015-09-03 10:02:36 +12:00
bors
7780408af6 Auto merge of #28132 - arielb1:uninstantiable, r=nikomatsakis
It is *very* easy to bypass, and is a relic of a bygone age where the type-checker was *much* less robust.

Fixes #27497

r? @nikomatsakis
2015-09-01 23:51:47 +00:00
bors
19a33edaa9 Auto merge of #28060 - GuillaumeGomez:patch-3, r=Manishearth
Part of #24407

r? @Manishearth
2015-09-01 11:58:28 +00:00
Guillaume Gomez
ae0409b695 Add E0439 error explanation 2015-09-01 01:22:44 +02:00
Guillaume Gomez
7daf235277 Add E0440 error explanation 2015-09-01 01:22:44 +02:00
Guillaume Gomez
dc70eca9a4 Add E0441 error explanation 2015-09-01 01:22:43 +02:00
Guillaume Gomez
9259418d26 Add E0443 error explanation 2015-09-01 01:22:43 +02:00
Guillaume Gomez
297b77d49b Add E0442 error explanation 2015-09-01 01:22:43 +02:00
bors
2d3e8379c8 Auto merge of #28079 - huonw:simd, r=alexcrichton
This adds a new Python script (compatible with 2.7 and 3.x) that will consume some JSON files that define a platform's intrinsics. It can output a file that defines the intrinsics in the compiler, or an `extern` block that will import them.

The complexity of the generator is to be DRY: platforms (especially ARM and AArch64) have a lot of repetition with their intrinsics, for different versions with different types, so being able to write it once is nice.
2015-08-31 21:34:08 +00:00
Ariel Ben-Yehuda
321f8d81b8 remove the is_instantiable check
Fixes #27497
2015-08-31 23:54:15 +03:00
bors
f9f82f8dc8 Auto merge of #28009 - GuillaumeGomez:patch-1, r=Manishearth
r? @Manishearth
2015-08-31 16:52:46 +00:00
bors
811868ec6f Auto merge of #28103 - GuillaumeGomez:fix-intrinsic, r=huonw
Fixes #28062
2015-08-31 03:00:21 +00:00
bors
8f28c9b01e Auto merge of #28007 - Ms2ger:FnKind, r=nrc
There is no longer a need for that pattern, since enums are now qualified.
2015-08-31 01:09:40 +00:00
Guillaume Gomez
bc024d261e Add compile-fail test for E0444 2015-08-30 11:29:34 +02:00
Guillaume Gomez
4ad7cbaa51 Add E0444 error code explanation 2015-08-30 09:53:05 +02:00
Guillaume Gomez
78feb4ddf9 Add checkup on number of arguments 2015-08-30 09:52:34 +02:00
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
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
Alisdair Owens
8ae2b1d7dd add long diagnostics for E0122 2015-08-29 17:20:46 +01:00
Manish Goregaokar
a3b32ebda4 Rollup merge of #28010 - GuillaumeGomez:patch-2, r=Manishearth
r? @Manishearth
2015-08-28 03:38:36 +05:30
Guillaume Gomez
fbbd874171 Comment out unused error codes in librustc_typeck/diagnostics.rs 2015-08-27 19:16:40 +02:00
Guillaume Gomez
acafe3b730 Add E0370 error explanation 2015-08-26 14:43:28 +02:00
Guillaume Gomez
805e4e6fd1 Remove unnecessary empty lines 2015-08-26 14:28:42 +02:00
Guillaume Gomez
dfb0677bee Remove unnecessary whitespace 2015-08-26 14:23:51 +02:00
Guillaume Gomez
9f15b28119 Add missing ';' in E0132 2015-08-26 14:21:46 +02:00
Guillaume Gomez
0c4faf2a07 Add erroneous code example for E0131 2015-08-26 14:21:03 +02:00
Guillaume Gomez
af02bccb41 Fix typo in E0087 2015-08-26 14:16:12 +02:00
Guillaume Gomez
5d8dc9076b Improve E0025 error explanation 2015-08-26 13:38:27 +02:00
Guillaume Gomez
612221ff80 Improve E0063 error explanation 2015-08-26 13:30:34 +02:00
Guillaume Gomez
9e51cee69a Improve E0062 error explanation 2015-08-26 13:22:55 +02:00
Guillaume Gomez
dddc4ca90b Improve E0046 2015-08-26 13:13:18 +02:00
Guillaume Gomez
b874660c64 Fix typo 2015-08-26 12:56:23 +02:00
Guillaume Gomez
e13d659c12 Add span_help for E0044 2015-08-26 12:50:31 +02:00
Ms2ger
2076cddcf2 Rename FnKind variants and stop re-exporting them from the visit module.
There is no longer a need for that pattern, since enums are now qualified.
2015-08-26 12:02:58 +02:00
Ariel Ben-Yehuda
277eeb95c3 move destructors_for_type into AdtDef 2015-08-25 21:52:15 +03:00
Ariel Ben-Yehuda
2f052eb0b1 use the parameter environment when checking dtors
This makes it more uniform. No functional changes.
2015-08-25 18:50:26 +03:00
Ariel Ben-Yehuda
65e9bc0c93 store the CodeExtent directly in FreeRegion
this makes the code cleaner
2015-08-24 20:46:52 +03:00
Ariel Ben-Yehuda
fc304384e6 Use a Vec instead of an HashMap for the scope hierarchy
This increases regionck performance greatly - type-checking on
librustc decreased from 9.1s to 8.1s. Because of Amdahl's law,
total performance is improved only by about 1.5% (LLVM wizards,
this is your opportunity to shine!).

before:
576.91user 4.26system 7:42.36elapsed 125%CPU (0avgtext+0avgdata 1142192maxresident)k
after:
566.50user 4.84system 7:36.84elapsed 125%CPU (0avgtext+0avgdata 1124304maxresident)k

I am somewhat worried really need to find out why we have this Red Queen's
Race going on here. Originally I suspected it may be a problem from RFC1214's
warnings, but it seems to be an effect from other changes.

However, the increase seems to be mostly in LLVM's time, so I guess
it's the LLVM wizards' problem.
2015-08-24 20:24:38 +03:00
Ariel Ben-Yehuda
316510f5e2 split ReInfer into ReVar and ReSkolemized
this should reduce the size of ty::Region to 24 bytes (from 32),
and they are treated differently in most cases anyway.
2015-08-24 20:10:25 +03:00
bors
797d0ba59c Auto merge of #27857 - Manishearth:improve-fnkind, r=pnkfelix
Since enums are namespaced now, should we also remove the `Fk` prefixes from `FnKind` and remove the reexport? (The reexport must be removed because otherwise it clashes with glob imports containing `ItemFn`). IMO writing `FnKind::Method` is much clearer than `FkMethod`.
2015-08-24 12:47:57 +00:00
Niko Matsakis
c0de23de81 convert to use is_local instead of == LOCAL_CRATE 2015-08-24 05:35:34 -04:00
Niko Matsakis
e91bef2e05 fallout from moving def-id 2015-08-24 05:35:34 -04:00
bors
0e71bda242 Auto merge of #27586 - GuillaumeGomez:patch-2, r=Manishearth
Part of #24407.

This PR doesn't have code example since I didn't find how to raise it. If someone finds a code which does, please say it !

cc @pnkfelix
cc @eddyb
r? @Manishearth
2015-08-23 20:02:35 +00:00
Manish Goregaokar
0642d99e81 add help for E0390 2015-08-23 01:11:07 +02:00
Guillaume Gomez
a37af48ff1 Remove E0103 long error explanation until we don't know what's going on 2015-08-23 01:05:49 +02:00
Guillaume Gomez
962b61f4f5 Improve error explanation and example in E0390 2015-08-23 00:56:44 +02:00
Guillaume Gomez
633fe44639 Add tip for E0369 2015-08-23 00:52:23 +02:00
Guillaume Gomez
565070948f Add example for E0390 2015-08-23 00:50:19 +02:00