]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #15165 : zookoatleastauthoritycom/rust/14148-Optimize-out-exhortations...
bors [Wed, 25 Jun 2014 06:21:20 +0000 (06:21 +0000)]
auto merge of #15165 : zookoatleastauthoritycom/rust/14148-Optimize-out-exhortations-about-being-careful-2, r=huonw

Yes, it is important to be careful, but repeated emphasis about it is probably
not helpful — it starts to sound like you came for a tutorial but found a
finger-wagging lecture.

Even after I removed a few of these comments, there are still several left in
the text. That's probably fine! A couple of mentions of how this is dangerous
and you ought to be careful may be a good reminder to the reader.

After making the edits, I reflowed the paragraphs that I had touched, using
emacs's "M-x fill-paragraph", with fill-column equal to 70.

10 years agoauto merge of #15160 : alexcrichton/rust/remove-f128, r=brson
bors [Wed, 25 Jun 2014 04:31:19 +0000 (04:31 +0000)]
auto merge of #15160 : alexcrichton/rust/remove-f128, r=brson

The f128 type has very little support in the compiler and the feature is
basically unusable today. Supporting half-baked features in the compiler can be
detrimental to the long-term development of the compiler, and hence this feature
is being removed.

10 years agoauto merge of #15163 : alexcrichton/rust/rollup, r=alexcrichton
bors [Wed, 25 Jun 2014 02:02:00 +0000 (02:02 +0000)]
auto merge of #15163 : alexcrichton/rust/rollup, r=alexcrichton

10 years agoTest fixes from the rollup
Alex Crichton [Wed, 25 Jun 2014 00:51:02 +0000 (17:51 -0700)]
Test fixes from the rollup

Closes #14482 (std: Bring back half of Add on String)
Closes #15026 (librustc: Remove the fallback to `int` from typechecking.)
Closes #15119 (Add more description to c_str::unwrap().)
Closes #15120 (Add tests for #12470 and #14285)
Closes #15122 (Remove the cheat sheet.)
Closes #15126 (rustc: Always include the morestack library)
Closes #15127 (Improve ambiguous pronoun.)
Closes #15130 (Fix #15129)
Closes #15131 (Add the Guide, add warning to tutorial.)
Closes #15134 (Xfailed tests for hygiene, etc.)
Closes #15135 (core: Add stability attributes to Clone)
Closes #15136 (Some minor improvements to core::bool)
Closes #15137 (std: Add stability attributes to primitive numeric modules)
Closes #15141 (Fix grammar in tutorial)
Closes #15143 (Remove few FIXMEs)
Closes #15145 (Avoid unnecessary temporary on assignments)
Closes #15147 (Small improvements for metaprogramming)
Closes #15153 (librustc: Check function argument patterns for legality of by-move)
Closes #15154 (test: Add a test for regions, traits, and variance.)
Closes #15159 (rustc: Don't register syntax crates twice)
Closes #13816 (Stabilize version output for rustc and rustdoc)

10 years agoOptimize out exhortations about being careful.
Zooko Wilcox-O'Hearn [Wed, 25 Jun 2014 01:25:10 +0000 (01:25 +0000)]
Optimize out exhortations about being careful.

Yes, it is important to be careful, but repeated emphasis about it is probably
not helpful — it starts to sound like you came for a tutorial but found a
finger-wagging lecture.

Even after I removed a few of these comments, there are still several left in
the text. That's probably fine! A couple of mentions of how this is dangerous
and you ought to be careful may be a good reminder to the reader.

After making the edits, I reflowed the paragraphs that I had touched, using
emacs's "M-x fill-paragraph", with fill-column equal to 70.

10 years agoStabilize version output for rustc and rustdoc
Robert Buonpastore [Mon, 19 May 2014 03:37:07 +0000 (23:37 -0400)]
Stabilize version output for rustc and rustdoc

10 years agorustc: Don't register syntax crates twice
Alex Crichton [Tue, 24 Jun 2014 23:29:15 +0000 (16:29 -0700)]
rustc: Don't register syntax crates twice

We only need to register them once, and once they're registered twice warnings
will start being spewed or worse may happen!

Closes #14330

10 years agotest: Add a test for regions, traits, and variance.
Patrick Walton [Tue, 24 Jun 2014 21:51:12 +0000 (14:51 -0700)]
test: Add a test for regions, traits, and variance.

