Commit Graph

883 Commits

Author SHA1 Message Date
bors
36131f5be4 auto merge of #16691 : klutzy/rust/issue-15297, r=alexcrichton
First commit fixes issue regarding recognizing MSYS2 build.
Second commit fixes issue regarding MSYS/Windows paths.
2014-08-23 22:35:56 +00:00
Vadim Chugunov
8c994a1237 Remove stage0 attributes. 2014-08-23 02:11:07 -07:00
klutzy
7eb35bc2a9 test: Convert Window path to MSYS path
When MSYS shell executes program, if its arguments look like MSYS paths,
MSYS automatically converts them into Windows paths.
For example, `/c/path:/d/path` becomes `C:\path;D:\path`.
However, if there is only one path e.g. `/c/path`, it becomes `C:/path`.

maketest.py reverts the behavior to reduce confusion between MSYS and
Windows, but it didn't handle the `/c/path` case. This patch fixes the
issue.

Fixes #15297
Fixes #15250
2014-08-23 16:19:07 +09:00
bors
dc65307e3b auto merge of #16547 : huonw/rust/new-kw, r=pcwalton 2014-08-17 14:56:08 +00:00
bors
6dca1426bc auto merge of #16535 : michaelsproul/rust/vim-traits, r=pcwalton
The vim syntax highlighting file had become out of sync with the real prelude.

Lots of Vector -> Slice renames have happened recently.
2014-08-17 06:26:09 +00:00
Huon Wilson
d1c5db326f Add new keywords (particularly where & virtual) to editor modes. 2014-08-17 11:57:22 +10:00
Michael Sproul
1a5816a9aa vim: Update syntax file for Prelude changes.
Lots of Vector -> Slice renames.
2014-08-16 21:07:27 +10:00
Kevin Ballard
ab65869c9d vim: Don't set foldmethod in the syntax file either
We shouldn't be setting any settings in the syntax file. Better to put
them in the ftplugin, where they won't be pulled in by :syn-include and
can be cleaned up when changing the filetype.
2014-08-15 16:41:07 -07:00
bors
bf0a925dcd auto merge of #16486 : kballard/rust/vim_conceal, r=chris
We shouldn't be setting conceallevel in the syntax file. Besides not
being able to undo this if we switch to another syntax later, it also
interferes with embedding rust in other filetypes (such as markdown).

Instead, set it in the ftplugin, where it belongs.
2014-08-15 02:36:14 +00:00
bors
6b5ec40d45 auto merge of #16435 : vadimcn/rust/windows, r=pcwalton
Using "win32" to mean "Windows" is confusing, especially now, that Rust supports win64 builds.
Let's call spade a spade.
2014-08-15 00:46:19 +00:00
Kevin Ballard
05e45b9e36 vim: Stop setting conceallevel in the syntax file
We shouldn't be setting conceallevel in the syntax file. Besides not
being able to undo this if we switch to another syntax later, it also
interferes with embedding rust in other filetypes (such as markdown).

Instead, set it in the ftplugin, where it belongs.
2014-08-13 16:52:26 -07:00
Brian Anderson
a4b354ca02 core: Add binary_search and binary_search_elem methods to slices.
These are like the existing bsearch methods but if the search fails,
it returns the next insertion point.

The new `binary_search` returns a `BinarySearchResult` that is either
`Found` or `NotFound`. For convenience, the `found` and `not_found`
methods convert to `Option`, ala `Result`.

Deprecate bsearch and bsearch_elem.
2014-08-13 11:30:15 -07:00
Vadim Chugunov
3dfd12967a Replace #[cfg(target_os = "win32")] with #[cfg(target_os = "windows")] 2014-08-12 00:13:43 -07:00
Brian Anderson
4e0a992845 Download snapshots using HTTPS
cc #16123
2014-08-11 12:31:24 -07:00
bors
aae7901a78 auto merge of #16285 : alexcrichton/rust/rename-share, r=huonw
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use`
statement, but the `NoShare` struct is no longer part of `std::kinds::marker`
due to #12660 (the build cannot bootstrap otherwise).

All code referencing the `Share` trait should now reference the `Sync` trait,
and all code referencing the `NoShare` type should now reference the `NoSync`
type. The functionality and meaning of this trait have not changed, only the
naming.

Closes #16281
[breaking-change]
2014-08-08 03:51:15 +00:00
Alex Crichton
1f760d5d1a Rename Share to Sync
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use`
statement, but the `NoShare` struct is no longer part of `std::kinds::marker`
due to #12660 (the build cannot bootstrap otherwise).

