]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoopenbsd don't support TLS
Sébastien Marie [Wed, 11 Feb 2015 12:36:44 +0000 (13:36 +0100)]
openbsd don't support TLS

9 years agoAuto merge of #22160 - dotdash:extern_rust, r=brson
bors [Wed, 11 Feb 2015 01:04:54 +0000 (01:04 +0000)]
Auto merge of #22160 - dotdash:extern_rust, r=brson

As the function comment already says, the types generated in the
foreign_signture function don't necessarily match the types used for a
corresponding rust function. Therefore we can't just use these types to
guide the translation of the wrapper function that bridges between the
external ABI and the rust ABI. Instead, we can query LLVM about the
types used in the rust function and use those to generate an appropriate
wrapper.

Fixes #21454

9 years agoFix ICE when compiling "extern" rust functions
Björn Steinbrink [Tue, 10 Feb 2015 22:43:38 +0000 (23:43 +0100)]
Fix ICE when compiling "extern" rust functions

As the function comment already says, the types generated in the
foreign_signture function don't necessarily match the types used for a
corresponding rust function. Therefore we can't just use these types to
guide the translation of the wrapper function that bridges between the
external ABI and the rust ABI. Instead, we can query LLVM about the
types used in the rust function and use those to generate an appropriate
wrapper.

Fixes #21454

9 years agoAuto merge of #22089 - dotdash:llvm_20150207, r=alexcrichton
bors [Tue, 10 Feb 2015 22:08:30 +0000 (22:08 +0000)]
Auto merge of #22089 - dotdash:llvm_20150207, r=alexcrichton

Fixes #21996

9 years agoAuto merge of #22153 - alexcrichton:rollup, r=alexcrichton
bors [Tue, 10 Feb 2015 19:52:04 +0000 (19:52 +0000)]
Auto merge of #22153 - alexcrichton:rollup, r=alexcrichton

9 years agoTest fixes and rebase conflicts
Alex Crichton [Tue, 10 Feb 2015 19:05:20 +0000 (11:05 -0800)]
Test fixes and rebase conflicts

9 years agorollup merge of #22144: pnkfelix/fru-privacy-rfc-736
Alex Crichton [Tue, 10 Feb 2015 17:05:17 +0000 (09:05 -0800)]
rollup merge of #22144: pnkfelix/fru-privacy-rfc-736

9 years agorollup merge of #22147: dotdash/llvm_version
Alex Crichton [Tue, 10 Feb 2015 16:43:20 +0000 (08:43 -0800)]
rollup merge of #22147: dotdash/llvm_version

When trying to build against a newer, local LLVM version it might be
preferable to have a flag to disable the LLVM version check instead of
having to modify the configure script.

Fixes #21998

r? @alexcrichton

9 years agorollup merge of #22143: pnkfelix/fix-issue-20801
Alex Crichton [Tue, 10 Feb 2015 16:43:18 +0000 (08:43 -0800)]
rollup merge of #22143: pnkfelix/fix-issue-20801

Add error message (i.e. do not ICE) when moving out of unsafe pointers.

Fix #20801.

9 years agorollup merge of #22142: Kimundi/unsized_unique
Alex Crichton [Tue, 10 Feb 2015 16:43:16 +0000 (08:43 -0800)]
rollup merge of #22142: Kimundi/unsized_unique

This is to allow for use cases like sending a raw pointer slice across thread boundaries.

9 years agorollup merge of #22135: apasel422/issue-22131
Alex Crichton [Tue, 10 Feb 2015 16:43:14 +0000 (08:43 -0800)]
rollup merge of #22135: apasel422/issue-22131

fixes #22131

9 years agorollup merge of #22130: steveklabnik/gh20172
Alex Crichton [Tue, 10 Feb 2015 16:43:12 +0000 (08:43 -0800)]
rollup merge of #22130: steveklabnik/gh20172

Fixes #20172

9 years agorollup merge of #22129: steveklabnik/gh22032
Alex Crichton [Tue, 10 Feb 2015 16:43:09 +0000 (08:43 -0800)]
rollup merge of #22129: steveklabnik/gh22032

Fixes #22032

9 years agorollup merge of #22128: steveklabnik/gh22085
Alex Crichton [Tue, 10 Feb 2015 16:43:07 +0000 (08:43 -0800)]
rollup merge of #22128: steveklabnik/gh22085