Closes #12470.

10 years agolibrustc: Check function argument patterns for legality of by-move
Patrick Walton [Tue, 24 Jun 2014 20:41:42 +0000 (13:41 -0700)]
librustc: Check function argument patterns for legality of by-move
bindings.

This will break code that incorrectly did things like:

    fn f(a @ box b: Box<String>) {}

Fix such code to not rely on undefined behavior.

Closes #12534.

[breaking-change]

10 years agoMake parse_expr_res public
Keegan McAllister [Tue, 24 Jun 2014 00:50:40 +0000 (17:50 -0700)]
Make parse_expr_res public

10 years agoAllow splicing more things in quotes
Keegan McAllister [Sat, 21 Jun 2014 01:36:21 +0000 (18:36 -0700)]
Allow splicing more things in quotes

10 years agoUse macros to implement syntax::ext::quote::ToSource
Keegan McAllister [Sat, 21 Jun 2014 01:14:47 +0000 (18:14 -0700)]
Use macros to implement syntax::ext::quote::ToSource

This code deserves a bigger refactor, but here's a local improvement.

10 years agoAvoid unnecessary temporary on assignments
Björn Steinbrink [Sun, 22 Jun 2014 13:32:55 +0000 (15:32 +0200)]
Avoid unnecessary temporary on assignments

We only need the temporary when the type needs to be dropped, for other
types, we can use trans_into to directly place the value into the
destination.

10 years agoRemove few FIXMEs
Piotr Jawniak [Mon, 23 Jun 2014 17:01:14 +0000 (19:01 +0200)]
Remove few FIXMEs

This commit removes FIXMEs of few closed issues.

Closes #13992

10 years agoFix grammar in tutorial
Michael Zhou [Tue, 24 Jun 2014 04:11:19 +0000 (00:11 -0400)]
Fix grammar in tutorial

"as this document" should be "than this document"

10 years agostd: Add stability attributes to primitive numeric modules
Brian Anderson [Mon, 23 Jun 2014 23:44:41 +0000 (23:44 +0000)]
std: Add stability attributes to primitive numeric modules

The following are unstable:

- core::int, i8, i16, i32, i64
- core::uint, u8, u16, u32, u64
- core::int::{BITS, BYTES, MIN, MAX}, etc.
- std::int, i8, i16, i32, i64
- std::uint, u8, u16, u32, u64

The following are experimental:
- std::from_str::FromStr and impls - may need to return Result instead of Option
- std::int::parse_bytes, etc. - ditto
- std::num::FromStrRadix and impls - ditto
- std::num::from_str_radix - ditto

The following are deprecated:
- std::num::ToStrRadix and imples - Wrapper around fmt::radix. Wrong name (Str vs String)

See https://github.com/rust-lang/rust/wiki/Meeting-API-review-2014-06-23#uint

10 years agoMove core::bool tests to run-pass
Brian Anderson [Mon, 23 Jun 2014 23:41:23 +0000 (23:41 +0000)]
Move core::bool tests to run-pass

These are closer to language tests than library.

10 years agocore: Remove bool::to_bit
Brian Anderson [Mon, 23 Jun 2014 22:58:01 +0000 (22:58 +0000)]
core: Remove bool::to_bit

This is an unused one-liner.

10 years agocore: Add stability attributes to Clone
Brian Anderson [Mon, 23 Jun 2014 23:34:29 +0000 (16:34 -0700)]
core: Add stability attributes to Clone

The following are tagged 'unstable'

- core::clone
- Clone
- Clone::clone
- impl Clone for Arc
- impl Clone for arc::Weak
- impl Clone for Rc
- impl Clone for rc::Weak
- impl Clone for Vec
- impl Clone for Cell
- impl Clone for RefCell
- impl Clone for small tuples

The following are tagged 'experimental'

- Clone::clone_from - may not provide enough utility
- impls for various extern "Rust" fns - may not handle lifetimes correctly

See https://github.com/rust-lang/rust/wiki/Meeting-API-review-2014-06-23#clone

10 years agoadded xfailed test for issue 9737
John Clements [Fri, 22 Nov 2013 21:43:22 +0000 (13:43 -0800)]
added xfailed test for issue 9737

10 years agoadded xfailed tests for two other flavors of var hygiene
John Clements [Sat, 21 Sep 2013 06:37:19 +0000 (23:37 -0700)]
added xfailed tests for two other flavors of var hygiene

