Commit Graph

38237 Commits

Author SHA1 Message Date
Alex Crichton
08cbb4a5af 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
2015-02-10 08:43:20 -08:00
Alex Crichton
df55acf1d0 rollup merge of #22143: pnkfelix/fix-issue-20801
Add error message (i.e. do not ICE) when moving out of unsafe pointers.

Fix #20801.
2015-02-10 08:43:18 -08:00
Alex Crichton
ba7b79008b rollup merge of #22142: Kimundi/unsized_unique
This is to allow for use cases like sending a raw pointer slice across thread boundaries.
2015-02-10 08:43:16 -08:00
Alex Crichton
8b44cf2a40 rollup merge of #22135: apasel422/issue-22131
fixes #22131
2015-02-10 08:43:14 -08:00
Alex Crichton
3161cb096f rollup merge of #22130: steveklabnik/gh20172
Fixes #20172
2015-02-10 08:43:12 -08:00
Alex Crichton
e630ed6983 rollup merge of #22129: steveklabnik/gh22032
Fixes #22032
2015-02-10 08:43:09 -08:00
Alex Crichton
b0b373dce2 rollup merge of #22128: steveklabnik/gh22085
Fixes #22085

/cc @tomjakubowski
2015-02-10 08:43:07 -08:00
Alex Crichton
d3dd389224 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).
2015-02-10 08:43:04 -08:00
Alex Crichton
637a89bdf6 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.
2015-02-10 08:43:03 -08:00
Alex Crichton
bbc8a54c63 rollup merge of #22116: kmcallister/cfg_attr
Fixes #22070.
Fixes #19372.

r? @sfackler
2015-02-10 08:43:01 -08:00
Alex Crichton
c33acf658a 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
2015-02-10 08:42:57 -08:00
Alex Crichton
b6e5f1bfe8 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).
2015-02-10 08:42:55 -08:00
Alex Crichton
6ecb011a58 rollup merge of #22109: petrochenkov/intuint1 2015-02-10 08:42:53 -08:00
Alex Crichton
011b77b69c 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
2015-02-10 08:42:51 -08:00
Alex Crichton
6d55d3ac45 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.
2015-02-10 08:42:49 -08:00
Alex Crichton
5ad52ca6b3 rollup merge of #22097: cllns/fix-fallback-fonts
The fallback font for a serif font should also be serif, not sans serif.
2015-02-10 08:42:47 -08:00
Alex Crichton
7e378edb39 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
2015-02-10 08:42:45 -08:00
Alex Crichton
0568422a27 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
2015-02-10 08:41:54 -08:00
Alex Crichton
577c51cdc0 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).
2015-02-10 08:41:52 -08:00
Alex Crichton
cef623e5a6 rollup merge of #22067: Gankro/collections-tests
So many warnings
2015-02-10 08:41:50 -08:00
Alex Crichton
24c92134ea 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.
2015-02-10 08:41:48 -08:00
Alex Crichton
6e6bea6e07 rollup merge of #22052: octplane/patch-1
- add namespace
- add function parens
2015-02-10 08:41:46 -08:00
Alex Crichton
712874ef11 rollup merge of #22051: nagisa/main-emission
Fixes #21813
2015-02-10 08:41:44 -08:00
Alex Crichton
91fc9f3f0e 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).
2015-02-10 08:41:43 -08:00
Alex Crichton
c177da6675 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.
2015-02-10 08:41:41 -08:00
Alex Crichton
7fcc330ea3 rollup merge of #22007: thiagooak/master
From #21829 clarify equivalency of tuples
2015-02-10 08:41:38 -08:00
Alex Crichton
c62906d19c rollup merge of #21943: hugwijst/extctxt_ufcs
Add `QPath` construction support to `ExtCtxt`. Allows compiler plugins to generate calls with UFCS.
2015-02-10 08:41:36 -08:00
Alex Crichton
c41655b076 rollup merge of #21920: vojtechkral/main-thread-name
Fixes #21911
2015-02-10 08:41:34 -08:00
Alex Crichton
6cf75ca05a 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
2015-02-10 08:41:30 -08:00
Alex Crichton
dff8182ed2 rollup merge of #21862: iKevinY/libstd-ascii-tests 2015-02-10 08:40:58 -08:00
Alex Crichton
8ee86860bc rollup merge of #21353: sanxiyn/upvar
Fix #20558.
2015-02-10 08:39:51 -08:00
Björn Steinbrink
6e8b8733c9 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
2015-02-10 16:31:46 +01:00
Andrew Paseltiner
ad3be9f23f parse cfgspecs passed to rustdoc
fixes #22131
2015-02-10 10:31:14 -05:00
Vojtech Kral
7d2404cb42 Move native thread name setting from thread_info to Thread, fixes #21911 2015-02-10 15:06:45 +01:00
Felix S. Klock II
3513c97302 Add error message (i.e. do not ICE) when moving out of unsafe pointers.
Fix #20801.
2015-02-10 15:01:31 +01:00
Marvin Löbel
792dc8d067 Made the ptr::Unique type accept unsized types, to allow for use cases
like sending a raw pointer slice across thread boundaries.
2015-02-10 14:37:44 +01:00
bors
88d8ba5ab3 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
2015-02-10 13:23:29 +00:00
bors
94c06a1be0 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]
2015-02-10 11:15:52 +00:00
bors
de8bc44753 Auto merge of #21961 - nick29581:hrl-syntax, r=nmatsakis
Closes # 20022

r? @nikomatsakis
2015-02-10 09:10:37 +00:00
bors
29ff00cc97 Auto merge of #21937 - alexcrichton:issue-21929, r=aturon
These were forgotten reexports from #21718

Closes #21929
2015-02-10 06:39:31 +00:00
bors
0bfe358e0f 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
2015-02-10 04:07:03 +00:00
Nick Cameron
f9c577e514 Tests 2015-02-10 16:54:23 +13:00
Steve Klabnik
17abb43248 Set up docs for missing core types
Fixes #22085
2015-02-09 22:26:33 -05:00
Steve Klabnik
b42c559e9f Remove bottom from the reference
Fixes #20172
2015-02-09 21:57:14 -05:00
Steve Klabnik
e40d05800b Remove incorrect docs from mem::transmute
Fixes #22032
2015-02-09 21:51:30 -05:00
Alex Crichton
6bfbad937b 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
2015-02-09 18:43:12 -08:00
Steve Klabnik
dbccd70a57 Add documentation on trait objects.
Largely taken from @huonw's
http://huonw.github.io/blog/2015/01/peeking-inside-trait-objects/

Fixes #21707
2015-02-09 21:38:49 -05:00
Alex Crichton
0ee95b917b 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.
2015-02-09 16:26:52 -08:00
Alex Crichton
605225a366 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]
2015-02-09 15:58:13 -08:00
Alex Crichton
64a4decec7 std: Remove typarms from IteratorExt::cloned
With associated types an where clauses none of the type parameters are
necessary.

[breaking-change]
2015-02-09 15:58:13 -08:00