Fixes #22085

/cc @tomjakubowski

9 years agorollup merge of #22125: alexcrichton/into-iter-stability
Alex Crichton [Tue, 10 Feb 2015 16:43:04 +0000 (08:43 -0800)]
rollup merge of #22125: alexcrichton/into-iter-stability

* Remove type parameters from `IteratorExt::cloned`
* Rename `IntoIterator::Iter` to `IntoIterator::IntoIter`
* Mark `IntoIterator::into_iter` as stable (but not the trait, only the method).

9 years agorollup merge of #22120: lukesteensen/closures_guide
Alex Crichton [Tue, 10 Feb 2015 16:43:03 +0000 (08:43 -0800)]
rollup merge of #22120: lukesteensen/closures_guide

Based off https://github.com/rust-lang/rust/pull/21843, it looks like the syntax in the Closures guide is outdated.

9 years agorollup merge of #22116: kmcallister/cfg_attr
Alex Crichton [Tue, 10 Feb 2015 16:43:01 +0000 (08:43 -0800)]
rollup merge of #22116: kmcallister/cfg_attr

Fixes #22070.
Fixes #19372.

r? @sfackler

9 years agorollup merge of #22115: nagisa/dedupe-cratetypes
Alex Crichton [Tue, 10 Feb 2015 16:42:57 +0000 (08:42 -0800)]
rollup merge of #22115: nagisa/dedupe-cratetypes

Crate types from multiple sources appear to be deduplicated properly, but not
deduplicated if they come from the command line arguments. At worst, this used
to cause compiler failures when `--crate-type=lib,rlib` (the same as
`--crate-type=rlib,rlib`, at least at the time of this commit) is provided and
generate the output multiple times otherwise.

r? @alexcrichton

9 years agorollup merge of #22112: mbudde/std-cell-doc-fix
Alex Crichton [Tue, 10 Feb 2015 16:42:55 +0000 (08:42 -0800)]
rollup merge of #22112: mbudde/std-cell-doc-fix

Replace links to `../index.html` with `index.html` as they are linking to the `std` module and not `std::cell` as intended.

