Brian Anderson
b01d2babaf
rt: Comment out an assert in rust_kernel. #4711
2013-02-28 14:21:39 -08:00
bors
0d30af1ebe
auto merge of #5166 : danniel/rust/incoming, r=brson
...
I copied and adapted the syntax highlighting rules from Kate, to be used in GEdit and other GtkSourceView based editors.
2013-02-28 13:48:49 -08:00
Niko Matsakis
febdb49e92
Change bare functions so that they are represented by a single pointer.
...
The basic idea is that we add a new kind of adjustment, AutoAddEnv, that pads
an extern fn into a closure by adding the extra NULL word. Then there are a few
misc changes in trans to get the LLVM types to match up.
Fixes #4808 .
2013-02-28 16:03:49 -05:00
Patrick Walton
2859c1ac6d
librustc: Enforce cross-crate method privacy
2013-02-28 11:32:26 -08:00
Patrick Walton
09a2b4e599
librustc: Make methods private if the impl is private
2013-02-28 11:32:26 -08:00
Patrick Walton
107bf96ff0
librustc: Mark all type implementations public. rs=impl-publicity
2013-02-28 11:32:24 -08:00
Erick Tryzelaar
d2c4b6492d
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2013-02-28 07:25:49 -08:00
Erick Tryzelaar
3953bdd812
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2013-02-28 07:25:31 -08:00
sevrak
833ad6018e
Fix license attribute on crates
2013-02-28 13:34:01 +00:00
Daniel Ursache Dogariu
1bcd4c674c
Add syntax highlighting support for GtkSourceView / GEdit
2013-02-28 11:52:25 +02:00
bors
b171d0ef7b
auto merge of #5159 : brson/rust/rtcall, r=brson
2013-02-28 01:12:38 -08:00
bors
c705440ee3
auto merge of #5155 : bstrie/rust/dedrop, r=pcwalton
...
This removes all but 6 uses of `drop {}` from the entire codebase. Removing any of the remaining uses causes various non-trivial bugs; I'll start reporting them once this gets merged.
2013-02-27 23:30:40 -08:00
bors
fcd4af169f
auto merge of #5152 : catamorphism/rust/issue-3601, r=catamorphism
2013-02-27 22:15:38 -08:00
bors
6bff18ea0d
auto merge of #5098 : pkgw/rust/pr/issue4869, r=brson
...
See issue #4869 . I'm not quite sure what constitutes "consensus from the core team" (cf. discussion in the issue), but this at least demonstrates that the proposed change is pretty straightforward.
After this change, there are no new test failures. I've un-ignored the `to_str` vectors test; it's not at all obvious to me why it'd be problematic, and it passes on my Linux machine.
2013-02-27 20:39:39 -08:00
Brian Anderson
4a04a188e3
Convert NOTEs to FIXMEs
2013-02-27 18:44:35 -08:00
Brian Anderson
2f858de1c3
Remove the last remnants of rtcalls
2013-02-27 18:34:04 -08:00
bors
d0a12347de
auto merge of #5141 : nikomatsakis/rust/region-syntax-expl-lifetimes, r=nikomatsakis
...
Major changes are:
- replace ~[ty_param] with Generics structure, which includes
both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;
cc #4846
r? @graydon
2013-02-27 17:36:41 -08:00
bors
269409f912
auto merge of #5149 : brson/rust/rt, r=brson
...
Just a few minor things required for freestanding Rust.
2013-02-27 16:42:42 -08:00
Niko Matsakis
c623d21e38
Introduce lifetime declarations into the lists of type parameters.
...
Major changes are:
- replace ~[ty_param] with Generics structure, which includes
both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;
cc #4846
2013-02-27 19:42:09 -05:00
Ben Striegel
43d43adf6b
Turn old drop
blocks into Drop
traits
2013-02-27 19:14:19 -05:00
bors
6ebc761f99
auto merge of #5140 : yjh0502/rust/issue_4458, r=catamorphism
...
Fix is a bug fix for issue #4458 .
This patch is quite straight-forward. A test for result_str() is added.
2013-02-27 15:45:41 -08:00
Tim Chevalier
dbbdca31b4
testsuite: Update and un-xfail #3601 test
2013-02-27 14:33:19 -08:00
Erick Tryzelaar
7f5d4cbda0
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2013-02-27 14:05:39 -08:00
bors
33e7a1f087
auto merge of #5145 : Kimundi/rust/incoming, r=catamorphism
2013-02-27 13:27:48 -08:00
Brian Anderson
1b1017087b
rt: Make some runtime calls work outside of task context
2013-02-27 12:39:11 -08:00
bors
5fc0eccdfa
auto merge of #5070 : youknowone/rust/struct-match2, r=nikomatsakis
...
It is reversed that type of arm pattern and type of search pattern
in error message.
2013-02-27 12:21:49 -08:00
Erick Tryzelaar
7d0ec86c4a
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2013-02-27 11:03:21 -08:00
Jeong YunWon
35baf5b202
Fix reversed current/expected type
...
Fix some reversed type of arm pattern and type of search pattern
in error message.
2013-02-28 03:31:22 +09:00
Patrick Walton
07c3f5c0de
librustc: Forbid pub
or priv
before trait implementations
2013-02-27 09:40:16 -08:00
Patrick Walton
573a31dfa7
libsyntax: Forbid mutable vectors. rs=demuting
2013-02-27 09:40:16 -08:00
Patrick Walton
8d7e6ef772
libsyntax: Forbid ~mut
and ~const
. rs=demuting
2013-02-27 09:40:15 -08:00
Marvin Löbel
c2be2ec42d
Added ToStr implementations for &[T] and @[T]
2013-02-27 16:02:53 +01:00
bors
061a223723
auto merge of #5118 : youknowone/rust/match-guard, r=nikomatsakis
...
Fix ICE while there is no remained arms after checking guards.
This fix #3601 also.
2013-02-27 06:06:44 -08:00
Jihyun Yu
5ae9b2949f
Fix: now sha1 result_str() return correct value
2013-02-27 22:48:55 +09:00
bors
8e492ccaa7
auto merge of #5123 : thestinger/rust/treemap, r=nikomatsakis
...
* replace the dual next() and get() calls with a single next() function
* drop one of the pointer members from the struct
* add a method for using the lazy iterator with a for loop
2013-02-27 05:18:39 -08:00
Daniel Micay
5b0a2d1fc0
treemap: improve the lazy iterator
...
* replace the dual next() and get() calls with a single next() function
* drop one of the pointer members from the struct
* add a method for using the lazy iterator with a for loop
2013-02-27 05:30:15 -05:00
bors
f4e8ac21cd
auto merge of #5135 : brson/rust/start, r=pcwalton
...
r?
#3406
Pretty straightforward. I'm using opaque pointers instead trying to get trans and core to agree on the types of the main function and crate map. One oddity is that this required changing the order of the `-lrustrt` argument to the linker in order to resolve `upcall_new_stack`. Linkers are mysterious.
2013-02-26 23:45:39 -08:00
Erick Tryzelaar
ea36a0dee1
libsyntax: add some more explicit copies
2013-02-26 20:48:12 -08:00
Erick Tryzelaar
da7aedc230
libsyntax: add some explicit refs
2013-02-26 20:48:12 -08:00
Erick Tryzelaar
5271464cc0
libsyntax: remove vecs_implicitly_copyable from the syntax extensions
2013-02-26 20:48:12 -08:00
Erick Tryzelaar
5f1652f34f
libsyntax: remove vecs_implicitly_copyable from the printer
2013-02-26 20:48:11 -08:00
Erick Tryzelaar
4ae91e2961
libsyntax: add explicit copies
2013-02-26 20:48:11 -08:00
Erick Tryzelaar
8d239a256d
libsyntax: change closures to take fn(&Parser)
2013-02-26 20:48:06 -08:00
bors
99a902c81d
auto merge of #5120 : jbclements/rust/macros-have-scope, r=pcwalton
...
r?
After this patch, macros declared in a module, function, or block can only be used inside of that module, function or block, with the exception of modules declared with the #[macro_escape] attribute; these modules allow macros to escape, and can be used as a limited macro export mechanism.
This pull request also includes miscellaneous comments, lots of new test cases, a few renamings, and a few as-yet-unused data definitions for hygiene.
2013-02-26 20:00:38 -08:00
Brian Anderson
f4327230fa
Add a 'start' lang item and use it instead of rust_start
2013-02-26 19:43:26 -08:00
bors
28b50a4892
auto merge of #5096 : luqmana/rust/spell, r=catamorphism
...
Address #2281
```
-> % cat foo.rs
fn foo() -> int {
let bar = 10;
bad
}
```
```
-> % rustc foo.rs
foo.rs:4:4: 4:7 error: unresolved name: `bad`. Did you mean: `bar`?
foo.rs:4 bad
^~~
error: aborting due to previous error
```
2013-02-26 19:03:40 -08:00
bors
93a7f237d7
auto merge of #5115 : sanxiyn/rust/arm-abi, r=brson
...
Type size and alignment code needs to be factored, but I didn't want to interfere with MIPS port. Can be done later.
Fix #4797 .
2013-02-26 17:57:41 -08:00
Luqman Aden
a0866d0166
Adjust error messages for compile-fail tests.
2013-02-26 17:23:30 -08:00
Luqman Aden
f460c2adf8
Move levenshtein distance fn to core::str.
2013-02-26 17:23:30 -08:00
Luqman Aden
0a0fcdb018
librustc: offer suggestions for unresolved names.
2013-02-26 17:23:30 -08:00
John Clements
6aefaf22c7
typo-fixing and name-changes
2013-02-26 15:48:00 -08:00
bors
a8f07dc9df
auto merge of #5104 : alexcrichton/rust/fix-unused-import-pub, r=catamorphism
...
The first commit fixes warnings about `pub use` imports because it can't be known whether those are actually used or not.
The second commit fixes using `#[level(unused_imports)]` style control over the emission of warnings. Before it looked like it only worked as a command-line flag.
2013-02-26 15:45:43 -08:00
Alex Crichton
681e6dd40d
Fix using the #[]-style attribute for unused imports
2013-02-26 17:51:26 -05:00
Alex Crichton
7e08d8f23c
Don't warn about 'pub use' statements
2013-02-26 17:51:26 -05:00
bors
0ded562e83
auto merge of #5023 : mitsuhiko/rust/make-absolute-refactor, r=catamorphism
...
This pull request moves the logic from os::make_absolute() into the path module and fixes path joining for Windows. It does this by adding an ``unsafe_join()`` function that implements the operating system's path joining semantics.
Additionally it also adds an ``is_restricted()`` method to the trait which will return true if the path points to a windows device file.
2013-02-26 14:03:52 -08:00
bors
44acefd101
auto merge of #5126 : nikomatsakis/rust/issue-4808-representation-of-extern-fn, r=graydon
...
r? @graydon
2013-02-26 13:15:51 -08:00
Niko Matsakis
85aaf39291
Reimplement type_needs_drop on top of TypeContents
2013-02-26 15:28:32 -05:00
bors
0e6d895ed8
auto merge of #5119 : Kimundi/rust/incoming, r=catamorphism
...
Removed deprecated `str()` functions in int-template.rs and uint-template.rs
2013-02-26 10:54:39 -08:00
John Clements
08b6057538
Macros now leave scope
...
Macro scope is now delimited by function, block, and module boundaries,
except for modules that are marked with #[macro_escape], which allows
macros to escape.
2013-02-26 10:36:55 -08:00
John Clements
5e319fb282
Adds (more) test cases for auto_encode.
2013-02-26 10:26:42 -08:00
John Clements
5328f3c1ee
Remove space from the middle of path
2013-02-26 10:26:42 -08:00
John Clements
598e814152
Hoist macro defs out of inner function
2013-02-26 10:26:42 -08:00
John Clements
ca147a029e
Change imported macros to use leaky modules rather than leaky functions.
2013-02-26 10:26:41 -08:00
Patrick Walton
4a9d4aa52e
bench: Fix botched option dances. rs=demuting
2013-02-26 08:50:06 -08:00
Marvin Löbel
42b0bacd76
Removed deprecated str()
functions in int-template.rs and uint-template.rs
2013-02-26 16:38:30 +01:00
Jeong YunWon
b79c4dc262
Add non-exhaustive check for match guards
...
Fix ICE while there is no remained arms after checking guards
2013-02-26 22:20:02 +09:00
Patrick Walton
9b08cd4903
librustc: Make &const [T]
mean the same thing as &[const T]
2013-02-26 04:18:12 -08:00
Patrick Walton
8fceee6c88
test: De-[mut] (remove all mutable arrays from) the tests. rs=demuting
2013-02-26 04:18:12 -08:00
Patrick Walton
96bdc34930
librustc: De-[mut] librustc (remove all mutable arrays). rs=demuting
2013-02-26 04:18:12 -08:00
Patrick Walton
24893e8d02
libsyntax: Stop parsing ~mut
2013-02-26 04:18:12 -08:00
Patrick Walton
e3d43e490b
test: De-~mut the test suite. rs=demuting
2013-02-26 04:18:12 -08:00
Patrick Walton
e2f90091cf
libcore: Move Cell to core and de-~mut core and std
2013-02-26 04:18:12 -08:00
Patrick Walton
c483aab4ae
librustc: Implement a lint mode for mutable structures; deny by default. r=tjc
2013-02-26 04:18:11 -08:00
Patrick Walton
9b8ce0d3b5
libsyntax: Remove a mutable field from the tests. rs=demuting
2013-02-26 04:18:11 -08:00
Seo Sanghyeon
5098cf5bd2
ARM C ABI implementation
2013-02-26 20:24:15 +09:00
Erick Tryzelaar
375c298297
libsyntax: change binop_to_str to be pure
2013-02-26 03:22:14 -08:00
Erick Tryzelaar
de6d9f66b5
libsyntax: change token_is_word to take &Token
2013-02-26 02:58:39 -08:00
Erick Tryzelaar
34c02a6c0e
libsyntax: change Parser::unexpected_last to take &Token
2013-02-26 02:36:21 -08:00
Erick Tryzelaar
28691a0852
libsyntax: more minor cleanup
2013-02-26 02:14:01 -08:00
Erick Tryzelaar
ff36986fa4
libsyntax: change token fns to take &Token
2013-02-26 01:51:41 -08:00
Erick Tryzelaar
d346b51997
libsyntax: change token::to_str to take &Token
2013-02-26 01:29:27 -08:00
Erick Tryzelaar
194f29c20f
libsyntax: minor cleanup
2013-02-26 01:07:09 -08:00
Erick Tryzelaar
380597eba3
libsyntax: change parse_matcher_subseq to take &Token
2013-02-26 00:44:49 -08:00
Erick Tryzelaar
cf6e21a17f
libsyntax: change attr::parse_seq_* to take &Token
2013-02-26 00:22:30 -08:00
Erick Tryzelaar
3180d22dde
libsyntax: change parse_trait_ref_list to take a &Token
2013-02-26 00:00:04 -08:00
Erick Tryzelaar
bff22cf166
libsyntax: add some explicit copies
2013-02-25 23:37:45 -08:00
bors
e1a4e66755
auto merge of #5109 : bstrie/rust/decapclause, r=pcwalton
...
I also deleted a test that would be entirely useless without capture clauses.
2013-02-25 23:30:38 -08:00
Erick Tryzelaar
752befe2a6
libsyntax: change token_is_{word,keyword} to take &Token
2013-02-25 23:15:22 -08:00
Erick Tryzelaar
272c25e938
libsyntax: minor cleanup
2013-02-25 22:52:57 -08:00
Erick Tryzelaar
3635480b15
libsyntax: change expect to take &token::Token
2013-02-25 22:30:32 -08:00
Erick Tryzelaar
f3965829ff
libsyntax: change flip_delimiter to take a &token::Token
2013-02-25 22:08:09 -08:00
Erick Tryzelaar
4650da5888
libsyntax: change eat to take a &token
2013-02-25 21:45:46 -08:00
Erick Tryzelaar
1deb858b22
libsyntax: is_keyword should take a &~str
2013-02-25 21:23:21 -08:00
Erick Tryzelaar
8b94ef0302
libsyntax: fix the span in parse_bottom_expr's INTERPOLATED handler
2013-02-25 21:00:53 -08:00
bors
40ffaeaea8
auto merge of #5103 : dbaupp/rust/emacs-mode-update, r=graydon
...
Copy the keyword list from rust.vim, and add `self` so that it is highlighted
(being liberal with the correct categories).
I'm not quite willing to dive in to clean up the emacs code yet, but at least this gets a (more) modern syntax highlighting list.
2013-02-25 20:24:40 -08:00
bors
9616b3d11e
auto merge of #5089 : sanxiyn/rust/llvm-struct, r=pcwalton
...
Note on `struct_elt`: the comment is wrong, it actually dereferences the nth element of LLVM struct type if it is a pointer. That's why `T_ptr` is removed in `callee.rs`.
2013-02-25 18:36:39 -08:00
bors
580df4d997
auto merge of #5084 : oncemoreification/rust/issue-4517, r=brson
...
Patch for #4517
This works for fixed vectors, but I am unclear how slices should be printed, simply '&[...]' or...
e.i. How should regions be printed?
2013-02-25 17:36:40 -08:00
Ben Striegel
abc4ea2001
Stop parsing capture clauses
2013-02-25 19:49:28 -05:00
bors
6e5705a877
auto merge of #5072 : youknowone/rust/repeat_count, r=brson
...
Fix issue #3645
2013-02-25 16:18:46 -08:00
bors
08d870e566
auto merge of #5095 : thestinger/rust/smallintmap, r=catamorphism
...
Closes #4738 .
The `std::smallintmap` module doesn't use an implicit @ box so I just added that explicitly for now to make porting simple.
2013-02-25 15:18:45 -08:00