Brian Anderson
6b6acde972
Add a license check to tidy. #4018
2013-01-17 23:28:42 -08:00
Tim Chevalier
1244c0b6fd
rustc: One Less Bad Copy
2013-01-17 19:17:24 -08:00
Niko Matsakis
440f8dfc4e
Correct tests
...
rs=breakage
2013-01-17 18:45:57 -08:00
Niko Matsakis
532c94d0f1
Propagate expected types through block expressions.
...
r=graydon
2013-01-17 18:45:48 -08:00
Niko Matsakis
9fed56ed90
When decoding types, indicate to the def-id conversion function what kind of
...
def-id we have, so that the inliner can distinguish between external and
internal def-ids. Also add some comments explaining the distinction!
Fixes #4516 .
r=graydon
2013-01-17 18:45:45 -08:00
Patrick Walton
f405e41d7a
librustc: Implement write guards for borrowing @mut
to &
or &mut
. r=nmatsakis
2013-01-17 11:50:20 -08:00
Tim Chevalier
8bde2c1d65
Minor cleanup and eliminate a bad copy
2013-01-16 19:29:38 -08:00
Patrick Walton
a2ec5400ff
Merge pull request #4493 from jbclements/rename-moved-variable-to-moved-value
...
s/moved variable/moved value/
2013-01-16 12:30:55 -08:00
Graydon Hoare
989667e545
librustc: minor missing change for crate-as-struct.
2013-01-15 17:57:45 -08:00
Graydon Hoare
84825ee310
librustc: Make the default sigil for block lambdas &
instead of @
.
2013-01-15 17:57:45 -08:00
Brian Anderson
bd6536f868
Merge pull request #4497 from ILyoan/i4488
...
When building a test runner, don't remove the main function
2013-01-15 17:27:45 -08:00
ILyoan
a63b11a009
when test, just remove #[main] attr
2013-01-15 17:06:37 +09:00
Erick Tryzelaar
293cd3480c
convert ast::{field_,capture_item_,mt} and middle::ty::mt into structs
2013-01-14 21:36:27 -08:00
Erick Tryzelaar
4bcd19f6be
Convert ast::{pat,field_pat,local_,arm} into structs
2013-01-14 20:52:28 -08:00
Erick Tryzelaar
0b9e23146b
convert ast::crate_ into a struct.
2013-01-14 19:06:59 -08:00
Erick Tryzelaar
4b0f702608
convert ast::attribute_ and ast::view_item to a struct
2013-01-14 18:15:54 -08:00
Erick Tryzelaar
1f5e9ff362
convert ast::struct_def to a struct
2013-01-14 18:15:54 -08:00
Erick Tryzelaar
530a113bfa
convert ast::item into a struct
2013-01-14 18:15:53 -08:00
Erick Tryzelaar
ebea895d02
convert ast::struct_dtor_ into a struct
2013-01-14 18:14:17 -08:00
Erick Tryzelaar
5c0d674a45
convert ast::foreign_item to a struct
2013-01-14 18:14:16 -08:00
Erick Tryzelaar
df7d376d25
Convert ast::def_id into a struct.
2013-01-14 18:14:16 -08:00
Erick Tryzelaar
bea67bde21
Change ast::path into a struct.
2013-01-14 18:14:16 -08:00
John Clements
3bf8b8af98
s/moved variable/moved value/
2013-01-14 17:38:22 -08:00
Tim Chevalier
a4dc65baa1
syntax/rustc: Eliminate some bad copies
...
r=pcwalton
2013-01-14 15:49:53 -08:00
ILyoan
b7cefd0c96
allowing the entry point name to be something other than main
...
add build tests
2013-01-14 13:58:13 -08:00
Brian Anderson
e6b57f858f
Add FIXME's for #4404 . Android JNI hacks
2013-01-13 16:43:39 -08:00
kyeongwoon
987f824f23
Support ARM and Android
...
Conflicts:
src/libcore/os.rs
src/librustc/back/link.rs
src/librustc/driver/driver.rs
src/librustc/metadata/loader.rs
src/librustc/middle/trans/base.rs
2013-01-13 16:43:39 -08:00
Tim Chevalier
fbc33e0247
Merge pull request #4459 from jld/constenum
...
Allow consts to be initialized by non-nullary enum constructors
2013-01-13 14:42:57 -08:00
Jed Davis
1b01629f18
Make vectors (& old ports) of zero-size types allocate one byte each.
2013-01-13 14:37:59 -08:00
Jed Davis
ea53c48ca2
Make empty structs debug-printable
2013-01-13 14:37:59 -08:00
Jed Davis
1b4f3fad1e
Correct (I hope) amd64 ABI handling for empty structs
2013-01-13 14:37:59 -08:00
Jed Davis
cd01ecfe13
One more place where for loops and their bodies need to be unconfused.
2013-01-13 14:37:59 -08:00
Jed Davis
33414d81d1
Fix long lines in for loop trans change
2013-01-13 14:37:59 -08:00
Niko Matsakis
c75d45d7e3
For for
loop bodies, translate the type of the closure
...
based on the expr_loop_body expression and not the inner closure
2013-01-13 14:37:59 -08:00
Jed Davis
745a020db5
Make () actually size 0
2013-01-13 14:37:59 -08:00
Jed Davis
349fa1e550
Omit needless zeroes for C-like variants of non-C-like enums
2013-01-11 23:42:51 -08:00
Jed Davis
abae61257c
Allow consts to be non-nullary enum constructors
2013-01-11 23:42:51 -08:00
Jed Davis
f76e28aa1c
Allow consts' LLVM types to depend on their initializers.
...
Loosening the connection between the LLVM type and the Rust type
is necessary to use non-nullary enum constructors as const initializers,
because the const needs to be initialized with data of the actual type of
the variant in question, which is (generally) not the same as the u8
array in the `type_of` type.
Thus, referring to a const now requires casting the LLVM global to the
expected pointer type instead of using it as-is.
2013-01-11 23:42:51 -08:00
Jed Davis
452642422d
Factor out base::get_discrim_val from const translation
2013-01-11 23:42:51 -08:00
Tim Chevalier
847d30db66
Merge pull request #4445 from apasel422/notop
...
Allow logical negation operator (!) to be overloaded
2013-01-11 20:10:51 -08:00
Tim Chevalier
cfa62cd5ee
Make ast_util::path_name_i take a slice vector, eliminate a bad copy
2013-01-11 15:19:05 -08:00
Andrew Paseltiner
0de7aa5506
allow logical negation operator (!) to be overloaded
2013-01-11 14:31:44 -05:00
Patrick Walton
a0c2a9b743
librustc: Implement a #[no_mangle] attribute to suppress name mangling. r=brson
...
This is very helpful for SDL, as SDL wants you to define a function named
`SDL_main`.
2013-01-10 21:44:59 -08:00
Patrick Walton
ca71c6ec5b
librustc: Make all external functions unsafe. r=tjc
2013-01-10 21:24:08 -08:00
Tim Chevalier
42095221f4
Properly suppress derived type error messages
...
Previously, the typechecker suppressed many but not all errors,
by suppressing errors where the actual type was either ty_err, or
a function type whose result was ty_err. Added a has_ty_err flag
to the type flags so as to suppress errors for any types involving
ty_err.
r=nmatsakis
2013-01-10 20:15:04 -08:00
Niko Matsakis
737e115646
mode: reset mode on entry to fn body.
...
This is an interim fix to address the "Beware!" unsoundness. I have a
more comprehensive rewrite of mode.rs in the pipeline.
r=pcwalton
2013-01-10 13:17:25 -08:00
Patrick Walton
2a1b6c4de9
librustc: Implement &static
as the replacement for Durable
. r=nmatsakis
2013-01-10 11:16:54 -08:00
Patrick Walton
982830c836
librustc: Allow the type parameter version of Self
to be spelled with a capital S
2013-01-10 10:37:22 -08:00
Niko Matsakis
2b92962aa2
A collection of refactorings that I found it hard/tiresome to divide:
...
- Make `extern fn()` assignable to any closure type, rather than
a subtype.
- Remove unused int_ty_set and float_ty_set
- Refactor variable unification and make it more DRY
- Do fn sub/lub/glb on the level of fn_sig
- Rename infer::to_str::ToStr to infer::to_str::InferStr
- Capitalize names of various types
- Correct hashing of FnMeta
- Convert various records-of-fns into structs-of-fns. This is both
eliminating use of deprecated features and more forwards compatible
with fn reform.
r=pcwalton
2013-01-09 14:59:07 -08:00
Graydon Hoare
dd5734d487
rustc: more fallout from 2db3abd
2013-01-09 09:49:11 -08:00