See for example [RefCell documentation](http://doc.rust-lang.org/std/cell/struct.RefCell.html).

9 years agorollup merge of #22109: petrochenkov/intuint1
Alex Crichton [Tue, 10 Feb 2015 16:42:53 +0000 (08:42 -0800)]
rollup merge of #22109: petrochenkov/intuint1

9 years agorollup merge of #22106: steveklabnik/doc_trait_objects
Alex Crichton [Tue, 10 Feb 2015 16:42:51 +0000 (08:42 -0800)]
rollup merge of #22106: steveklabnik/doc_trait_objects

I started to write up some docs on this, and then realized I was just repeating http://huonw.github.io/blog/2015/01/peeking-inside-trait-objects/ but worse. @huonw previously said that we can use this content if we wanted, so I made some tweaks and integrated it into the book.

Fixes #21707

9 years agorollup merge of #22103: pczarn/fix-ice-22091
Alex Crichton [Tue, 10 Feb 2015 16:42:49 +0000 (08:42 -0800)]
rollup merge of #22103: pczarn/fix-ice-22091

Fixes #22091

I'm not sure how to write a test for this. An ICE happens with spans that start near (after?) a null character or some other zero-width unicode character.

9 years agorollup merge of #22097: cllns/fix-fallback-fonts
Alex Crichton [Tue, 10 Feb 2015 16:42:47 +0000 (08:42 -0800)]
rollup merge of #22097: cllns/fix-fallback-fonts

The fallback font for a serif font should also be serif, not sans serif.

9 years agorollup merge of #22094: alkor/cleanup-show-string
Alex Crichton [Tue, 10 Feb 2015 16:42:45 +0000 (08:42 -0800)]
rollup merge of #22094: alkor/cleanup-show-string

Rename several remaining `Show`s to Debug, `String`s to Display (mostly in comments and docs).
Update reference.md:
 - derive() no longer supports Zero trait
 - derive() now supports Copy trait

9 years agorollup merge of #22088: semarie/openbsd-rmake
Alex Crichton [Tue, 10 Feb 2015 16:41:54 +0000 (08:41 -0800)]
rollup merge of #22088: semarie/openbsd-rmake

- c-link-to-rust-staticlib: use `EXTRACFLAGS` defined by tools.mk for
  choose the good libraries to link to.

tools.mk define a variable `EXTRACFLAGS` that contains the needed library per target. So it is better to use it, instead of duplicate the code here. I keep the `ifndef IS_WINDOWS` has tools.mk define something for WINDOWS... so I don't change things that I couldn't test.

- no-stack-check: disabled for openbsd (no segmented stacks here)

- symbols-are-reasonable: use portable grep pattern

- target-specs: use POSIX form for options when invoking grep

- use-extern-for-plugins: disable as OpenBSD only support x86_64 for now

9 years agorollup merge of #22072: geofft/doc-byte-string-literal
Alex Crichton [Tue, 10 Feb 2015 16:41:52 +0000 (08:41 -0800)]
rollup merge of #22072: geofft/doc-byte-string-literal

This was correct in the EBNF, but not in the prose (which seems to have
been copied-and-pasted from regular string literals).

9 years agorollup merge of #22067: Gankro/collections-tests
Alex Crichton [Tue, 10 Feb 2015 16:41:50 +0000 (08:41 -0800)]
rollup merge of #22067: Gankro/collections-tests

So many warnings

9 years agorollup merge of #22065: bluss/range-size-hint
Alex Crichton [Tue, 10 Feb 2015 16:41:48 +0000 (08:41 -0800)]
rollup merge of #22065: bluss/range-size-hint

When self.start > self.end, these iterators simply return None,
so we adjust the size_hint to just return zero in this case.

Certain optimizations can be implemented in and outside libstd if we
know we can trust the size_hint for all inputs to for example
Range<usize>.

This corrects the ExactSizeIterator implementations, which IMO were
unsound and incorrect previously, since they allowed a range like (2..1)
to return a size_hint of -1us in when debug assertions are turned off.

9 years agorollup merge of #22052: octplane/patch-1
Alex Crichton [Tue, 10 Feb 2015 16:41:46 +0000 (08:41 -0800)]
rollup merge of #22052: octplane/patch-1

- add namespace
- add function parens

9 years agorollup merge of #22051: nagisa/main-emission
Alex Crichton [Tue, 10 Feb 2015 16:41:44 +0000 (08:41 -0800)]
rollup merge of #22051: nagisa/main-emission

Fixes #21813

9 years agorollup merge of #22049: caspark/fix-link-to-rustdoc
Alex Crichton [Tue, 10 Feb 2015 16:41:43 +0000 (08:41 -0800)]
rollup merge of #22049: caspark/fix-link-to-rustdoc

No point sending people to a page which just says "this is now part of
the Rust book" (that page being http://doc.rust-lang.org/rustdoc.html).

9 years agorollup merge of #22012: pnkfelix/propagate-container-across-object-cast
Alex Crichton [Tue, 10 Feb 2015 16:41:41 +0000 (08:41 -0800)]
rollup merge of #22012: pnkfelix/propagate-container-across-object-cast

Given `<expr> as Box<Trait>`, infer that `Box<_>` is expected type for `<expr>`.

This is useful for addressing fallout from newly proposed box protocol; see #22006 for examples of such fallout, much of which will be unnecessary with this fix.

9 years agorollup merge of #22007: thiagooak/master
Alex Crichton [Tue, 10 Feb 2015 16:41:38 +0000 (08:41 -0800)]
rollup merge of #22007: thiagooak/master

From #21829 clarify equivalency of tuples

9 years agorollup merge of #21943: hugwijst/extctxt_ufcs
Alex Crichton [Tue, 10 Feb 2015 16:41:36 +0000 (08:41 -0800)]
rollup merge of #21943: hugwijst/extctxt_ufcs

Add `QPath` construction support to `ExtCtxt`. Allows compiler plugins to generate calls with UFCS.

9 years agorollup merge of #21920: vojtechkral/main-thread-name
Alex Crichton [Tue, 10 Feb 2015 16:41:34 +0000 (08:41 -0800)]
rollup merge of #21920: vojtechkral/main-thread-name

Fixes #21911

9 years agorollup merge of #21918: ranma42/replace-be
Alex Crichton [Tue, 10 Feb 2015 16:41:30 +0000 (08:41 -0800)]
rollup merge of #21918: ranma42/replace-be

Conflicts:
src/test/compile-fail/reserved-be.rs
src/test/compile-fail/reserved-become.rs
src/test/parse-fail/reserved-be.rs

9 years agorollup merge of #21862: iKevinY/libstd-ascii-tests
Alex Crichton [Tue, 10 Feb 2015 16:40:58 +0000 (08:40 -0800)]
rollup merge of #21862: iKevinY/libstd-ascii-tests

9 years agorollup merge of #21353: sanxiyn/upvar
Alex Crichton [Tue, 10 Feb 2015 16:39:51 +0000 (08:39 -0800)]
rollup merge of #21353: sanxiyn/upvar

Fix #20558.

9 years agoadd `//~ ERROR` line to test for privacy respecting FRU (RFC 736).
Felix S. Klock II [Tue, 10 Feb 2015 16:32:39 +0000 (17:32 +0100)]
add `//~ ERROR` line to test for privacy respecting FRU (RFC 736).

9 years agoAdd a flag to skip the LLVM version check in configure
Björn Steinbrink [Tue, 10 Feb 2015 15:31:46 +0000 (16:31 +0100)]
Add a flag to skip the LLVM version check in configure

When trying to build against a newer, local LLVM version it might be
preferable to have a flag to disable the LLVM version check instead of
having to modify the configure script.

Fixes #21998

9 years agoparse cfgspecs passed to rustdoc
Andrew Paseltiner [Tue, 10 Feb 2015 04:42:31 +0000 (23:42 -0500)]
parse cfgspecs passed to rustdoc

fixes #22131

9 years agoAdd comment noting that this naive approach is not too naive.
Felix S. Klock II [Tue, 10 Feb 2015 14:45:36 +0000 (15:45 +0100)]
Add comment noting that this naive approach is not too naive.

9 years agoMake FRU respect privacy of all struct fields, mentioned or unmentioned.
Felix S. Klock II [Mon, 26 Jan 2015 13:27:22 +0000 (14:27 +0100)]
Make FRU respect privacy of all struct fields, mentioned or unmentioned.

This is RFC 736.

Fix #21407.

9 years agoMove native thread name setting from thread_info to Thread, fixes #21911
Vojtech Kral [Tue, 10 Feb 2015 14:06:45 +0000 (15:06 +0100)]
Move native thread name setting from thread_info to Thread, fixes #21911

9 years agoAdd error message (i.e. do not ICE) when moving out of unsafe pointers.
Felix S. Klock II [Tue, 10 Feb 2015 14:01:31 +0000 (15:01 +0100)]
Add error message (i.e. do not ICE) when moving out of unsafe pointers.

Fix #20801.

9 years agoMade the `ptr::Unique` type accept unsized types, to allow for use cases
Marvin Löbel [Tue, 10 Feb 2015 13:37:44 +0000 (14:37 +0100)]
Made the `ptr::Unique` type accept unsized types, to allow for use cases
like sending a raw pointer slice across thread boundaries.

9 years agoAuto merge of #22028 - nikomatsakis:issue-22019-caching, r=aturon
bors [Tue, 10 Feb 2015 13:23:29 +0000 (13:23 +0000)]
Auto merge of #22028 - nikomatsakis:issue-22019-caching, r=aturon

Simplify cache selection by just using the local cache whenever there
are any where-clauses at all. This seems to be the simplest possible
rule and will (hopefully!) put an end to these annoying "cache leak"
bugs. Fixes #22019.

r? @aturon

9 years agoAuto merge of #22026 - kmcallister:plugin, r=sfackler
bors [Tue, 10 Feb 2015 11:15:52 +0000 (11:15 +0000)]
Auto merge of #22026 - kmcallister:plugin, r=sfackler

```rust
#[plugin] #[no_link] extern crate bleh;
```

becomes a crate attribute

```rust
#![plugin(bleh)]
```

The feature gate is still required.

It's almost never correct to link a plugin into the resulting library / executable, because it will bring all of libsyntax and librustc with it. However if you really want this behavior, you can get it with a separate `extern crate` item in addition to the `plugin` attribute.

Fixes #21043.
Fixes #20769.

[breaking-change]

9 years agoAuto merge of #21961 - nick29581:hrl-syntax, r=nmatsakis
bors [Tue, 10 Feb 2015 09:10:37 +0000 (09:10 +0000)]
Auto merge of #21961 - nick29581:hrl-syntax, r=nmatsakis

Closes # 20022

r? @nikomatsakis

9 years agoAuto merge of #21937 - alexcrichton:issue-21929, r=aturon
bors [Tue, 10 Feb 2015 06:39:31 +0000 (06:39 +0000)]
Auto merge of #21937 - alexcrichton:issue-21929, r=aturon

These were forgotten reexports from #21718

Closes #21929

9 years agoAuto merge of #21936 - alexcrichton:fsv2, r=aturon
bors [Tue, 10 Feb 2015 04:07:03 +0000 (04:07 +0000)]
Auto merge of #21936 - alexcrichton:fsv2, r=aturon

This commit is an implementation of [RFC 739][rfc] which adds a new `std::fs`
module to the standard library. This module provides much of the same
functionality as `std::old_io::fs` but it has many tweaked APIs as well as uses
the new `std::path` module.

[rfc]: https://github.com/rust-lang/rfcs/pull/739

9 years agoTests
Nick Cameron [Mon, 9 Feb 2015 03:49:27 +0000 (16:49 +1300)]
Tests

9 years agoSet up docs for missing core types
Steve Klabnik [Tue, 10 Feb 2015 02:44:11 +0000 (21:44 -0500)]
Set up docs for missing core types

Fixes #22085

9 years agoRemove bottom from the reference
Steve Klabnik [Tue, 10 Feb 2015 02:57:14 +0000 (21:57 -0500)]
Remove bottom from the reference

Fixes #20172

9 years agoRemove incorrect docs from mem::transmute
Steve Klabnik [Tue, 10 Feb 2015 02:51:30 +0000 (21:51 -0500)]
Remove incorrect docs from mem::transmute

Fixes #22032

9 years agostd: Add a new `fs` module
Alex Crichton [Tue, 3 Feb 2015 05:39:14 +0000 (21:39 -0800)]
std: Add a new `fs` module

This commit is an implementation of [RFC 739][rfc] which adds a new `std::fs`
module to the standard library. This module provides much of the same
functionality as `std::old_io::fs` but it has many tweaked APIs as well as uses
the new `std::path` module.

[rfc]: https://github.com/rust-lang/rfcs/pull/739

9 years agoAdd documentation on trait objects.
Steve Klabnik [Mon, 9 Feb 2015 01:15:16 +0000 (20:15 -0500)]
Add documentation on trait objects.

Largely taken from @huonw's
http://huonw.github.io/blog/2015/01/peeking-inside-trait-objects/

Fixes #21707

9 years agostd: Mark IntoIterator::into_iter as #[stable
Alex Crichton [Tue, 10 Feb 2015 00:24:29 +0000 (16:24 -0800)]
std: Mark IntoIterator::into_iter as #[stable

Right now it is not possible to write a `for` loop without opting-in to the
`core` feature due to the way they're expanding (calling
`::std::iter::IntoIterator::into_iter`). There are some planned tweaks to the
`IntoIterator` trait (adding an `Item` associated type) which will cause
implementations of `IntoIterator` to break, but the *usage* of the trait is
currently stable.