All code referencing the `Share` trait should now reference the `Sync` trait,
and all code referencing the `NoShare` type should now reference the `NoSync`
type. The functionality and meaning of this trait have not changed, only the
naming.

Closes #16281
[breaking-change]
2014-08-07 08:54:38 -07:00
Alex Crichton
d29123b35d Merge commit 'd92eaf0273af8c09112f951b2f483505b2f3e8c9' into rollup 2014-08-06 11:25:45 -07:00
Alex Crichton
720746a139 Merge commit '881bfb1a180a1b545daa9da1539ec4c8ebda7ed1' into rollup 2014-08-06 11:25:14 -07:00
bors
e5df5f5606 auto merge of #15865 : jamesrhurst/rust/ctags-regex, r=alexcrichton
Previously the implementation detection regex would detect
`impl fmt::Show for MyStruct` as `fmt`. Now it will be detected as
`fmt::Show for MyStruct`. Implementations such as `impl MyStruct` will
still be detected as `MyStruct`.
2014-08-06 15:51:19 +00:00
Simon Sapin
d92eaf0273 Gtksourceview language spec: add the \0 escape sequence. 2014-08-06 10:18:22 +01:00
bors
fde58d95af auto merge of #16231 : michaelsproul/rust/gedit-macro, r=alexcrichton
Gedit currently lacks syntax highlighting for macros.
2014-08-05 09:51:23 +00:00
Vadim Chugunov
ad2f67f1c3 Use mingw64 target spelling. 2014-08-04 17:43:48 -07:00
bors
efe1f7ee9e auto merge of #15986 : Florob/rust/nfKc-new, r=alexcrichton
This adds a new `Recompositions` iterator, which performs canonical composition on the result of the `Decompositions` iterator (which is canonical or compatibility decomposition). In effect this implements Unicode normalization forms C and KC.
2014-08-04 17:06:19 +00:00
Michael Sproul
806e4f0b14 Gedit/GTKSourceView: Add macro syntax highlighting. 2014-08-04 11:28:37 +10:00
bors
9826e801be auto merge of #16073 : mneumann/rust/dragonfly2, r=alexcrichton
Not included are two required patches:

* LLVM: segmented stack support for DragonFly [1]

* jemalloc: simple configure patches

[1]: http://reviews.llvm.org/D4705
2014-07-31 14:41:34 +00:00
Simon Sapin
3c453b36ce Gedit/gtksourceview language spec: add raw strings
… and color (raw) strings as such in attributes.
This fixes cases where a string contains ] inside an attribute:
that ] used to incorrectly end the attribute coloring.

For large (many lines) doc comments, I’ve found preferable to use
`#![doc = r#"..."#]` to avoid prefixing every line with `//!`.
2014-07-29 15:44:35 -07:00
Michael Neumann
2e2f53fad2 Port Rust to DragonFlyBSD
Not included are two required patches:

* LLVM: segmented stack support for DragonFly [1]

* jemalloc: simple configure patches

[1]: http://reviews.llvm.org/D4705
2014-07-29 16:44:39 +02:00
Florian Zeitz
7ece0abe64 collections, unicode: Add support for NFC and NFKC 2014-07-28 18:47:38 +02:00
Guillaume Pinot
92792248c1 Relicense shootout-k-nucleotide.rs
Everyone agreed except @thestinger. As @thestinger contribution on this file is trivial,
we can relicense it.

