Commit Graph

541 Commits

Author SHA1 Message Date
bors
c0aadfd76c auto merge of #8747 : pnkfelix/rust/fsk-issue6887-fix-emacs-compilation-regexp, r=graydon
Fix #6887
2013-08-26 19:55:57 -07:00
Brian Anderson
7406c2d0b7 Fix valgrind suppression on mac
This callstack changed when the FFI did. I am still a little frightened by
this suppression.
2013-08-26 17:39:50 -07:00
Florian Hahn
c921331295 Add script and tests for using keywords as identifiers 2013-08-26 15:50:52 +02:00
Felix S. Klock II
9d8897ba60 extend file regexp to match files with embedded spaces. 2013-08-26 02:28:27 +02:00
Felix S. Klock II
fe7092dafb revisions to emacs compilation regexp, more readable and robust. 2013-08-25 14:38:12 +02:00
Felix S. Klock II
521fb049be compilation error regexp specific to rustc.
Fix #6887.
2013-08-25 14:15:03 +02:00
Ben Blum
e9f6f3f2cc Parse and reserve typeof keyword. #3228 2013-08-23 17:24:14 -04:00
bors
0c6cc11e05 auto merge of #8445 : Florob/rust/unicode, r=graydon
This adds support for performing Unicode Normalization Forms D and KD on strings.
To enable this the decomposition and canonical combining class properties are added to std::unicode.
On my system this increases libstd's size by ~250KiB.
2013-08-21 11:01:44 -07:00
Florian Zeitz
2675f3e9e7 Add canonical combining class to std::unicode 2013-08-21 11:50:07 +02:00
Florian Zeitz
83f4bee44f Add Unicode decomposition mappings to std::unicode 2013-08-21 11:50:07 +02:00
bors
c87d798fb0 auto merge of #8585 : jankobler/rust/extract-grammar-01, r=catamorphism
This fixes some errors which extract_grammar.py reports, when called with

python2.7 src/etc/extract_grammar.py <doc/rust.md
2013-08-21 02:22:25 -07:00
Jan Kobler
87761c1f99 extract_grammar symnames
add missing symnames