This commit marks the method `into_iter` as stable as the name will not be
changing, nor the fact that it takes no arguments and returns one type (which is
determiend by the `Self` type). This means that usage of `for` loops is now
stable but manual implementations of the `IntoIterator` trait will continue to
be unstable.

9 years agostd: Rename IntoIterator::Iter to IntoIter
Alex Crichton [Fri, 6 Feb 2015 22:47:55 +0000 (14:47 -0800)]
std: Rename IntoIterator::Iter to IntoIter

This is in preparation for stabilization of the `IntoIterator` trait. All
implementations and references to `Iter` need to be renamed to `IntoIter`.

[breaking-change]

9 years agostd: Remove typarms from IteratorExt::cloned
Alex Crichton [Fri, 6 Feb 2015 22:47:09 +0000 (14:47 -0800)]
std: Remove typarms from IteratorExt::cloned

With associated types an where clauses none of the type parameters are
necessary.

[breaking-change]

9 years agoAdd a help message for deprecated #[plugin] extern crate
Keegan McAllister [Mon, 9 Feb 2015 22:25:47 +0000 (14:25 -0800)]
Add a help message for deprecated #[plugin] extern crate

9 years agoremove obsolete closure syntax from the guide
Luke Steensen [Mon, 9 Feb 2015 21:10:33 +0000 (15:10 -0600)]
remove obsolete closure syntax from the guide