10 years agoAdd the Guide, add warning to tutorial.
Steve Klabnik [Mon, 23 Jun 2014 22:19:16 +0000 (18:19 -0400)]
Add the Guide, add warning to tutorial.

In line with what @brson, @cmr, @nikomatsakis and I discussed this morning, my
redux of the tutorial will be implemented as the Guide. This way, I can work in
small iterations, rather than dropping a huge PR, which is hard to review.  In
addition, the community can observe my work as I'm doing it.

This adds a note in line with [this comment][reddit] that clarifies the state
of the tutorial, and the community's involvement with it.

[reddit]: http://www.reddit.com/r/rust/comments/28bew8/rusts_documentation_is_about_to_drastically/ci9c98k

10 years agoFix #15129
Jakub Wieczorek [Mon, 23 Jun 2014 22:12:17 +0000 (00:12 +0200)]
Fix #15129

Add support for unit literals to const_eval.

10 years agoImprove ambiguous pronoun.
Steve Klabnik [Mon, 23 Jun 2014 20:11:19 +0000 (16:11 -0400)]
Improve ambiguous pronoun.

Fixes #14806

10 years agorustc: Always include the morestack library
Alex Crichton [Mon, 23 Jun 2014 19:54:56 +0000 (12:54 -0700)]
rustc: Always include the morestack library

It was previously assumed that the object file generated by LLVM would always
require the __morestack function, but that assumption appears to be incorrect,
as outlined in #15108. This commit forcibly tells the linker to include the
entire archive, regardless of whether it's currently necessary or not.

Closes #15108

10 years agoRemove the cheat sheet.
Steve Klabnik [Mon, 23 Jun 2014 18:04:54 +0000 (14:04 -0400)]
Remove the cheat sheet.

Rust by Example is far better.

Fixes #14380.

10 years agoAdd tests for #12470 and #14285
Edward Wang [Mon, 23 Jun 2014 17:42:13 +0000 (01:42 +0800)]
Add tests for #12470 and #14285

The #14869 removed `TraitStore` from `ty_trait` and represented trait
reference as regular `ty_rptr`. An old bug of the missing constraint
upon lifetime parameter of trait reference then is fixed as a side
effect. Adds tests for affected bugs and closes them.

Closes #12470.
Closes #14285.

10 years agoAdd more description to c_str::unwrap().
Steve Klabnik [Mon, 23 Jun 2014 16:52:28 +0000 (12:52 -0400)]
Add more description to c_str::unwrap().

It's unclear what you are supposed to do with this memory.
Let's make that more clear.

10 years agolibrustc: Remove the fallback to `int` from typechecking.
Niko Matsakis [Mon, 21 Apr 2014 21:58:52 +0000 (17:58 -0400)]
librustc: Remove the fallback to `int` from typechecking.

This breaks a fair amount of code. The typical patterns are:

* `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`;

* `println!("{}", 3)`: change to `println!("{}", 3i)`;

* `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`.

RFC #30. Closes #6023.

[breaking-change]

10 years agostd: Bring back half of Add on String
Alex Crichton [Wed, 28 May 2014 04:34:00 +0000 (21:34 -0700)]
std: Bring back half of Add on String

This adds an implementation of Add for String where the rhs is <S: Str>. The
other half of adding strings is where the lhs is <S: Str>, but coherence and
the libcore separation currently prevent that.

10 years agoRemove the quad_precision_float feature gate
Alex Crichton [Tue, 24 Jun 2014 23:34:46 +0000 (16:34 -0700)]
Remove the quad_precision_float feature gate

The f128 type has very little support in the compiler and the feature is
basically unusable today. Supporting half-baked features in the compiler can be
detrimental to the long-term development of the compiler, and hence this feature
is being removed.

10 years agoauto merge of #15024 : kmcallister/rust/lint, r=alexcrichton
bors [Tue, 24 Jun 2014 22:06:48 +0000 (22:06 +0000)]
auto merge of #15024 : kmcallister/rust/lint, r=alexcrichton

This is a rebase of #14804 with two new commits on top to implement and test lint plugins.

r? @alexcrichton @huonw: Can you take a look at the new commits, and also weigh in about any issues from the old PR that you feel are still unresolved? I'm leaving the old branch alone to preserve discussion history.