Signed-off-by: Jan Kobler <eng1@koblersystems.de>
2013-08-18 07:25:54 +02:00
Huon Wilson
72fd02d939 doc: convert remaining uses of core:: to std::. 2013-08-16 15:54:14 +10:00
bors
1785841a5b auto merge of #8410 : luqmana/rust/mcpu, r=sanxiyn
Adds `--target-cpu` flag which lets you choose a more specific target cpu instead of just passing the default, `generic`. It's more or less akin to `-mcpu`/`-mtune` in clang/gcc.
2013-08-11 20:50:14 -07:00
Luqman Aden
fcfd6e7c79 rustc: Add --target-cpu flag to select a more specific processor instead of the default, 'generic'. 2013-08-10 17:03:43 -04:00
Erick Tryzelaar
b19c2ed8f3 Merge branch 'master' of https://github.com/p2j4d2c/rust into rollup 2013-08-10 13:02:44 -07:00
Paul Collins
3596f666bb rust-mode: make indentation customizable
Add new variable rust-indent-offset, defaulting to
the old value, and use it.
2013-08-08 19:25:21 +12:00
Simon Sapin
240f8f03c9 Gedit/gtksourceview language spec: add 'in' keyword 2013-08-07 22:41:14 -04:00
Daniel Micay
b49d026ecd Merge pull request #8284 from huonw/emacs-in-kw
etc: add the `in` keyword to the emacs mode.
2013-08-04 12:49:11 -07:00
bors
5cf69d5bf8 auto merge of #8254 : brson/rust/libuv-mac-supp, r=pcwalton
I suspect that this is a race between process exit and the termination of
worker threads used by libuv (if I sleep before exit it doesn't leak). This
isn't going to cause any real problems but should probably be fixed at
some point.

r? @pcwalton

cc #8253
2013-08-04 05:28:57 -07:00
bors
fbeeeebf47 auto merge of #8264 : thestinger/rust/snapshot, r=Aatch 2013-08-03 23:25:55 -07:00
Daniel Micay
1008945528 remove obsolete foreach keyword
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
Huon Wilson
cdad7f6f3b etc: add the in keyword to the emacs mode. 2013-08-03 18:31:23 +10:00
Chris Morgan
ceb651671a Vim highlighting: remove foreach keyword 2013-08-03 15:56:18 +10:00
Brian Anderson
8f9c1724d0 Suppress a libuv leak on mac
I suspect that this is a race between process exit and the termination of
worker threads used by libuv (if I sleep before exit it doesn't leak). This
isn't going to cause any real problems but should probably be fixed at
some point.
2013-08-02 22:05:34 -07:00
Chris Morgan
44cb1c3adb Highlight sigils and operators in Vim.
Sigil highlighting isn't perfect (especially how it handles ``&``) but
after having used it for a week I feel it to be considerably nicer than
nothing. As usual, if you don't like it, you can turn it off easily by
overriding the default highlighting.

Generics are not handled specially; this means that for something like
``S<T>``, the ``<`` and ``>`` are highlighted as operators. For myself,
I like this, and there is no way to make it properly context aware
without expanding the syntax matching enormously.

Also, special characters are highlighted properly in strings/chars, e.g.
``"\x00"`` or ``'\Ufedcba98'`` appropriately.
2013-08-03 14:36:27 +10:00
bors
aa8f79d6cf auto merge of #8067 : alexcrichton/rust/issue-3636, r=huonw
Allow some common ones that are good for examples, however.

Closes #3636
2013-07-27 07:10:36 -07:00
Alex Crichton
b782d42cba Deny all warnings by default in doc tests
Allow some common ones that are good for examples, however.
2013-07-26 18:04:20 -07:00
bors
4c4cf003ea auto merge of #8031 : graydon/rust/emacs-mode-rewrite, r=catamorphism
The previous mode did a lot of very manual char-at-a-time parsing and was quite fragile and difficult to maintain. I talked to Marijn and he suggested I'd have better luck just rewriting it from scratch. This is the result of that effort; it seems to be faster, a bit easier on the eyes and more-or-less as well behaved when indenting. The algorithm is a bit different I suspect (it was hard to tell the previous one) but I tried to keep it simple and pleasant-looking.
2013-07-26 02:04:50 -07:00
Graydon Hoare
581b3db3b3 rewrite rust-mode to use font-lock-mode and emacs builtin syntax analysis 2013-07-24 17:11:04 -07:00
bors
4a726f0573 auto merge of #8006 : emillon/rust/issue-6060, r=pcwalton
Hello,

I made a tiny change to `tidy.py` so that it uses a regexp to find `// NOTE` comments. I could not find an easy way to write an automated test for this but if this is needed and possible I'd be happy to write one.
Please note that it also removes extra empty lines that appear after each of these warnings (I believe that there were not wanted).

On the performance side, `make tidy` is now a bit slower (running it 10 times in a row takes 71s on my machine, 65s before) but I don't think that it is performance sensitive.

Thanks!
2013-07-24 16:49:36 -07:00
bors
9954409438 auto merge of #7964 : pnkfelix/rust/fsk-issue3994-readme-note, r=huonw
See #3994.
2013-07-23 15:40:53 -07:00
Etienne Millon
b128ceb161 tidy: allow arbitrary spaces between // and NOTE
`make tidy` now detects `//NOTE`, `//  NOTE`, etc.
This also removes the extra empty line emitted after each warning.

Fixes #6060
2013-07-23 21:34:02 +02:00
Felix S. Klock II
f98f3b0401 Note incompatibility with global-whitespace-mode.
See #3994.
2013-07-22 12:27:46 +02:00
Daniel Micay
fc05819181 Merge pull request #7936 from thestinger/cleanup
rm obsolete no-op lints
2013-07-21 20:04:15 -07:00
Daniel Micay
13b474dcbb rm obsolete no-op lints 2013-07-20 20:17:08 -04:00
Brian Anderson
79677f0556 mk: Remove CFG_INSTALL_SNAP logic. #2664 2013-07-19 15:35:42 -07:00
bors
929b75e220 auto merge of #7747 : chris-morgan/rust/vim-compiler-rustc, r=huonw
Note that this is not actually *used* by default; it is a matter of
configuration still, because you might want to:

- Compile all .rs files with `rustc %` (where each can be built itself)

- Compile all .rs files with `rustc some-file.rs` (where you are editing
  part of a crate)

- Compile with a different tool, such as `make`. (In this case you might
  put a `~/.vim/after/compiler/rustc.vim` to match such cases, set
  makeprg and extend errorformat as appropriate. That should probably go
  in a different compiler mode, e.g. make-rustc.)

To try using it, `:compiler rustc`. Then, `:make` on a file you would
run `rustc` on will work its magic, invoking rustc. To automate this,
you could have something like `autocmd FileType rust compiler rustc` in
your Vim config.
2013-07-18 05:07:39 -07:00
sp3d
9adad222a6 add regions, unicode idents, attributes to GtkSourceView language-spec 2013-07-14 23:44:55 -05:00
Chris Morgan
917d720f48 rustc compiler config for Vim.
Note that this is not actually *used* by default; it is a matter of
configuration still, because you might want to:

- Compile all .rs files with `rustc %` (where each can be built itself)

- Compile all .rs files with `rustc some-file.rs` (where you are editing
  part of a crate)

- Compile with a different tool, such as `make`. (In this case you might
  put a `~/.vim/after/compiler/rustc.vim` to match such cases, set
  makeprg and extend errorformat as appropriate. That should probably go
  in a different compiler mode, e.g. make-rustc.)

To try using it, `:compiler rustc`. Then, `:make` on a file you would
run `rustc` on will work its magic, invoking rustc. To automate this,
you could have something like `autocmd FileType rust compiler rustc` in
your Vim config.
2013-07-12 23:51:03 +10:00
Chris Morgan
4f67ed535b Fix problem with switching between Rust buffers.
This was also causing trouble if one didn't have delimitMate installed.
2013-07-12 16:18:48 +10:00
Chris Morgan
184fa42d33 Vim syntax: support lifetimes with delimitMate.
When it's a lifetime, a single quotation mark shouldn't have a matching
single quotation mark inserted after it, as delimitMate does by default.

Note that this is not without problems; a char literal coming after an
odd number of lifetime markers will have its quotation marks behave a
little strangely. That, however, is not my fault, but delimitMate's:
https://github.com/Raimondi/delimitMate/issues/135
2013-07-12 15:30:51 +10:00
Chris Morgan
6e75f2de9c Fix Vim indentation for inline closures. 2013-07-11 14:38:32 -04:00
Chris Morgan
1d08ceb043 Fix comment indenting properly for Vim files.
Indentation now works correctly on subsequent lines of a multi-line
comment, whether there are leaders (` * `) or not. (Formerly it was
incorrectly doing a two-space indent if there was no leader.)

By default, this no longer puts a ` * ` leader on `/*!` comments, as
that appears to be the current convention in the Rust source code, but
that can easily be re-enabled if desired:

    let g:rust_bang_comment_leader = 1
2013-07-11 14:38:24 -04:00
bors
8a7b636649 auto merge of #7637 : pnkfelix/rust/fsk-guard-against-stale-libraries-issue3225-safeguarded, r=graydon
When building Rust libraries (e.g. librustc, libstd, etc), checks for
and verbosely removes previous build products before invoking rustc.
(Also, when Make variable VERBOSE is defined, it will list all of the
libraries matching the object library's glob after the rustc
invocation has completed.)

When installing Rust libraries, checks for previous libraries in
target install directory, but does not remove them.

The thinking behind these two different modes of operation is that the
installation target, unlike the build tree, is not under the control
of this infrastructure and it is not up to this Makefile to decide if
the previous libraries should be removed.

Fixes #3225 (at least in terms of mitigating the multiple library
problem by proactively warning the user about it.)
2013-07-10 01:10:29 -07:00
Chris Morgan
121ae82be0 Do indentation properly in Vim.
The cases that this improves are clearly documented inside the
committed file, so this commit message is comparatively brief.
2013-07-10 01:33:30 +10:00
Chris Morgan
cf65870962 Add a Vim filetype plugin with useful tweaks.
This improves things like doc comment handling when you press Enter and
making using `gf` or `<C-W>f` work on a `use x;` statement in the
current directory.
2013-07-10 01:30:32 +10:00
Chris Morgan
3fa4cef876 A few slight tweaks to the Vim syntax file.
- Add fold support (NOT turned on by default)
- Highlight `::` by default
- Support the common `NOTE` as an important note
- Highlight `assert!` and `fail!` differently
- Don't highlight `deriving(...)` except in `#[...]`
2013-07-10 01:27:35 +10:00
Felix S. Klock II
25f51eeda0 Fix #3225: Incorporate feedback from Graydon.
Namely, switched in many places to using GNU make provided functions
for directory listing and text processing, rather than spawning a
shell process to do that work.

In the process of the revision, learned about Target-specific
variables, which were very applicable to INSTALL_LIB (which, on a
per-recipe basis, was always receiving the same actual arguments for
its first two formal parameters in every invocation).

  http://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html

(We might be able to make use of those in future refactorings.)

----

Also adds a cleanup pass to get-snapshot.py as well, since the same
problem arises when we unpack libraries from the snapshot archive into
a build directory with a prior snapshot's artifacts.  (I put this step
into the python script rather than the makefile because I wanted to
delay the cleanup pass until after we have at least successfully
downloaded the tarball.  That way, if the download fails, you should
not destroy the previous unarchived snapshot libraries and build
products.)