9 years agoUse a crate attribute to load plugins
Keegan McAllister [Fri, 6 Feb 2015 21:56:38 +0000 (13:56 -0800)]
Use a crate attribute to load plugins

    #[plugin] #[no_link] extern crate bleh;

becomes a crate attribute

    #![plugin(bleh)]

The feature gate is still required.

It's almost never correct to link a plugin into the resulting library /
executable, because it will bring all of libsyntax and librustc with it.
However if you really want this behavior, you can get it with a separate
`extern crate` item in addition to the `plugin` attribute.

Fixes #21043.
Fixes #20769.

[breaking-change]

9 years agoUpdate deprecation notice.
Pierre Baillet [Sat, 7 Feb 2015 14:11:25 +0000 (15:11 +0100)]
Update deprecation notice.

- add namespace
- add function parens

9 years agoUpdate llvm to rust-llvm-2015-02-09
Björn Steinbrink [Sat, 7 Feb 2015 18:02:21 +0000 (19:02 +0100)]
Update llvm to rust-llvm-2015-02-09

Fixes #21996

9 years agoMake fallback font 'serif', rather than 'sans-serif' fonts
Sean Collins [Mon, 9 Feb 2015 20:07:47 +0000 (15:07 -0500)]
Make fallback font 'serif', rather than 'sans-serif' fonts

