Commit Graph

700 Commits

Author SHA1 Message Date
Alex Crichton
201cab84e8 Move rust's uv implementation to its own crate
There are a few reasons that this is a desirable move to take:

1. Proof of concept that a third party event loop is possible
2. Clear separation of responsibility between rt::io and the uv-backend
3. Enforce in the future that the event loop is "pluggable" and replacable

Here's a quick summary of the points of this pull request which make this
possible:

* Two new lang items were introduced: event_loop, and event_loop_factory.
  The idea of a "factory" is to define a function which can be called with no
  arguments and will return the new event loop as a trait object. This factory
  is emitted to the crate map when building an executable. The factory doesn't
  have to exist, and when it doesn't then an empty slot is in the crate map and
  a basic event loop with no I/O support is provided to the runtime.

* When building an executable, then the rustuv crate will be linked by default
  (providing a default implementation of the event loop) via a similar method to
  injecting a dependency on libstd. This is currently the only location where
  the rustuv crate is ever linked.

* There is a new #[no_uv] attribute (implied by #[no_std]) which denies
  implicitly linking to rustuv by default

Closes #5019
2013-10-29 08:39:22 -07:00
Chris Morgan
1ad8dbe42e Fix Vim indent for wrapped function arguments. 2013-10-30 00:27:15 +11:00
Chris Morgan
c20186bde5 Update prelude items in Vim syntax file. 2013-10-30 00:26:25 +11:00
Brian Anderson
49d9135eea Tidy 2013-10-25 18:33:05 -07:00
Alex Crichton
61ed2cfb55 Remove even more of std::io
Big fish fried here:

    extra::json
    most of the compiler
    extra::io_util removed
    extra::fileinput removed

Fish left to fry

    extra::ebml