10 years agoauto merge of #15118 : stepancheg/rust/concat, r=alexcrichton
bors [Tue, 24 Jun 2014 19:36:47 +0000 (19:36 +0000)]
auto merge of #15118 : stepancheg/rust/concat, r=alexcrichton

(And in other extensions implemented with `get_exprs_from_tts` function).

10 years agoMore upstream lint changes
Keegan McAllister [Tue, 24 Jun 2014 17:29:08 +0000 (10:29 -0700)]
More upstream lint changes

10 years agoTest lint plugins
Keegan McAllister [Wed, 18 Jun 2014 20:46:48 +0000 (13:46 -0700)]
Test lint plugins

10 years agoImplement lint plugins
Keegan McAllister [Thu, 19 Jun 2014 00:26:14 +0000 (17:26 -0700)]
Implement lint plugins

10 years agoIncorporate upstream changes to old lint code
Keegan McAllister [Wed, 18 Jun 2014 19:34:43 +0000 (12:34 -0700)]
Incorporate upstream changes to old lint code

10 years agoList builtin lints one per line for better diffs
Keegan McAllister [Wed, 18 Jun 2014 19:35:48 +0000 (12:35 -0700)]
List builtin lints one per line for better diffs

10 years agoReindent function call continuations, and other style fixes
Keegan McAllister [Wed, 18 Jun 2014 00:41:50 +0000 (17:41 -0700)]
Reindent function call continuations, and other style fixes

10 years agoDrop the ExportedItems argument from LintPass::check_crate
Keegan McAllister [Wed, 18 Jun 2014 00:06:04 +0000 (17:06 -0700)]
Drop the ExportedItems argument from LintPass::check_crate

None of the builtin lints use this, and it's now available through the Context.

10 years agoMake the crate and its exported items available in the lint context
Keegan McAllister [Tue, 17 Jun 2014 23:55:34 +0000 (16:55 -0700)]
Make the crate and its exported items available in the lint context

10 years agoRework lint attr parsing and use it in middle::dead
Keegan McAllister [Fri, 13 Jun 2014 22:03:26 +0000 (15:03 -0700)]
Rework lint attr parsing and use it in middle::dead

10 years agoConvert builtin lints to uppercase names for style consistency
Keegan McAllister [Fri, 13 Jun 2014 20:13:05 +0000 (13:13 -0700)]
Convert builtin lints to uppercase names for style consistency

10 years agoUse names in Lint structs in an ASCII-case-insensitive way
Keegan McAllister [Fri, 13 Jun 2014 20:04:52 +0000 (13:04 -0700)]
Use names in Lint structs in an ASCII-case-insensitive way

In preparation for the next commit.

10 years agoRun lint passes using the Option dance instead of RefCells
Keegan McAllister [Fri, 13 Jun 2014 07:00:49 +0000 (00:00 -0700)]
Run lint passes using the Option dance instead of RefCells

10 years agoStop using Default for initializing builtin lints
Keegan McAllister [Fri, 13 Jun 2014 05:20:47 +0000 (22:20 -0700)]
Stop using Default for initializing builtin lints

It wasn't a very appropriate use of the trait. Instead, just enumerate
unit structs and those with a `fn new()` separately.

10 years agoClean up and document the public lint API
Keegan McAllister [Fri, 6 Jun 2014 22:49:48 +0000 (15:49 -0700)]
Clean up and document the public lint API

Also change some code formatting.

lint::builtin becomes a sibling of lint::context in order to ensure that lints
implemented there use the same public API as lint plugins.

10 years agoStore the registered lints in the Session
Keegan McAllister [Tue, 10 Jun 2014 21:03:19 +0000 (14:03 -0700)]
Store the registered lints in the Session

10 years agoReplace enum LintId with an extensible alternative
Keegan McAllister [Wed, 4 Jun 2014 21:35:58 +0000 (14:35 -0700)]
Replace enum LintId with an extensible alternative

10 years agoConvert lints to a trait-based infrastructure
Keegan McAllister [Mon, 2 Jun 2014 22:27:15 +0000 (15:27 -0700)]
Convert lints to a trait-based infrastructure

The immediate benefits are

* moving the state specific to a single lint out of Context, and
* replacing the soup of function calls in the Visitor impl with
  more structured control flow

But this is also a step towards loadable lints.

10 years agoRename lint::Lint to lint::LintId
Keegan McAllister [Sun, 1 Jun 2014 23:21:52 +0000 (16:21 -0700)]
Rename lint::Lint to lint::LintId