9 years agoAuto merge of #21876 - nick29581:driver-args, r=huonw
bors [Mon, 9 Feb 2015 19:01:37 +0000 (19:01 +0000)]
Auto merge of #21876 - nick29581:driver-args, r=huonw

This allows people to write tools which are drop-in replacements for rustc by implementing `CompilerCalls` and three lines of code, rather than having to copy+paste a bunch of args parsing code.

r? @alexcrichton

9 years agoadd test illustrating the feature.
Felix S. Klock II [Fri, 6 Feb 2015 17:05:32 +0000 (18:05 +0100)]
add test illustrating the feature.

(with multiple impls to further exercise correct trait-matching.)

9 years agoGiven `<expr> as Box<Trait>`, infer that `Box<_>` is expected type for `<expr>`.
Felix S. Klock II [Fri, 6 Feb 2015 16:59:56 +0000 (17:59 +0100)]
Given `<expr> as Box<Trait>`, infer that `Box<_>` is expected type for `<expr>`.

9 years agoProcess cfg_attr right before stripping cfg
Keegan McAllister [Mon, 9 Feb 2015 17:29:21 +0000 (09:29 -0800)]
Process cfg_attr right before stripping cfg

Fixes #22070.
Fixes #19372.

9 years agoDeduplicate --crate-type arguments
Simonas Kazlauskas [Mon, 9 Feb 2015 17:30:22 +0000 (19:30 +0200)]
Deduplicate --crate-type arguments

Crate types from multiple sources appear to be deduplicated properly, but not
deduplicated if they come from the command line arguments. At worst, this used
to cause compiler failures when `--crate-type=lib,rlib` (the same as
`--crate-type=rlib,rlib`, at least at the time of this commit) is provided and
generate the output multiple times otherwise.

9 years agosyntax::fold: Allow removing attributes
Keegan McAllister [Mon, 9 Feb 2015 17:01:15 +0000 (09:01 -0800)]
syntax::fold: Allow removing attributes

9 years agoFix links to module-level documentation in `std::cell`
Michael Budde [Mon, 9 Feb 2015 11:56:24 +0000 (12:56 +0100)]
Fix links to module-level documentation in `std::cell`

Replace links to `../index.html` with `index.html` as they are
linking to the `std` module and not `std::cell` as intended.

9 years agoint/uint => isize/usize in liblibc/liballoc/libarena
we [Mon, 9 Feb 2015 07:00:46 +0000 (10:00 +0300)]
int/uint => isize/usize in liblibc/liballoc/libarena

9 years agoReview changes
Nick Cameron [Tue, 3 Feb 2015 00:40:52 +0000 (13:40 +1300)]
Review changes