2013-10-24 14:21:57 -07:00
Daniel Micay
142672dca4 register snapshots 2013-10-23 18:06:12 -04:00
Chris Morgan
f3796616de Highlight \0 in strings and chars in Vim. 2013-10-19 00:56:41 +11:00
Chris Morgan
0ae9e476af Update prelude items in Vim syntax. 2013-10-19 00:55:52 +11:00
sp3d
58b336d90b track language changes, improve attr handling in GtkSourceView language-spec
Refactors parsing of numerical literals to make it more readable.
Removes 'float'/the 'f' literal suffix and invalid character literals ''' and '\'.
Also makes attribute highlighting more robust and allows urls in attributes to be recognized.
2013-10-18 03:35:26 +00:00
Benjamin Herr
18099fe085 add vim syntax highlighting support for raw string literals 2013-10-08 01:44:05 +02:00
Alex Crichton
3396365cab Add appropriate #[feature] directives to tests 2013-10-06 14:39:25 -07:00
Alex Crichton
19e9766c29 Don't fail when unpacking the windows snapshot
Newly having a third-party directory was throwing off the unpack script
2013-10-04 21:16:54 -07:00
bors
8bb55dbf21 auto merge of #9662 : vadimcn/rust/package-runtime-deps, r=brson
This will make sure that system files that rust binaries depend on in Windows get packaged into stage0 snapshots as well as into Windows installer.
Currently these include `libgcc_s_dw2-1.dll`, `libstdc++-6.dll` and `libpthread-2.dll`.   Note that the latter will need to be changed to `pthreadGC2.dll` once Windows build bots get upgraded to mingw 4.0

Closes #9252
Closes #5878
Closes #9218
Closes #5712
2013-10-04 07:11:37 -07:00
Vadim Chugunov
4e59ab097a Package system runtime dependencies into Windows distribution. 2013-10-02 11:40:50 -07:00
Vadim Chugunov
1a6b6c4301 Package system runtime dependencies into snapshots 2013-10-02 11:40:44 -07:00
bors
1d6c01148c auto merge of #9600 : MicahChalmer/rust/fill-with-code-around, r=catamorphism
This fixes a problem with paragraph fills: hitting M-q on a single-line-style (`//`) comment with code immediately before or after it would try to fill the code as part of the paragraph too.
2013-10-01 18:56:26 -07:00
Alex Crichton
d29b3ac8a7 Expand tidy to prevent binaries from being checked
Closes #9621
2013-09-30 10:15:47 -07:00
Micah Chalmer
5d24a1ae45 Fix single-line-style paragraph fills with code immediately before or after 2013-09-28 17:40:24 -04:00
bors
67394f20eb auto merge of #9552 : brson/rust/0.9-pre, r=alexcrichton 2013-09-27 13:51:07 -07:00
bors
ae8a2ff379 auto merge of #9538 : thestinger/rust/type_use, r=pcwalton
This is broken, and results in poor performance due to the undefined
behaviour in the LLVM IR. LLVM's `mergefunc` is a *much* better way of
doing this since it merges based on the equality of the bytecode.

For example, consider `std::repr`. It generates different code per
type, but is not included in the type bounds of generics.

The `mergefunc` pass works for most of our code but currently hits an
assert on libstd. It is receiving attention upstream so it will be
ready soon, but I don't think removing this broken code should wait any
longer. I've opened #9536 about enabling it by default.

Closes #8651
Closes #3547
Closes #2537
Closes #6971
Closes #9222
2013-09-27 03:31:13 -07:00
bors
a94158ce64 auto merge of #9504 : brson/rust/continue, r=alexcrichton 2013-09-26 18:46:10 -07:00
Brian Anderson
99c1fb8c66 Update version numbers to 0.9-pre 2013-09-26 18:18:42 -07:00
Brian Anderson
c1d64297f0 Add 'continue' keyword to emacs, vim, gedit, kate 2013-09-26 15:04:43 -07:00
Daniel Micay
c3e4e06841 remove type_use
This is broken, and results in poor performance due to the undefined
behaviour in the LLVM IR. LLVM's `mergefunc` is a *much* better way of
doing this since it merges based on the equality of the bytecode.

For example, consider `std::repr`. It generates different code per
type, but is not included in the type bounds of generics.

The `mergefunc` pass works for most of our code but currently hits an
assert on libstd. It is receiving attention upstream so it will be
ready soon, but I don't think removing this broken code should wait any
longer. I've opened #9536 about enabling it by default.

Closes #8651
Closes #3547
Closes #2537
Closes #6971
Closes #9222
2013-09-26 17:27:23 -04:00
Brian Anderson
e82db13760 Fix the rust logo icon 2013-09-25 15:21:37 -07:00
Alex Crichton
30862a64c2 Fix run-pass tests to have 'pub fn main'
This is required by the check-fast target because each test is slurped up into a
submodule.
2013-09-25 00:43:37 -07:00
bors
cd2da7d5f3 auto merge of #9389 : poiru/rust/issue-9333, r=alexcrichton
Closes #9333.
2013-09-22 12:45:52 -07:00
Birunthan Mohanathas
2ab278f130 Reserve the alignof, offsetof, and sizeof keywords
Closes #9333.
2013-09-22 10:47:36 +03:00
bors
07167826d6 auto merge of #9395 : brson/rust/0.8, r=alexcrichton 2013-09-22 00:25:56 -07:00
Scott Lawrence
72633a2af2 Remove 'copy' from syntax files, as it's no longer a keyword 2013-09-22 00:29:45 -04:00
Brian Anderson
695cb9fc2b Update version numbers to 0.8 2013-09-21 16:25:08 -07:00
Vadim Chugunov
c3fd430603 The purpose of these headers is to fix issues with mingw v4.0, as described in #9246.
This works by adding this directory to GCC include search path before mingw system headers directories,
so we can intercept their inclusions and add missing definitions without having to modify files in mingw/include.
2013-09-17 01:06:01 -07:00
Lindsey Kuper
462dcc8e7a Minor cleanup and formatting tweaks to the rust-mode README 2013-09-13 20:46:41 -04:00
Daniel Micay
6919cf5fe1 rename std::iterator to std::iter
The trait will keep the `Iterator` naming, but a more concise module
name makes using the free functions less verbose. The module will define
iterables in addition to iterators, as it deals with iteration in
general.
2013-09-09 03:21:46 -04:00
Micah Chalmer
a4697342f7 Cover all cases for padding in paragraph fills as intended 2013-09-07 00:39:38 -04:00
Micah Chalmer
be4f19ae7c Fix regression of multi-line statement indents 2013-09-07 00:38:23 -04:00
Micah Chalmer
fcf18786b4 Add ERT tests 2013-09-06 01:02:20 -04:00
Micah Chalmer
377b2c77e4 Add paragraph fill and auto-fill for multi-line comments 2013-09-06 01:02:20 -04:00
Micah Chalmer
1ac7c5cc5a Add custom group for rust-mode 2013-09-06 01:02:20 -04:00
Micah Chalmer
76e95a0264 Indent return type to align with arguments 2013-09-06 01:02:19 -04:00
Micah Chalmer
9ef0b9c0d6 Allow indenting to align struct fields after curly brace 2013-09-06 01:02:19 -04:00
Micah Chalmer
1c527dfcd4 Indent correctly after opening square bracket 2013-09-06 01:02:19 -04:00
Micah Chalmer
e7d5af8ec7 Fix glitches with struct field aligned indents 2013-09-05 22:18:29 -04:00
Daniel Micay
62a3434529 stop treating char as an integer type
Closes #7609
2013-09-04 08:07:56 -04:00
Chris Morgan
9f6180413d Silence fo+=j error for users of Vim < 7.3.541. 2013-09-04 13:33:40 +10:00
Chris Morgan
2bc408f3e3 Update highlighting for prelude changes. 2013-09-04 02:38:41 +10:00
Chris Morgan
c4b180aa9c Highlight everything in the prelude in Vim.
This is a rather more extensive change than the last, but *ever* so much
easier to maintain reasonably, as there's then something to track
directly.
2013-09-04 02:34:23 +10:00
Chris Morgan
afbf908ff4 Update a handful of keywords highlighted in Vim.
I added a few and removed a few and corrected a couple, all with
reference to the prelude. It ends up a slightly arbitrary decision
precisely what ends up in and what doesn't, unfortunately.
2013-09-04 02:34:23 +10:00
Chris Morgan
15f05dc581 Modernise some Vim syntax highlighting.
- Remove highlighting of ``L"..."`` (obsolete syntax)
- Remove backslash at end of line being a line continuation always
  (obsolete syntax; this only affects comments, actually)
- Add highlighting for backslash at end of line and leading whitespace
  on the following line inside a string (a genuine line continuation)
2013-09-04 02:34:22 +10:00
Micah Chalmer
7a42dd8074 Align field names in struct expressions with fields on same line as the opening curly brace 2013-08-30 02:04:08 -04:00
Micah Chalmer
70bc1637b8 Multiline comments with leading *s line up the *s 2013-08-30 02:04:01 -04:00
Micah Chalmer
0b9dc80d49 One indent after open paren with no argument 2013-08-29 23:28:36 -04:00
Micah Chalmer
20def31768 Correct indent with trailing spaces/comments on previous line 2013-08-29 23:12:08 -04:00
bors
518bd073b4 auto merge of #8830 : andersk/rust/indent-4, r=catamorphism
`default-tab-width` is standardly 8, but most programmers and style guides prefer an indentation width smaller than that.  Rust itself uses 4 space indents.  Most other Emacs modes define the indentation width as 4 or 2 spaces, independently of the width of a Tab character.  Depending on `default-tab-width` makes especially little sense for rust-mode because it sets `indent-tabs-mode` to `nil`.
2013-08-29 03:10:42 -07:00
bors
7971c46c44 auto merge of #8718 : bblum/rust/typeof, r=pcwalton
r? anybody
2013-08-28 15:30:38 -07:00
Anders Kaseorg
60e84809f0 rust-mode: Default rust-indent-offset to 4, not default-tab-width
default-tab-width is standardly 8, but most programmers and style
guides prefer an indentation width smaller than that.  Rust itself
uses 4 space indents.  Most other Emacs modes define the indentation
width as 4 or 2 spaces, independently of the width of a Tab character.
Depending on default-tab-width makes especially little sense for
rust-mode because it sets indent-tabs-mode to nil.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2013-08-28 18:09:02 -04:00
bors
0baa92707a auto merge of #8789 : pnkfelix/rust/fsk-fix-typo-in-rust-mode.el, r=pnkfelix
Fix #6887.  (or rather, a bug injected by my prior commit for fixing that bug.)
2013-08-27 08:00:51 -07:00
bors
d9b0d4b603 auto merge of #8779 : brson/rust/macsupp, r=thestinger
This callstack changed when the FFI did. I am still a little frightened by
this suppression.

cc #8253
2013-08-27 04:15:54 -07:00
Felix S. Klock II
1f13eab3c0 fix typo in rust-mode.el 2013-08-27 12:48:51 +02:00
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
bors
9ea32a380d auto merge of #6066 : djui/rust/patch-1, r=graydon 2013-04-27 10:24:35 -07:00
Brian Anderson
2c99e3dc3e Suppress all 'cond' errors in valgrind. #5856 2013-04-26 13:41:33 -07:00
Uwe Dauernheim
d314090b85 Fix typo 2013-04-26 14:47:15 +03:00
Uwe Dauernheim
7a9037bfde Allow customization of indent offset 2013-04-26 00:06:57 +03:00
Brendan Zabarauskas
01eb5e8ad3 Rename Div operator trait to Quot and Modulo operator trait to Rem 2013-04-22 01:58:53 +10:00
bors
ce4f73a243 auto merge of #5945 : graydon/rust/fix-unicode-tables, r=pcwalton
This switches the unicode functions in core to use static character-range tables and a binary search helper rather than open-coded switch statements. It adds about 50k of read only data to the libcore binary but cuts out a similar amount of compiled IR. Would have done it this way in the first place but we didn't have structured statics for a long time.
2013-04-19 23:03:52 -07:00
Brian Anderson
69eb218ffc Try to suppress valgrind errors
I can't reproduce the one on the bots, but this might fix it
2013-04-19 14:14:07 -07:00
Graydon Hoare
5a3d26f271 core: replace unicode match exprs with bsearch in const arrays, minor perf win. 2013-04-18 14:39:40 -07:00
Brian Anderson
c6f7b595f0 More valgrind suppressions 2013-04-16 13:40:47 -07:00
Brian Anderson
6beddb966d Make valgrind suppressions more liberal
Hopefully this puts out the final fire
2013-04-15 13:20:23 -07:00
Brian Anderson
a9247e07ac Suppress a bunch of valgrind errors 2013-04-12 18:49:40 -07:00
Brian Anderson
23e44a529b Bump version to 0.7-pre 2013-04-10 13:12:53 -07:00
bors
ec3cfaed8b auto merge of #5807 : klutzy/rust/vim-inner-doc, r=brson
Follow-up of #5760:
Add syntax highlight for `/*! doc */` or `//! doc`.
2013-04-09 18:15:58 -07:00
klutzy
7a1394d58f vim: syntax highlight for inner doc comment 2013-04-10 04:25:48 +09:00
Brian Anderson
23251b2438 Bump version to 0.7-pre 2013-04-09 10:59:32 -07:00
klutzy
fc26911b49 vim: fix comment highlighting bug
Previous commit had a bug that a line which ends with "//" or "/*"
is not correctly highlighted.
2013-04-07 14:30:50 +09:00
klutzy
7c2a8c4ac2 vim: add rustCommentDoc 2013-04-07 04:32:05 +09:00
klutzy
38fe5aa070 vim: disable nested comment
Since comment nesting does not work from 0.4.
2013-04-07 04:25:54 +09:00
Graydon Hoare
951f460aa8 tidy version numbers and copyright dates 2013-04-01 16:15:49 -07:00
Daniel Micay
47011e3b71 vim: use Operator group for 'as' 2013-03-30 18:19:47 -04:00
Daniel Micay
6442b1c0e7 vim: separate the conditional keywords 2013-03-30 18:17:13 -04:00
Daniel Micay
b0f66c4732 vim: mark Todo as contained and rm unsafe from it
It's nice to make unsafe stand out, but this way isn't correct because it
highlights it in comments.
2013-03-30 18:17:13 -04:00
Daniel Micay
7142cdef1e vim: highlight ref + static as storage specifiers
lifetimes and globals are now the only two places static is used, and
'static isn't matched by this
2013-03-30 18:16:53 -04:00
Daniel Micay
0224eb3d32 vim: assert and pure keywords were removed 2013-03-30 17:54:24 -04:00
Andrew Paseltiner
8604165871 kate: remove const, log, and pure keywords, add super keyword 2013-03-25 08:25:19 -04:00
Patrick Walton
257ef26bf1 etc: Suppress Linux valgrind issues for new scheduler 2013-03-20 15:13:01 -07:00
Luqman Aden
7352d919f6 Update rust.vim
Column limit 78 -> 100.
2013-03-18 17:19:40 -07:00
Brian Anderson
05c103238d Increase tidy column limit to 100 2013-03-12 10:55:39 -07:00
Lawrence Velázquez
1d315aac44 Copy libsyntax from local Rust to stage0.
The local_stage0 script was not updated after commit 7dcbaed renamed
librustsyntax to libsyntax, so builds using local Rust fail due to
missing libsyntax.
2013-03-12 03:47:28 -04:00
bors
267f6c212f auto merge of #5285 : jld/rust/emacs-refix, r=brson
Without this change, rust-mode doesn't work if 'cl hasn't been required
by something else, apparently.  I'm not entirely sure what changed such
that I started seeing this problem instead of not, but maybe the emacs
world has been making progress towards not loading 'cl at runtime if
it's only needed at compile time.

(This change was previously submitted as e93a58d52 and accidentally reverted by ad8b437ad.)
2013-03-09 18:42:43 -08:00
Andrew Paseltiner
b4f57d46e6 kate: remove assert keyword 2013-03-09 12:23:33 -05:00
Andrew Paseltiner
78b6e375df kate: add Not to list of traits 2013-03-09 12:23:33 -05:00
Jed Davis
8453f3110c rust-mode.el uses the 'cl macros, so it should actually require them
Without this change, rust-mode doesn't work if 'cl hasn't been required
by something else, apparently.  I'm not entirely sure what changed such
that I started seeing this problem instead of not, but maybe the emacs
world has been making progress towards not loading 'cl at runtime if
it's only needed at compile time.
2013-03-08 12:51:16 -08:00
bors
dd34178b4b auto merge of #5211 : apasel422/rust/kate, r=graydon
These commits remove some obsolete language features, make some highlighting more correct with respect to the language spec, and introduce highlighting for macros, attributes, core traits, and the new region syntax.
2013-03-04 12:30:51 -08:00
Patrick Walton
3c23589b08 etc: Suppress another Valgrind issue. rs=burningtree 2013-03-03 10:30:00 -08:00
Andrew Paseltiner
39b713f93e kate: allow [] regions to be collapsed 2013-03-03 09:14:53 -05:00
Andrew Paseltiner
c43512be2e kate: restrict char escapes to ones accepted by Rust and highlight hex escapes 2013-03-03 09:08:28 -05:00
Andrew Paseltiner
6002d10ce3 kate: detect and highlight attributes 2013-03-03 08:56:39 -05:00
Andrew Paseltiner
4548eb1a29 kate: consolidate integer suffixes with &rustIntSuf; entity 2013-03-03 08:49:16 -05:00
Andrew Paseltiner
c771a93c50 kate: add note about &rustIdent; 2013-03-03 08:45:44 -05:00
Andrew Paseltiner
8596535679 kate: update Rust version 2013-03-03 08:40:37 -05:00