----

Also reverted whitespace changes to minimize diff.
I plan to put them back in in a dedicated commit elsewhere.
2013-07-09 13:08:50 +02:00
Brian Anderson
b0a9d8193f Bump version numbers to 0.8-pre 2013-07-08 10:25:45 -07:00
bors
6d6b1a8bfa auto merge of #7586 : g5pw/rust/master, r=cmr
This updates the script in src/etc/local_stage0.sh to copy the correct libraries
to stage0.
2013-07-07 17:59:03 -07:00
Seo Sanghyeon
20458899d5 vim: Highlight 0i as number 2013-07-05 13:03:15 +09:00
Aljaž "g5pw" Srebrnič
e9ce97cc2a Copy the correct libs when using local-rust-root
This fixes a segfault when configuring rust to use local-rust-root. The
libraries were renamed in the 0.6-0.7 transition, and the script was not copying
them all. I also removed the line referencing libcore (now libstd).
2013-07-04 16:18:05 +02:00
bors
55f155521d auto merge of #7523 : huonw/rust/uppercase-statics-lint, r=cmr
Adds a lint for `static some_lowercase_name: uint = 1;`. Warning by default since it causes confusion, e.g. `static a: uint = 1; ... let a = 2;` => `error: only refutable patterns allowed here`.
2013-07-03 04:31:50 -07:00
bors
fc02d69e96 auto merge of #7498 : luqmana/rust/cow, r=catamorphism
Either one works and wget is easier to setup on windows.
2013-07-02 20:58:57 -07:00
Huon Wilson
c437a16c5d rustc: add a lint to enforce uppercase statics. 2013-07-01 17:52:57 +10:00
bors
07feeb95c5 auto merge of #7487 : huonw/rust/vec-kill, r=cmr
Continuation of #7430.