9 years agoRefactor compilation to make it easier to use for tools
Nick Cameron [Fri, 30 Jan 2015 08:44:27 +0000 (21:44 +1300)]
Refactor compilation to make it easier to use for tools

9 years agoAuto merge of #22059 - Gankro:vec-split, r=alexcrichton
bors [Mon, 9 Feb 2015 01:29:19 +0000 (01:29 +0000)]
Auto merge of #22059 - Gankro:vec-split, r=alexcrichton

9 years agoAuto merge of #21992 - steveklabnik:gh17220, r=alexcrichton
bors [Sun, 8 Feb 2015 23:24:33 +0000 (23:24 +0000)]
Auto merge of #21992 - steveklabnik:gh17220, r=alexcrichton

None of the others work, so let's remove them.

Fixes #17220.

r? @brson

9 years agosyntax: Fix integer underflow in diagnostic
Piotr Czarnecki [Sun, 8 Feb 2015 22:26:12 +0000 (23:26 +0100)]
syntax: Fix integer underflow in diagnostic

Fixes #22091

9 years agoAccept quantification of lifetimes outside the self type in where clauses.
Nick Cameron [Thu, 5 Feb 2015 08:46:01 +0000 (21:46 +1300)]
Accept quantification of lifetimes outside the self type in where clauses.

Closes #20022

9 years agoRename Show to Debug, String to Display
Alexander Korolkov [Thu, 5 Feb 2015 12:04:07 +0000 (15:04 +0300)]
Rename Show to Debug, String to Display

Update reference.md:
 - derive() no longer supports Zero trait
 - derive() now supports Copy trait

9 years agoMove native thread name setting from thread_info to Thread, fixes #21911
Vojtech Kral [Wed, 4 Feb 2015 01:26:00 +0000 (02:26 +0100)]
Move native thread name setting from thread_info to Thread, fixes #21911

9 years agoAuto merge of #22046 - mneumann:dragonfly-libstd-fixes, r=huonw
bors [Sun, 8 Feb 2015 16:47:12 +0000 (16:47 +0000)]
Auto merge of #22046 - mneumann:dragonfly-libstd-fixes, r=huonw

9 years agoAuto merge of #22054 - LeoTestard:include-parse-errors, r=alexcrichton
bors [Sun, 8 Feb 2015 14:41:02 +0000 (14:41 +0000)]
Auto merge of #22054 - LeoTestard:include-parse-errors, r=alexcrichton

Makes the compilation abort when a parse error is encountered while
trying to parse an item in an included file. The previous behaviour was
to stop processing the file when a token that can't start an item was
encountered, without producing any error. Fixes #21146.

9 years agoadapt run-make test suite for openbsd
Sébastien Marie [Sun, 8 Feb 2015 08:36:08 +0000 (09:36 +0100)]
adapt run-make test suite for openbsd

- c-link-to-rust-staticlib: use EXTRACFLAGS defined by tools.mk for
  choose the good libraries to link to.

- no-stack-check: disabled for openbsd (no segmented stacks here)

- symbols-are-reasonable: use portable grep pattern

- target-specs: use POSIX form for options when invoking grep

- use-extern-for-plugins: disable as OpenBSD only support x86_64 for now

9 years agoAdd a test for mainless emit targets
Simonas Kazlauskas [Sun, 8 Feb 2015 08:51:46 +0000 (10:51 +0200)]
Add a test for mainless emit targets

9 years agoAuto merge of #22011 - fhahn:separate-parse-fail-tests, r=nikomatsakis
bors [Sun, 8 Feb 2015 12:35:03 +0000 (12:35 +0000)]
Auto merge of #22011 - fhahn:separate-parse-fail-tests, r=nikomatsakis

This PR moves all `compile-fail` tests that fail at the parsing stage to a `parse-fail` directory, in order to use the tests in the `parse-fail` directory to test if the new LALR parser rejects the same files as the Rust parser. I also adjusted the `testparser.py` script to handle the tests in `parse-fail` differently.

However during working on this, I discovered, that Rust's parser sometimes fails during parsing, but does not return a nonzero return code, e.g. compiling `/test/compile-fail/doc-before-semi.rs` with `-Z parse-only` prints an error message, but returns status code 0. Compiling the same file without `-Z parse-only`, the same error message is displayed, but error code 101 returned. I'll look into that over the next week.