10 years agoMove lint infrastructure and individual lints into separate files
Keegan McAllister [Sun, 1 Jun 2014 23:16:00 +0000 (16:16 -0700)]
Move lint infrastructure and individual lints into separate files

10 years agoMove lint.rs out of middle
Keegan McAllister [Sun, 1 Jun 2014 22:58:06 +0000 (15:58 -0700)]
Move lint.rs out of middle

We're going to have more modules under lint, and the paths get unwieldy. We
also plan to have lints run at multiple points in the compilation pipeline.

10 years agoauto merge of #15114 : ben0x539/rust/run-make-libpath, r=alexcrichton
bors [Tue, 24 Jun 2014 17:16:48 +0000 (17:16 +0000)]
auto merge of #15114 : ben0x539/rust/run-make-libpath, r=alexcrichton

It was accidentally removed in #15006 and that somehow got past the
build bots, causing `src/test/run-make/c-dynamic-dylib` to fail on at
least my linux system.

This resolves #15103 (thanks to @alexcrichton!).

10 years agoauto merge of #15071 : tomjakubowski/rust/fix-15052, r=alexcrichton
bors [Tue, 24 Jun 2014 15:32:29 +0000 (15:32 +0000)]
auto merge of #15071 : tomjakubowski/rust/fix-15052, r=alexcrichton

Fix #15052

10 years agoauto merge of #14963 : w3ln4/rust/master, r=alexcrichton
bors [Tue, 24 Jun 2014 13:46:54 +0000 (13:46 +0000)]
auto merge of #14963 : w3ln4/rust/master, r=alexcrichton