I haven't removed the `map` method, since the replacement `v.iter().transform(f).collect::<~[SomeType]>()` is a little ridiculous at the moment.
2013-06-30 21:14:13 -07:00
Brian Anderson
a766a955a9 Bump version from 0.7-pre to 0.7 2013-06-30 16:36:48 -07:00
bors
2b3569a1b3 auto merge of #7374 : Jeaye/rust/func_highlight, r=cmr
This allows for highlighting of function calls
for free floating, member, and static functions.
2013-06-30 04:40:37 -07:00
Huon Wilson
faa8f8ff8b Convert vec::{bsearch, bsearch_elem} to methods. 2013-06-30 21:15:25 +10:00
Huon Wilson
562dea1820 etc: update etc/unicode.py for the changes made to std::unicode. 2013-06-30 21:15:25 +10:00
Luqman Aden
9c3ef892f9 configure: Require one of wget or curl. 2013-06-30 02:08:02 -04:00
bors
3017343232 auto merge of #7457 : Blei/rust/fix-ffi-floats, r=cmr
Also contains a fix to help ctag pick up macro definitions.
2013-06-29 18:40:33 -07:00
Daniel Micay
28a3613a1d fix zsh completion for lint and debug flags
this correctly makes them accept 1 argument, and auto-completes the
comma-separated list of lint flags
2013-06-29 00:58:24 -04:00
Philipp Brüschweiler
7971202a4e ctags: add macros 2013-06-28 16:17:04 +02:00
Brian Anderson
59905d1f27 mk: Make windows installer work with -pre versions 2013-06-27 19:00:10 -07:00
bors
a28f9ba526 auto merge of #7361 : brson/rust/incoming, r=brson 2013-06-27 01:04:33 -07:00
Philipp Brüschweiler
87c1b59e8b Fix some warnings in the check-fast tests 2013-06-26 18:08:23 -04:00
Luqman Aden
ca2966c6d0 Change finalize -> drop. 2013-06-25 21:14:39 -04:00
Jeaye
41f11d6428 rust.vim: Links previously unused rustFuncCall
This allows for highlighting of function calls
for free floating, member, and static functions.
2013-06-24 23:35:16 -07:00
Tuncer Ayaz
0a74ffcf04 vim/syntax/rust.vim: fix date header
The last change was made in 2013 not 2012.
2013-06-24 18:35:43 +02:00
Ben Blum
fcf361745f Add rules for assert, fail, and deriving to vim syntax file. Also highlight the mod path in "use module;" properly. 2013-06-23 13:53:39 -04:00
bors
f348465283 auto merge of #7128 : yichoi/rust/fix_sometc, r=brson
- Fix stat struct for Android (found by SEGV at run-pass/stat.rs)
- Adjust some test cases to rpass for Android 
- Modify some script to rpass for Android
2013-06-20 11:35:34 -07:00
James Miller
7375e94289 core -> extra for mac 2013-06-20 20:47:22 +12:00
James Miller
433c86554c Fix update snapshot script for rename 2013-06-20 15:10:08 +12:00
Young-il Choi
f7ee7d09dd etc: add TEST_EXEC_ENV for run-pass to adb_run_wrapper.sh 2013-06-17 18:46:04 +09:00
Young-il Choi
9e618cf954 etc: modify adb_run_wrapper.sh to avoid 'expr' unrecognization at some android devices 2013-06-17 18:44:30 +09:00
Daniel Micay
ec27644870 automated whitespace fixes 2013-06-13 18:03:08 -04:00
Young-il Choi
c28c495414 etc: adb_run_wrapper.sh - fix to clean test (not produce Text File Busy) 2013-06-01 17:28:58 +09:00
Young-il Choi
0521d54ca1 etc: adb_run_wrapper argument change 2013-06-01 17:28:58 +09:00
Young-il Choi
0ea8274fca etc: adb_run_wrapper added 2013-06-01 17:28:57 +09:00
bors
030f471f26 auto merge of #6853 : bblum/rust/sized, r=pcwalton
r? @nikomatsakis @pcwalton
2013-05-31 02:01:44 -07:00
Ben Blum
32cd9b3274 Highlight Sized in vim and kate 2013-05-30 21:41:41 -04:00
Daniel Micay
a9c3b3885d add a zsh completion file for rustc 2013-05-30 18:52:23 -04:00
Patrick Walton
e67bfabbf7 etc: Fix more check-fast breakage. rs=burningtree 2013-05-29 22:17:21 -07:00
bors
05735a934a auto merge of #6783 : hoelzro/rust/master, r=bstrie
I think settings like this should be left up to the user.
2013-05-28 07:16:59 -07:00
Rob Hoelz
2505416408 Remove colorcolumn setting 2013-05-28 16:06:15 +02:00
ILyoan
998cbbd739 update ctags define 2013-05-27 13:58:27 +09:00
Ted Horst
34cfd2183b more testing fallout from core->std/std->extra move 2013-05-23 15:06:29 -05:00
Patrick Walton
be0110989e etc: Fix test combiner for core->std/std->extra change. rs=burningtree 2013-05-23 08:32:36 -07:00
Daniel Micay
298a72602b vim: be is still a reserved keyword 2013-05-15 00:03:55 -04:00
Daniel Micay
d65a136cb0 vim: no more drop blocks 2013-05-15 00:01:58 -04:00
Daniel Micay
17a68d1e8d vim: swap operator is gone 2013-05-14 23:59:55 -04:00
Alex Crichton
ffcc680f9c Fix test fallout from removing vecs_implicitly_copyable 2013-05-14 12:25:19 -04:00
James Miller
80b2926357 General fixes for vim
Makes colorcolumn setlocal instead of set.
Makes conceal opt-in.
Removes the seem-to-be obsolete old keywords/types
2013-05-08 11:16:27 +12:00
James Miller
0addefa68a Improved vim indent file for rust 2013-05-08 11:16:27 +12:00
Daniel Micay
86efd97a10 add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
bors
ec9c7c324e auto merge of #6184 : kud1ing/rust/master, r=sanxiyn 2013-05-02 11:30:41 -07:00
kud1ing
6487cb221b Explain that the source code was generated by this script 2013-05-02 13:37:57 +03:00
Huon Wilson
1eb5efc5e2 libcore: add N(0,1) and Exp(1) distributions to core::rand.
Sample from the normal and exponential distributions using the Ziggurat
algorithm.
2013-05-01 16:51:45 -07:00