9 years agoAuto merge of #21970 - michaelwoerister:lang-item-call-debug-locs, r=brson
bors [Sun, 8 Feb 2015 10:27:58 +0000 (10:27 +0000)]
Auto merge of #21970 - michaelwoerister:lang-item-call-debug-locs, r=brson

Resolves some issues caused by the recent LLVM update (which itself solved some issues).

Closes #19848
Closes #20798

9 years agoAuto merge of #21565 - kmcallister:poison, r=alexcrichton
bors [Sun, 8 Feb 2015 08:21:44 +0000 (08:21 +0000)]
Auto merge of #21565 - kmcallister:poison, r=alexcrichton

I needed these to implement efficient poisoning in [seqloq](https://github.com/kmcallister/seqloq/tree/poison).

9 years agoAuto merge of #21999 - tomjakubowski:rustdoc-fixes, r=alexcrichton
bors [Sun, 8 Feb 2015 06:15:52 +0000 (06:15 +0000)]
Auto merge of #21999 - tomjakubowski:rustdoc-fixes, r=alexcrichton

r? @alexcrichton

9 years agoAuto merge of #22044 - caspark:fix-rc-doc-links, r=nikomatsakis
bors [Sun, 8 Feb 2015 02:30:09 +0000 (02:30 +0000)]
Auto merge of #22044 - caspark:fix-rc-doc-links, r=nikomatsakis

Current link structure is /std/rc/struct.Rc.html so ../index.html ends
up linking to /std/ rather than /std/rc/

9 years agoAuto merge of #21988 - kmcallister:no-std, r=sfackler
bors [Sun, 8 Feb 2015 00:24:03 +0000 (00:24 +0000)]
Auto merge of #21988 - kmcallister:no-std, r=sfackler

Fixes #21833.

[breaking-change]

r? @alexcrichton

The tests in #21912 will also need `#[feature(no_std)]`. If you're okay with both PRs, I can merge and test them.

9 years agoreference.md: Byte string literals start with a 'b'
Geoffrey Thomas [Sun, 8 Feb 2015 00:06:49 +0000 (19:06 -0500)]
reference.md: Byte string literals start with a 'b'

This was correct in the EBNF, but not in the prose (which seems to have
been copied-and-pasted from regular string literals).

9 years agoFix std::ops::Range size_hint and ExactSizeIterator impls
Ulrik Sverdrup [Sat, 7 Feb 2015 23:17:04 +0000 (00:17 +0100)]
Fix std::ops::Range size_hint and ExactSizeIterator impls

When self.start > self.end, these iterators simply return None,
so we adjust the size_hint to just return zero in this case.

Certain optimizations can be implemented in and outside libstd if we
know we can trust the size_hint for all inputs to for example
Range<usize>.

This corrects the ExactSizeIterator implementations, which IMO were
unsound and incorrect previously, since they allowed a range like (2..1)
to return a size_hint of -1us in when debug assertions are turned off.

9 years agoadd missing features to libcollections tests
Alexis [Sat, 7 Feb 2015 22:09:07 +0000 (17:09 -0500)]
add missing features to libcollections tests

9 years agoAuto merge of #21874 - nagisa:reference-is-removal, r=steveklabnik
bors [Sat, 7 Feb 2015 21:48:33 +0000 (21:48 +0000)]
Auto merge of #21874 - nagisa:reference-is-removal, r=steveklabnik

r? @steveklabnik

9 years agominor fixes to Vec docs and bounds check
Alexis [Sat, 7 Feb 2015 19:58:58 +0000 (14:58 -0500)]
minor fixes to Vec docs and bounds check

9 years agoFix new test
Keegan McAllister [Sat, 7 Feb 2015 18:51:25 +0000 (10:51 -0800)]
Fix new test

9 years agoMake std::fmt a simple re-export from collections
Keegan McAllister [Fri, 6 Feb 2015 05:08:02 +0000 (21:08 -0800)]
Make std::fmt a simple re-export from collections

9 years agoFake up #![no_std] on pretty-printing; keep it out of AST
Keegan McAllister [Fri, 6 Feb 2015 01:04:11 +0000 (17:04 -0800)]
Fake up #![no_std] on pretty-printing; keep it out of AST