Marijn Haverbeke
d0d71838cd
Mention missing constructor when complaining about inexhaustive top-level pattern
...
It previously, uselessly, only pointed out the constructor when the
inexhaustive pattern was nested in some other pattern.
Closes #2337
2012-05-03 17:35:12 +02:00
Tycho Sci
1e44e04a9d
vim: Update syntax for number/float literals
2012-05-03 17:12:46 +09:00
Tycho Sci
94b0edc606
vim: Highlight Todo in comments
2012-05-03 17:02:41 +09:00
Tycho Sci
55de232426
vim: Highlight identifiers
2012-05-03 17:01:33 +09:00
Niko Matsakis
f1129635ee
report ambig impl methods
2012-05-02 21:47:14 -07:00
Niko Matsakis
f4cc5ff226
remove extra type parameter from ptr::is_null() and friends
2012-05-02 21:47:14 -07:00
Brian Anderson
358dc59538
test: xfail-win32 run-pass/native-struct
2012-05-02 19:07:35 -07:00
Brian Anderson
11354963b3
rustc: Hack around some FFI bustage. Unbreak servo
2012-05-02 18:35:29 -07:00
Brian Anderson
1e410f6206
rt: Fix some record alignment issues on windows
2012-05-02 18:32:20 -07:00
Brian Anderson
e2910bf264
Revert "rt: Fix some record alignment issues on windows"
...
This reverts commit a2457f5864
.
2012-05-02 18:25:22 -07:00
Brian Anderson
a2457f5864
rt: Fix some record alignment issues on windows
2012-05-02 17:55:58 -07:00
Brian Anderson
4c54b21a6e
core: Ignore 2 busticated getenv tests on windows
2012-05-02 17:50:15 -07:00
Tim Chevalier
0247d85575
xfail-fast class-separate-impl
2012-05-02 15:10:54 -07:00
Graydon Hoare
b12e27595e
Error message reformatting, close #2309 .
2012-05-02 14:47:33 -07:00
Tim Chevalier
c2382f9ebf
Add test for issue 2287
...
Test that it's possible to write "impl of B for A" outside a class,
where A is a class type. This didn't require any extra work, but it's
still good to have a regression test.
Closes #2287
2012-05-02 14:45:21 -07:00
Graydon Hoare
f32d9f4853
Remove unused sp_size arg passed through walk_vec{1,2} in shape code.
2012-05-02 14:36:04 -07:00
Graydon Hoare
dc6c3a8946
Make rust_shape.h agree with shape.rs about meaning of shape code #31 .
2012-05-02 14:36:04 -07:00
Tim Chevalier
e0da0dd446
Test for issue 2286
...
which is really kind of a non-issue because class methods aren't
items that can be selectively imported/exported anyhow, unlike enum
variants. But, might as well have a test.
2012-05-02 14:02:44 -07:00
Tim Chevalier
931514cfb6
Remove commented-out code and old comments that accidentally snuck in
2012-05-02 14:02:22 -07:00
Tim Chevalier
3d4ef74c9b
Encode the ifaces a class implements in metadata
...
This lets you use class A as if it had type B if A implements B,
and A and B are in different crates from your own.
Closes #2285
2012-05-02 13:38:56 -07:00
Brian Anderson
8d9f67003a
std: Do less work in the timer stress tests
2012-05-02 12:03:21 -07:00
Graydon Hoare
1c1af99052
Fix symbol mangling in the presence of trailing version numbers.
2012-05-01 17:21:06 -07:00
Graydon Hoare
79ed1f2df4
New lint pass for picking out uses of old-style vecs and str.
2012-05-01 12:58:07 -07:00
Brian Anderson
36f7ace839
Merge pull request #2322 from bkircher/fix-getopts-docs
...
Fix getopts docs
2012-05-01 10:30:39 -07:00
Tim Chevalier
46425af8a5
Remove code that was accidentally committed
...
This was a workaround for the bug that was actually fixed in
164039e867
2012-05-01 08:48:25 -07:00
Tim Chevalier
164039e867
Don't re-export a glob-imported ID when the same ID is defined within
...
a module
See the test case I added (issue-2316-c) for a concrete example.
issue-2316 also contains the originally reported test case. resolve
was using bitwise or instead of logical or when checking exports,
resulting in excessively eager evaluation. A one-line fix that took
six hours to isolate ;-)
2012-05-01 08:43:17 -07:00
Benjamin Kircher
1a19309d91
std: Fix example in getopts module docs
...
Issue #1833 .
2012-05-01 04:55:19 +02:00
Niko Matsakis
2db4259b35
Stop inferring bot/static when types/regions are unconstrained.
...
Also, some other changes that came up along the way:
- add a 'blk' region for the current block.
- detect unused type/region variables.
2012-04-30 19:53:02 -07:00
Benjamin Kircher
22254c3b48
std: Fix typo in getopts doc attribute
2012-05-01 04:12:17 +02:00
Graydon Hoare
079c3b02a8
Update llvm and integrate clang and compiler-rt.
2012-04-30 17:48:38 -07:00
Brian Anderson
5b98000279
core: Move global_env mod into os mod
2012-04-30 17:42:41 -07:00
Brian Anderson
46cc11ea88
core: Serialize all access to the environment using a weak global task
2012-04-30 17:34:29 -07:00
Brian Anderson
30385022c1
build: No tidy for test files. Closes #2271
2012-04-30 16:33:45 -07:00
Tim Chevalier
3f3339e076
Annotate FIXME (comment only)
2012-04-30 14:17:32 -07:00
Tim Chevalier
85fbfa25d7
Revert "Eliminate a copy in syntax::parse::new_parser_from_file"
...
This reverts commit 2bb3b63ec4
.
(I was confused.)
2012-04-30 11:52:07 -07:00
Tim Chevalier
2bb3b63ec4
Eliminate a copy in syntax::parse::new_parser_from_file
...
Fixing a FIXME turned out to be pretty involved. I added an io function
that returns a unique boxed string (for the contents of a file) rather than
a string, and went from there. Also made the src field of codemap a unique
boxed string. This doesn't seem to make that much difference in amount of
allocation according to valgrind (disappointingly), but I also had to introduce
a copy somewhere else pending a new snapshot, so maybe that's it.
2012-04-30 10:44:31 -07:00
Brian Anderson
dc117fecde
rustc: Use a slightly more consistent style for unexpected errors
2012-04-28 16:38:06 -07:00
Brian Anderson
c01d05f18d
std: Add 2 timer stress tests
2012-04-28 14:13:36 -07:00
Jeff Olson
caab57586a
rt/std: whitespace cleanup + work on hl/global_loop docs
2012-04-27 22:19:30 -07:00
Jeff Olson
92e88e4e2c
std: another stab at a race-free global loop implementation
...
seems to hold up pretty well.
uv::hl API is affected.. had to do work on tests and std::timer code that
leverages the global loop/high_level_loop API.
see test_stress_gl_uv_global_loop_high_level_global_timer for a stress
example.. it takes a while to run, but it exits cleanly (something I could
never accomplish with earlier iterations of the global loop)
2012-04-27 22:19:30 -07:00
Jeff Olson
577b888e4b
rt: remove unneccesary c++ functions and rust_kernel data, re: global loop
2012-04-27 22:19:30 -07:00
Jeff Olson
474e7e5e0d
std: get rid of some un-needed rustrt native fns for the global loop
2012-04-27 22:19:30 -07:00
Jeff Olson
fbaba0f404
std: add ll::loop_refcount binding for uv_loop_refcount
2012-04-27 22:19:30 -07:00
Niko Matsakis
e348567f77
new, simpler approach to the iter library
2012-04-27 16:57:50 -07:00
Brian Anderson
5eca3c2210
parser: More refactoring of restricted value name checking
2012-04-27 16:45:54 -07:00
Brian Anderson
21dc41649b
parser: Remove a restricted keyword check
...
I can't find a way to trigger this error
2012-04-27 16:45:54 -07:00
Brian Anderson
48368c5a07
test: Add test for two restricted keyword cases
2012-04-27 16:45:54 -07:00
Brian Anderson
bde5a842ce
parser: Make parse_value_path use parse_value_ident
2012-04-27 16:45:54 -07:00
Brian Anderson
8ab9efe262
parser: Rewrite parse_path_without_tps so it knows beforehand which is the last ident
...
Needed to centralize all keyword-as-value parsing in parse_value_ident
2012-04-27 16:45:54 -07:00
Brian Anderson
beece25abe
parser: Fix lookahead of > 1 token
2012-04-27 16:45:54 -07:00
Brian Anderson
345a21916c
syntax: Refactor ident parsing
2012-04-27 16:45:54 -07:00
Brian Anderson
0be41ce02b
rustc: Remove old align_of intrinsic
2012-04-27 15:40:43 -07:00
Brian Anderson
e85fc9bf00
Register snapshots
2012-04-27 14:37:09 -07:00
Brian Anderson
0d5d1175d7
compiletest: Unbreak on Win32
2012-04-27 11:55:13 -07:00
Brian Anderson
582c71731d
rustc: Clean up some enum code
2012-04-27 11:24:43 -07:00
Brian Anderson
dfc81dfa90
core: Add os::arch. Exposes target_arch string at runtime
2012-04-27 01:36:30 -07:00
Brian Anderson
09624a676a
test: Enable an assert in run-pass/rec-align-32-bit.rs
2012-04-27 00:12:42 -07:00
Brian Anderson
e4277472d2
core: Split sys::align_of into min_align_of, pref_align_of
2012-04-27 00:12:42 -07:00
Brian Anderson
f4f909b8b5
rustc: Add min_align_of, pref_align_of intrinsic, deprecate align_of
2012-04-27 00:12:39 -07:00
Brian Anderson
1c46ee34be
rustc: Add llalign_of_min
2012-04-26 21:59:59 -07:00
Brian Anderson
43751e45d9
rustc: Rename llalign_of_real to llalign_of_pref
...
This alignment is the "preferred" alignment of a type, which is not
necessarily the alignment the compiler will use when packing the
type into structures - that is the "ABI" alignment (in LLVM terms).
On x86, 64-bit ints have 8-byte preferred alignment, but 4-byte
ABI alignment.
2012-04-26 21:44:29 -07:00
Brian Anderson
3c16693760
rustc: Add LLVM bindings for more alignment-related functions
2012-04-26 21:33:38 -07:00
Brian Anderson
597d9b4dd0
test: xfail-win32 run-pass/rec-align-32-bit.rs
2012-04-26 19:55:57 -07:00
Brian Anderson
bbc4a74dc6
rt: Fix shape alignment of 64-bit ints on x86. Issue #2303
2012-04-26 18:30:58 -07:00
Tim Chevalier
8e15640ada
Refactor operator precedence code
...
Use functions instead of a dynamically created table to determine
operator precedence. Gets rid of a FIXME in syntax::parse::prec.
Change precedences from int to uint while we're at it, since
don't use negative precedences.
2012-04-26 16:16:18 -07:00
Graydon Hoare
1f92538e38
Add check for path-statements, close #400 .
2012-04-26 14:43:43 -07:00
Graydon Hoare
33a296f2fc
Lowercase warning message.
2012-04-26 14:43:43 -07:00
Graydon Hoare
61575582ba
Describe warnings on command line if user says -W help.
2012-04-26 14:43:43 -07:00
Brian Anderson
7eec6eb2bb
std: Add FIXME about time tests
2012-04-26 13:54:01 -07:00
Ted Horst
340dbcfdc8
temporary hack to make testing std::time reliable
2012-04-26 13:52:29 -07:00
Niko Matsakis
825fd1808e
lots of work to make iface/impls parameterized by regions
...
- paths can now take region parameters, replacing the dirty hack
I was doing before of abusing vstores. vstores are now a bit
of a hack though.
- fix various small bugs:
- we never checked that iface types were compatible when casting
to an iface with `as`
- we allowed nonsense like int<int>
- and more! (actually that may be it)
2012-04-25 19:26:56 -07:00
Graydon Hoare
458d2ff067
Be a bit more cautious about marking things no-throw.
2012-04-25 18:53:54 -07:00
Graydon Hoare
753b683939
More slice use in vec, io, str, ebml, metadata encoder and decoder.
2012-04-25 17:19:36 -07:00
Graydon Hoare
90c1b4645f
Set no-unwind on glue functions that don't drop resources.
2012-04-25 17:19:36 -07:00
Graydon Hoare
fa6c68a025
Set no-unwind attribute on all upcalls other than fail.
2012-04-25 17:19:36 -07:00
Graydon Hoare
a2f04efd59
Register snapshots.
2012-04-25 17:19:36 -07:00
Brian Anderson
e21161b336
test: Fix run-pass/enum-mach-type-compat on x86
2012-04-25 16:06:57 -07:00
Brian Anderson
60ec812b3a
test: Fix and un-xfail run-pass/use
2012-04-25 15:58:33 -07:00
Brian Anderson
c9439ad755
test: Remove run-pass/user.rs. Old test for unimplemented feature
2012-04-25 15:56:21 -07:00
Brian Anderson
3a3a7fc426
rustc: Cache normalized types
2012-04-25 15:49:27 -07:00
Brian Anderson
df0ef528b9
rustc: Use LLVM named structs for enum types
2012-04-25 15:49:25 -07:00
Marijn Haverbeke
10120cce0f
typeck: Take more care to pass down expected types
...
This helps with prototype inference and avoids some 'must be known
in this context' errors.
2012-04-25 17:45:29 +02:00
Marijn Haverbeke
2b71535cf9
Register new snapshot
...
(With the fix for #2185 included.)
2012-04-25 12:57:08 +02:00
Marijn Haverbeke
9f99c3263b
Rewrite exhaustiveness checker
...
Issue #2111
2012-04-25 09:15:17 +02:00
Brian Anderson
c9e3f387f4
syntax: Divide keywords into contextual/restricted. No bad words
2012-04-24 22:58:00 -07:00
Brian Anderson
08d0707556
syntax: Make 'true' and 'false' bad words
...
When these are idents they are always shadowed by the boolean
constants.
2012-04-24 22:00:32 -07:00
Brian Anderson
98ac8d4625
syntax: Clean up the bad_expr_word functions
2012-04-24 21:12:16 -07:00
Brian Anderson
7ee90cc7be
syntax: Rename is_word to is_keyword, etc.
2012-04-24 21:08:49 -07:00
Brian Anderson
5a0c564817
Revert "rustc: Use LLVM named structs for enum types"
...
This reverts commit 6e909e387d
.
2012-04-24 20:47:06 -07:00
Brian Anderson
b88ecec08c
Revert "rustc: Cache normalized types"
...
This reverts commit 06afe21c03
.
2012-04-24 20:47:00 -07:00
Brian Anderson
06afe21c03
rustc: Cache normalized types
2012-04-24 18:24:35 -07:00
Brian Anderson
6e909e387d
rustc: Use LLVM named structs for enum types
2012-04-24 18:24:35 -07:00
Graydon Hoare
929c3dd710
Workarounds for bug #2280 : add some temporaries for borrowing.
2012-04-24 15:19:01 -07:00
Brian Anderson
e7dbf42214
rustc: Fix type_need_unwind_cleanup. Closes #2272
2012-04-24 14:55:16 -07:00
Brian Anderson
5437a045fc
rustc: Remove a bitcast. Issue #2276
2012-04-24 14:00:50 -07:00
Brian Anderson
31853f31bf
build: Don't require full target libs to run compiletest tests
...
Only build through librustsyntax, which some tests do rely on.
2012-04-24 13:30:03 -07:00
Tim Chevalier
2d793ef498
Add a cross-crate test for casting classes to ifaces
2012-04-24 10:47:53 -07:00
Brian Anderson
b4a3d525d8
rustc: Eliminate trans dependency from metadata::tyencode
2012-04-23 23:41:18 -07:00
Tim Chevalier
f7641286b2
Allow classes to be cast to ifaces that are in the same crate
...
I had to xfail one existing test case (class-implements-int) because,
I think, of the same bug described in #2272 .
2012-04-23 21:15:03 -07:00
Tim Chevalier
1c39fda0ea
Rename option::get_or_default to get_default, for consistency
2012-04-23 20:52:50 -07:00