Related to #14248, close #15330
2014-07-26 15:06:40 +02:00
bors
c05bb4ec7d auto merge of #15424 : TeXitoi/rust/relicense-shootout-threadring, r=brson
Everyone agreed.

Related to #14248, close #15328

@brson OK?
2014-07-24 18:11:03 +00:00
James Hurst
8a7b0fa939 Improved the tags impl regex 2014-07-24 09:08:52 -04:00
Brian Anderson
2d79bfa415 vim: Add MutableSeq 2014-07-23 13:20:16 -07:00
Chris Morgan
0a0c6da564 Fix :syn-include usage of Vim filetype.
Here’s what the Vim manual says in *:syn-include*:

    :sy[ntax] include [@{grouplist-name}] {file-name}

	All syntax items declared in the included file will have the
	"contained" flag added.  In addition, if a group list is
	specified, all top-level syntax items in the included file will
	be added to that list.

We had two rules for `rustModPath`, one `contained` and the other not.
The effect was that the second (now renamed to `rustModPathInUse`) was
being included in the group list, and thus that all identifiers were
being highlighted as `Include`, which is definitely not what we wanted.
2014-07-21 13:14:34 +10:00
Chris Morgan
ca6ffac4e4 Highlight $(…)* and $foo in Vim. 2014-07-21 13:13:51 +10:00
bors
175f113cba auto merge of #15573 : michaelwoerister/rust/lldb-tests-rebased-09-Jul, r=alexcrichton
This PR adds the LLDB autotests to the debuginfo test suite so I don't have to keep rebasing them locally. They are still disabled by default in `tests.mk`. One of the commits also contains a Python pretty printer which can make LLDB print values with Rust syntax. This was mainly added to deal with output format differences between LLDB versions but you can also use it for your normal LLDB debugging sessions.
```
// The following LLDB commands will load and activate the Rust printers
command script import ./src/etc/lldb_rust_formatters.py
type summary add --no-value --python-function lldb_rust_formatters.print_val -x .* --category Rust
type category enable Rust
```
Expect some rough edges with these, they have not been tested apart from there use in the autotests...
2014-07-16 17:16:20 +00:00
bors
316719e625 auto merge of #15476 : kballard/rust/more_vim_tweaks, r=chris
Tweak the text editing settings (softtabstop, textwidth, etc).

Add some settings to turn on folding and colorcolumn.

Add the undo_ftplugin changes that my previous patch forgot.
2014-07-16 15:36:21 +00:00
Michael Woerister
b56ef794a0 debuginfo: Remove atexit()-debugger shutdown from lldb_batchmode.py
The shutdown call would always result in an exception being printed to standard error.
2014-07-16 09:27:06 +02:00
Michael Woerister
83fe455e3c debuginfo: Add python formatters that allow LLDB to print values with Rust syntax 2014-07-16 09:27:05 +02:00
kwantam
cf432b8f8f add Graphemes iterator; tidy unicode exports
- Graphemes and GraphemeIndices structs implement iterators over
  grapheme clusters analogous to the Chars and CharOffsets for chars in
  a string. Iterator and DoubleEndedIterator are available for both.

- tidied up the exports for libunicode. crate root exports are now moved
  into more appropriate module locations:
  - UnicodeStrSlice, Words, Graphemes, GraphemeIndices are in str module
  - UnicodeChar exported from char instead of crate root
  - canonical_combining_class is exported from str rather than crate root

Since libunicode's exports have changed, programs that previously relied
on the old export locations will need to change their `use` statements
to reflect the new ones. See above for more information on where the new
exports live.

