Commit Graph

914 Commits

Author SHA1 Message Date
gamazeps
e543878f0f Replaced some TODO by FIXME
closes #17478
2014-09-29 18:14:28 +02:00
bors
eeda1b87ff auto merge of #17212 : mahkoh/rust/vim, r=kballard
There are currently two huge problems with the indent file:

1. Long list-like things cannot be indented. See #14446 for one example. Another one is long enums with over 100 lines, including comments. The indentation process stops after 100 lines and the rest is in column 0.
2. In certain files, opening a new line at mod level is extremely slow. See [this](https://github.com/mahkoh/posix.rs/blob/master/src/unistd/mod.rs) for an example. Opening a line at the very end and holing \<cr> down will freeze vim temporarily.

The reason for 1. is that cindent doesn't properly indent things that end with a `,` and the indent file tries to work around this by using the indentation of the previous line. It does this by recursively calling a function on the previous lines until it reaches the start of the block. Naturally O(n^2) function calls don't scale very well. Instead of recalculating the indentation of the previous line, we will now simply use the given indentation of the previous line and let the user deal with the rest. This is sufficient unless the user manually mis-indents a line.

The reason for 2. seems to be function calls of the form
```
searchpair('{\|(', '', '}\|)', 'nbW', 's:is_string_comment(line("."), col("."))')
```
I've no idea what this even does or why it is there since I cannot reproduce the mistake cindent is supposed to make without this fix. Therefore I've simply removed that part.
2014-09-22 07:15:30 +00:00
bors
8d3728fae0 auto merge of #17412 : vadimcn/rust/gccpref, r=alexcrichton
Fixes #17251
2014-09-21 16:30:28 +00:00
Vadim Chugunov
04c41eb372 Move bundled gcc and its libs out into $rust/rustlib/<triple>/gcc/(bin|lib). This way the libs won't be on the -L library search path, and won't confuse external gcc, if one is used. The bundled gcc itself will still be able to find them, because it searches for libs relative to own install location. 2014-09-20 11:42:26 -07:00
Alex Crichton
129aff7d97 rollup merge of #17306 : scialex/fix-zsh 2014-09-19 10:00:19 -07:00
Julian Orth
39116d0191 fix for vim < 7.4.355 2014-09-18 22:16:47 +02:00
bors
28407b6ff0 auto merge of #17335 : TeXitoi/rust/relicense-shootout, r=brson
Everyone agreed.  Fix #17064, fix #17072 

@brson OK?
2014-09-18 03:20:39 +00:00
Alex Crichton
df34b082ab rollup merge of #17309 : aturon/deprecate-libnum 2014-09-17 08:49:37 -07:00
Guillaume Pinot
edec96b78b Relicense shootout-fasta.rs ti the shootout license.
Everyone agreed.

Fix #17072
2014-09-17 08:44:44 +02:00
Guillaume Pinot
a182f13a2e Relicense shootout-spectralnorm.rs to the shootout license
Everyone agreed.

Fix #17064
2014-09-17 08:33:57 +02:00
Aaron Turon
2ff07af996 Deprecate libnum in favor of rust-lang/num
This is part of the migration of crates into the Cargo ecosystem. There
is now an external repository https://github.com/rust-lang/num for bignums.

The single use of libnum elsewhere in the repository is for a shootout
benchmark, which is being moved into the external crate.

Due to deprecation, this is a:

[breaking-change]
2014-09-16 11:29:29 -07:00
Alexander Light
01472435ac Improve the zsh completions.
Currently the ZSH completions are quite old an nearly useless. This
brings them up to be compatible with current rust and makes them far
more useful.

Closes #17305
2014-09-16 12:23:38 -04:00
Brian Anderson
a3c27ea3c6 mk: Update how the build deals with version labels. #16677
Adds a new configure flag, --release-channel, which determines how the version
number should be augmented with a release label, as well as how the distribution
artifacts will be named. This is entirely for use by the build automation.

--release-channel can be either 'source', 'nightly', 'beta', or 'stable'.

Here's a summary of the affect of these values on version number and
artifact naming, respectively:

* source - '0.12.0-pre', 'rust-0.12.0-pre-...'
* nightly - '0.12.0-nightly', 'rust-nightly-...'
* beta - '0.12.0-beta', 'rust-beta-...'
* stable - '0.12.0', 'rust-0.12.0-...'

Per http://discuss.rust-lang.org/t/rfc-impending-changes-to-the-release-process/508/1
2014-09-15 16:25:20 -07:00
Julian Orth
9c72da5251 update vim indent file 2014-09-13 00:24:40 +02:00
bors
e9278c9219 auto merge of #17159 : brson/rust/snaps, r=alexcrichton
This switches win64 hosts to bootstrap from win64 snaps.
2014-09-12 11:20:42 +00:00
Vadim Chugunov
7085b3edd9 Package rustc's mingw dependencies into Windows installer.
gcc, ld, ar, dlltool, windres go into $(RUST)/bin/rustlib/<triple>/bin/
platform libraries and startup objects got into $(RUST)/bin/rustlib/<triple>/lib/
2014-09-11 09:40:21 -07:00
Vadim Chugunov
0ac9e9b561 Update license notice. 2014-09-11 09:40:20 -07:00
Brian Anderson
38e7e4bd9c Register snapshots 2014-09-10 18:33:54 -07:00
bors
9f6d27c39f auto merge of #17135 : brson/rust/wininst, r=alexcrichton
This builds on https://github.com/rust-lang/rust/pull/17109, putting the target triple into the installer name so that we can have both 32-bit and 64-bit.

The resulting installers will be called `rust-0.12.0-pre-x86_64-w64-mingw32.exe`, etc.
2014-09-10 19:25:36 +00:00
bors
4049a4da79 auto merge of #17109 : brson/rust/win64snap, r=alexcrichton 2014-09-10 11:45:44 +00:00
Brian Anderson
5206e79b92 Fix naming of windows installer 2014-09-09 13:33:29 -07:00
Brian Anderson
3ebf25ee80 Fix snapshot.py for win64 2014-09-09 13:29:55 -07:00
Alex Crichton
6b487ebbc0 rollup merge of #17096 : TeXitoi/relicense-shootout-chameneos-redux 2014-09-09 12:07:13 -07:00
Alex Crichton
83e4653404 rollup merge of #17077 : TeXitoi/relicense-shootout-nbody 2014-09-09 12:07:12 -07:00
Guillaume Pinot
13013d8f91 Relicense shootout-chameneos-redux.rs to the shootout license.
Everyone agreed. fix #17076
2014-09-08 08:47:26 +02:00
Guillaume Pinot
4894c21759 Relicense shootout-nbody.rs to the shootout license
Everyone agreed. fix #17073
2014-09-07 19:16:55 +02:00
Guillaume Pinot
0b2e6f8087 Relicense shootout-reverse-complement.rs to the shootout license.
Everyone agreed.  Fix #17065
2014-09-07 18:09:01 +02:00
bors
c8e86e977f auto merge of #16322 : michaelwoerister/rust/gdb-pretty, r=alexcrichton
Also extends the autotest framework to let a test case choose if pretty printing should be enabled.
2014-08-30 04:01:24 +00:00
P1start
de7abd8824 Unify non-snake-case lints and non-uppercase statics lints
This unifies the `non_snake_case_functions` and `uppercase_variables` lints
into one lint, `non_snake_case`. It also now checks for non-snake-case modules.
This also extends the non-camel-case types lint to check type parameters, and
merges the `non_uppercase_pattern_statics` lint into the
`non_uppercase_statics` lint.

Because the `uppercase_variables` lint is now part of the `non_snake_case`
lint, all non-snake-case variables that start with lowercase characters (such
as `fooBar`) will now trigger the `non_snake_case` lint.

New code should be updated to use the new `non_snake_case` lint instead of the
previous `non_snake_case_functions` and `uppercase_variables` lints. All use of
the `non_uppercase_pattern_statics` should be replaced with the
`non_uppercase_statics` lint. Any code that previously contained non-snake-case
module or variable names should be updated to use snake case names or disable
the `non_snake_case` lint. Any code with non-camel-case type parameters should
be changed to use camel case or disable the `non_camel_case_types` lint.

[breaking-change]
2014-08-30 09:10:05 +12:00
Michael Woerister
849ae5d881 debuginfo: Emit different autotest debugger scripts depending on GDB version. 2014-08-27 15:19:14 +02:00
Michael Woerister
6974b4f1b5 debuginfo: Add GDB pretty printers for structs and enums. 2014-08-27 15:19:14 +02:00
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