The aim of these changes is not working out a generic bi-endianness architectures support but to allow people develop for little endian MIPS machines (issue #7190).

10 years agolibrustc: Remove outdated reference to `~` and `@`
Tom Jakubowski [Sat, 21 Jun 2014 05:08:58 +0000 (22:08 -0700)]
librustc: Remove outdated reference to `~` and `@`

Fix #15052

10 years agoauto merge of #15113 : pnkfelix/rust/fsk-add-regression-test-for-ice-from-10846,...
bors [Tue, 24 Jun 2014 12:01:50 +0000 (12:01 +0000)]
auto merge of #15113 : pnkfelix/rust/fsk-add-regression-test-for-ice-from-10846, r=alexcrichton

Includes a bit more comments than usual for a regression test; I felt like documenting Niko's diagnosis of the original problem here.

Fix #15111

r? anyone.

10 years agoauto merge of #15107 : ipetkov/rust/tutorial-update, r=alexcrichton
bors [Tue, 24 Jun 2014 10:16:49 +0000 (10:16 +0000)]
auto merge of #15107 : ipetkov/rust/tutorial-update, r=alexcrichton

10 years agoAdded Mipsel architecture support
Pawel Olzacki [Tue, 17 Jun 2014 07:16:03 +0000 (09:16 +0200)]
Added Mipsel architecture support

10 years agoauto merge of #15066 : pcwalton/rust/lang-and-intrinsic-feature-gate, r=alexcrichton
bors [Tue, 24 Jun 2014 07:56:51 +0000 (07:56 +0000)]
auto merge of #15066 : pcwalton/rust/lang-and-intrinsic-feature-gate, r=alexcrichton

If you define lang items in your crate, add `#[feature(lang_items)]`.

If you define intrinsics (`extern "rust-intrinsic"`), add
`#[feature(intrinsics)]`.

Closes #12858.

[breaking-change]

r? @brson

10 years agolibrustc: Feature gate lang items and intrinsics.
Patrick Walton [Fri, 20 Jun 2014 23:39:23 +0000 (16:39 -0700)]
librustc: Feature gate lang items and intrinsics.

If you define lang items in your crate, add `#[feature(lang_items)]`.

If you define intrinsics (`extern "rust-intrinsic"`), add
`#[feature(intrinsics)]`.

Closes #12858.

[breaking-change]

10 years agoauto merge of #15079 : nikomatsakis/rust/issue-5527-unify-refactor, r=pnkfelix
bors [Tue, 24 Jun 2014 06:06:52 +0000 (06:06 +0000)]
auto merge of #15079 : nikomatsakis/rust/issue-5527-unify-refactor, r=pnkfelix

This is just a cleanup of the code. Doesn't really change anything deep about the way we operate. This is a prelude to implementing a good solution for one-way matching for #5527.

r? @pnkfelix (we were just crawling about this code, after all)

10 years agoauto merge of #14952 : alexcrichton/rust/const-unsafe-pointers, r=brson
bors [Tue, 24 Jun 2014 04:16:53 +0000 (04:16 +0000)]
auto merge of #14952 : alexcrichton/rust/const-unsafe-pointers, r=brson

This does not yet change the compiler and libraries from `*T` to `*const T` as
it will require a snapshot to do so.

cc #7362

---

Note that the corresponding RFC, https://github.com/rust-lang/rfcs/pull/68, has not yet been accepted. It was [discussed at the last meeting](https://github.com/rust-lang/rust/wiki/Meeting-weekly-2014-06-10#rfc-pr-68-unsafe-pointers-rename-t-to-const-t) and decided to be accepted, however. I figured I'd get started on the preliminary work for the RFC that will be required regardless.

10 years agoauto merge of #15105 : alexcrichton/rust/snapshots, r=luqmana
bors [Tue, 24 Jun 2014 02:31:55 +0000 (02:31 +0000)]
auto merge of #15105 : alexcrichton/rust/snapshots, r=luqmana

10 years agoauto merge of #14885 : pcwalton/rust/struct-literal-tightening, r=alexcrichton
bors [Tue, 24 Jun 2014 00:36:54 +0000 (00:36 +0000)]
auto merge of #14885 : pcwalton/rust/struct-literal-tightening, r=alexcrichton

`for...in`.

Closes #14803.

If you used a structure literal after one of these keywords, surround it
in parentheses.

[breaking-change]

r? @nick29581

10 years agolibsyntax: Disallow struct literals after `if`, `while`, `match`, and
Patrick Walton [Sat, 14 Jun 2014 02:09:12 +0000 (19:09 -0700)]
libsyntax: Disallow struct literals after `if`, `while`, `match`, and
`for...in`.

Closes #14803.

If you used a structure literal after one of these keywords, surround it
in parentheses.

[breaking-change]

10 years agoDocs: tutorial: Remove a couple references to `~T`
Ivan Petkov [Mon, 23 Jun 2014 06:45:45 +0000 (23:45 -0700)]
Docs: tutorial: Remove a couple references to `~T`

10 years agoauto merge of #14974 : Ryman/rust/non_trait_method, r=alexcrichton
bors [Mon, 23 Jun 2014 21:46:46 +0000 (21:46 +0000)]
auto merge of #14974 : Ryman/rust/non_trait_method, r=alexcrichton

Closes #3973.

10 years agorustc: catch `impl X for Y` where X is not a trait in resolve.
Kevin Butler [Thu, 19 Jun 2014 22:23:51 +0000 (23:23 +0100)]
rustc: catch `impl X for Y` where X is not a trait in resolve.

10 years agorustc: catch non-trait methods before typeck.
Kevin Butler [Wed, 18 Jun 2014 13:16:45 +0000 (14:16 +0100)]
rustc: catch non-trait methods before typeck.

Closes #3973.

10 years agoauto merge of #15106 : Sawyer47/rust/rm-duplicated-tests, r=alexcrichton
bors [Mon, 23 Jun 2014 16:16:37 +0000 (16:16 +0000)]
auto merge of #15106 : Sawyer47/rust/rm-duplicated-tests, r=alexcrichton

Even if they used to test different things in the past, they are
now identical to other files.

Closes #11496

10 years agoAllow trailing comma in `concat!`
Stepan Koltsov [Mon, 23 Jun 2014 15:51:40 +0000 (15:51 +0000)]
Allow trailing comma in `concat!`

(And in other extensions implemented with `get_exprs_from_tts` function).

10 years agoauto merge of #15100 : rapha/rust/master, r=alexcrichton
bors [Mon, 23 Jun 2014 14:31:39 +0000 (14:31 +0000)]
auto merge of #15100 : rapha/rust/master, r=alexcrichton

/usr/bin/env appears to be more portable.

10 years agoauto merge of #15098 : ben0x539/rust/nullary-tuple-struct, r=pcwalton
bors [Mon, 23 Jun 2014 12:46:33 +0000 (12:46 +0000)]
auto merge of #15098 : ben0x539/rust/nullary-tuple-struct, r=pcwalton

Reject `struct Foo();` to fix #15095.

10 years agoAdd regression test for ICE from issue 10846.
Felix S. Klock II [Mon, 23 Jun 2014 12:17:18 +0000 (14:17 +0200)]
Add regression test for ICE from issue 10846.

10 years agotest: readd TMPDIR to LD_LIBRARY_PATH for run-make
Benjamin Herr [Mon, 23 Jun 2014 11:12:37 +0000 (13:12 +0200)]
test: readd TMPDIR to LD_LIBRARY_PATH for run-make

It was accidentally removed in #15006 and that somehow got past the
build bots, causing `src/test/run-make/c-dynamic-dylib` to fail on at
least my linux system.

This resolves #15103 (thanks to @alexcrichton!).

10 years agoauto merge of #15089 : tomjakubowski/rust/rustdoc-default-typarams-12291, r=alexcrichton
bors [Mon, 23 Jun 2014 11:01:36 +0000 (11:01 +0000)]
auto merge of #15089 : tomjakubowski/rust/rustdoc-default-typarams-12291, r=alexcrichton

fix #12291

10 years agoauto merge of #15086 : jakub-/rust/xc-struct-variants-match, r=alexcrichton
bors [Mon, 23 Jun 2014 09:16:36 +0000 (09:16 +0000)]
auto merge of #15086 : jakub-/rust/xc-struct-variants-match, r=alexcrichton

Turns out field names of struct variants are not encoded in crate metadata.

10 years agoauto merge of #15083 : edwardw/rust/destructure-trait-ref, r=pcwalton
bors [Mon, 23 Jun 2014 07:26:37 +0000 (07:26 +0000)]
auto merge of #15083 : edwardw/rust/destructure-trait-ref, r=pcwalton

Closes #15031.

10 years agoauto merge of #15061 : pnkfelix/rust/fsk-fix-issue-10846, r=nikomatsakis
bors [Mon, 23 Jun 2014 04:31:35 +0000 (04:31 +0000)]
auto merge of #15061 : pnkfelix/rust/fsk-fix-issue-10846, r=nikomatsakis

In other words, Late-bound regions that occur non-free should be
skipped.

Fix #10846 (specifically the ICE, not the weakness in the current type inference).

10 years agoRegister new snapshots
Alex Crichton [Mon, 23 Jun 2014 04:16:11 +0000 (21:16 -0700)]
Register new snapshots

10 years agoauto merge of #15097 : tomjakubowski/rust/fix-feature-gate-docs, r=sfackler
bors [Mon, 23 Jun 2014 02:21:37 +0000 (02:21 +0000)]
auto merge of #15097 : tomjakubowski/rust/fix-feature-gate-docs, r=sfackler

See http://static.rust-lang.org/doc/master/rustc/front/feature_gate/index.html for the problem this fixes.

10 years agoauto merge of #15068 : erickt/rust/mem-inline, r=pcwalton
bors [Mon, 23 Jun 2014 00:11:39 +0000 (00:11 +0000)]
auto merge of #15068 : erickt/rust/mem-inline, r=pcwalton

This is a couple micro-optimizations I've been sitting on for a while. This inlines a couple functions that are important to the `std::io::mem`. Ultimately, this results in about a 15% performance increase in some micro-benchmarks for my [libserialize](https://github.com/erickt/rust-serde) rewrite.

10 years agoChange /bin/env to /usr/bin/env in helper python script, as it is more portable
Raphael Speyer [Sun, 22 Jun 2014 23:17:40 +0000 (09:17 +1000)]
Change /bin/env to /usr/bin/env in helper python script, as it is more portable

10 years agoauto merge of #15081 : jakub-/rust/issue-15080, r=alexcrichton
bors [Sun, 22 Jun 2014 21:31:39 +0000 (21:31 +0000)]
auto merge of #15081 : jakub-/rust/issue-15080, r=alexcrichton

Fixes #15080.

10 years agoauto merge of #15091 : nikomatsakis/rust/issue-5527-rename-types, r=pcwalton
bors [Sun, 22 Jun 2014 18:41:41 +0000 (18:41 +0000)]
auto merge of #15091 : nikomatsakis/rust/issue-5527-rename-types, r=pcwalton

Some cleanups I'm sick of rebasing.

r? @pcwalton (do you agree with new names?)

10 years agolibsyntax: don't allow enum structs with no fields
Benjamin Herr [Sun, 22 Jun 2014 17:53:56 +0000 (19:53 +0200)]
libsyntax: don't allow enum structs with no fields

Unit-like structs are written as `struct Foo;`, but we erroneously
accepted `struct Foo();` and took it to mean the same thing. Now we
don't, so use the `struct Foo;` form!

[breaking-change]

10 years agolibrustc: Fix poorly formatted doc in feature_gate
Tom Jakubowski [Sun, 22 Jun 2014 17:29:42 +0000 (10:29 -0700)]
librustc: Fix poorly formatted doc in feature_gate

The #![feature(...)] line had been rendering in the docs as a header
because of Markdown syntax.

10 years agoauto merge of #15088 : Sawyer47/rust/detotal, r=alexcrichton
bors [Sun, 22 Jun 2014 15:16:39 +0000 (15:16 +0000)]
auto merge of #15088 : Sawyer47/rust/detotal, r=alexcrichton

There were still Total{Ord,Eq} in docs and src/etc

10 years agoRename ty_param_bounds_and_ty to Polytype
Niko Matsakis [Tue, 6 May 2014 19:59:45 +0000 (15:59 -0400)]
Rename ty_param_bounds_and_ty to Polytype

10 years agoRename and move ty_param_substs_and_ty
Niko Matsakis [Tue, 6 May 2014 13:52:04 +0000 (09:52 -0400)]
Rename and move ty_param_substs_and_ty

10 years agoRemove duplicated test files
Piotr Jawniak [Sun, 22 Jun 2014 13:55:27 +0000 (15:55 +0200)]
Remove duplicated test files

Even if they used to test different things in the past, they are
now identical to other files.

Closes #11496

10 years agoRefactor the unification code and rejuvenate the unit test
Niko Matsakis [Fri, 20 Jun 2014 10:35:06 +0000 (06:35 -0400)]
Refactor the unification code and rejuvenate the unit test
infrastructure that has been accidentally left out of the build
for a rather long time (it was still using `@DVec`!)

10 years agoUpdate few files after comparison traits renaming
Piotr Jawniak [Sun, 22 Jun 2014 07:31:39 +0000 (09:31 +0200)]
Update few files after comparison traits renaming

There were still Total{Ord,Eq} in docs and src/etc

10 years agoRegionFolder should only invoke callback on free regions.
Felix S. Klock II [Fri, 20 Jun 2014 20:26:14 +0000 (22:26 +0200)]
RegionFolder should only invoke callback on free regions.

In other words, Late-bound regions that occur non-free should be
skipped.

Fix #10846.

10 years agoauto merge of #15005 : dotdash/rust/i1_bool, r=alexcrichton
bors [Sun, 22 Jun 2014 00:01:34 +0000 (00:01 +0000)]
auto merge of #15005 : dotdash/rust/i1_bool, r=alexcrichton

We currently compiled bools to i8 values, because there was a bug in
LLVM that sometimes caused miscompilations when using i1 in, for
example, structs.

Using i8 means a lot of unnecessary zero-extend and truncate operations
though, since we have to convert the value from and to i1 when using for
example icmp or br instructions. Besides the unnecessary overhead caused
by this, it also sometimes made LLVM miss some optimizations.

First, we have to fix some bugs concerning the handling of
attributes in foreign function declarations and calls. These
are required because the i1 type needs the ZExt attribute when
used as a function parameter or return type.

Then we have to update LLVM to get a bugfix without which LLVM
sometimes generates broken code when using i1.

And then, finally, we can switch bools over to i1.

10 years agoFix spurious non-exhaustive errors for cross-crate struct variants
Jakub Wieczorek [Sat, 21 Jun 2014 21:16:31 +0000 (23:16 +0200)]
Fix spurious non-exhaustive errors for cross-crate struct variants

10 years agocollections: fix running `make check-stage1-collections`
Erick Tryzelaar [Sat, 21 Jun 2014 03:08:17 +0000 (23:08 -0400)]
collections: fix running `make check-stage1-collections`

10 years agostd: inline many of the Writer/Reader methods
Erick Tryzelaar [Sat, 21 Jun 2014 03:05:42 +0000 (23:05 -0400)]
std: inline many of the Writer/Reader methods

This allows llvm to optimize away much of the overhead from using
the MemReader/MemWriters. My benchmarks showed it to shave 15% off
of my in progress serialization/json encoding.