closes #7043
[breaking-change]
2014-07-14 19:53:46 -04:00
bors
f2d251d12e auto merge of #15610 : brson/rust/0.12.0, r=alexcrichton 2014-07-12 18:06:36 +00:00
bors
8a2b7a5c19 auto merge of #15597 : brson/rust/ldconfig, r=pcwalton
If ldconfig fails it emits a warning. This is very possible when installing
to a non-system directory, so the warning tries to indicate that it may
not be a problem.
2014-07-12 04:16:44 +00:00
Brian Anderson
9641856964 Only run ldconfig on Linux 2014-07-11 21:13:40 -07:00
Brian Anderson
a9cf3233f7 Bump version to 0.12.0-pre 2014-07-11 11:26:58 -07:00
Brian Anderson
5ee270a148 install: Run ldconfig when installing on Unix. Closes #15596.
If ldconfig fails it emits a warning. This is very possible when installing
to a non-system directory, so the warning tries to indicate that it may
not be a problem.
2014-07-10 18:27:21 -07:00
Brian Anderson
ad82cb5621 install: Make the LD_LIRARY_PATH warning more aesthetic 2014-07-10 18:16:48 -07:00
Yuri Albuquerque
175d215eb6 Some documentation fixes and improvements 2014-07-10 19:51:11 -04:00
bors
942c72e117 auto merge of #15550 : alexcrichton/rust/install-script, r=brson
This adds detection of the relevant LD_LIBRARY_PATH-like environment variable
and appropriately sets it when testing whether binaries can run or not.
Additionally, the installation prints a recommended value if one is necessary.

Closes #15545
2014-07-09 22:06:27 +00:00
bors
fa7cbb5a46 auto merge of #15283 : kwantam/rust/master, r=alexcrichton
Add libunicode; move unicode functions from core

- created new crate, libunicode, below libstd
- split `Char` trait into `Char` (libcore) and `UnicodeChar` (libunicode)
  - Unicode-aware functions now live in libunicode
    - `is_alphabetic`, `is_XID_start`, `is_XID_continue`, `is_lowercase`,
      `is_uppercase`, `is_whitespace`, `is_alphanumeric`, `is_control`, `is_digit`,
      `to_uppercase`, `to_lowercase`
  - added `width` method in UnicodeChar trait
    - determines printed width of character in columns, or None if it is a non-NULL control character
    - takes a boolean argument indicating whether the present context is CJK or not (characters with 'A'mbiguous widths are double-wide in CJK contexts, single-wide otherwise)
- split `StrSlice` into `StrSlice` (libcore) and `UnicodeStrSlice` (libunicode)
  - functionality formerly in `StrSlice` that relied upon Unicode functionality from `Char` is now in `UnicodeStrSlice`
    - `words`, `is_whitespace`, `is_alphanumeric`, `trim`, `trim_left`, `trim_right`
  - also moved `Words` type alias into libunicode because `words` method is in `UnicodeStrSlice`
- unified Unicode tables from libcollections, libcore, and libregex into libunicode
- updated `unicode.py` in `src/etc` to generate aforementioned tables
- generated new tables based on latest Unicode data
- added `UnicodeChar` and `UnicodeStrSlice` traits to prelude
- libunicode is now the collection point for the `std::char` module, combining the libunicode functionality with the `Char` functionality from libcore
  - thus, moved doc comment for `char` from `core::char` to `unicode::char`
- libcollections remains the collection point for `std::str`

The Unicode-aware functions that previously lived in the `Char` and `StrSlice` traits are no longer available to programs that only use libcore. To regain use of these methods, include the libunicode crate and `use` the `UnicodeChar` and/or `UnicodeStrSlice` traits:

    extern crate unicode;
    use unicode::UnicodeChar;
    use unicode::UnicodeStrSlice;
    use unicode::Words; // if you want to use the words() method

NOTE: this does *not* impact programs that use libstd, since UnicodeChar and UnicodeStrSlice have been added to the prelude.

closes #15224
[breaking-change]
2014-07-09 18:36:30 +00:00
Alex Crichton
c460d38363 etc: Fix install script for rpath removal
This adds detection of the relevant LD_LIBRARY_PATH-like environment variable
and appropriately sets it when testing whether binaries can run or not.
Additionally, the installation prints a recommended value if one is necessary.
2014-07-09 07:44:49 -07:00
Richo Healey
12c334a77b std: Rename the ToStr trait to ToString, and to_str to to_string.
[breaking-change]
2014-07-08 13:01:43 -07:00