Commit Graph

46637 Commits

Author SHA1 Message Date
Sean Bowe
4fec679399 Cleaner abstraction for type_substs 2015-09-14 02:33:29 -06:00
Ariel Ben-Yehuda
caa10c3bde move middle::ty and related modules to middle/ty/ 2015-09-14 10:56:13 +03:00
bors
4d6dc7f9ba Auto merge of #28396 - arielb1:misplaced-binding, r=eddyb
Technically a [breaking-change], but the broken code is useless,
like `i32<Param=()>`.

Fixes #24682

r? @eddyb
2015-09-14 06:51:18 +00:00
bors
009f2cf7dd Auto merge of #28392 - arielb1:sort-bounds-list, r=eddyb
The sort key is a (DefId, Name), which is *not* stable between
runs, so we must re-sort when loading.

Fixes #24063
Fixes #25467
Fixes #27222
Fixes #28377

r? @eddyb
2015-09-14 05:08:27 +00:00
Sean Bowe
3d0774f598 Added test for partially supplied type params in which remaining reference non-existant self 2015-09-13 21:43:37 -06:00
bors
341a91902a Auto merge of #28383 - semarie:openbsd-jemalloc, r=alexcrichton
ignore severals tests under openbsd as we have disabling jemalloc under
this target.

r? @alexcrichton
2015-09-14 03:25:25 +00:00
Sean Bowe
af3a0b0805 Refactor ty_infer invocation 2015-09-13 21:22:30 -06:00
Peter Reid
a593a211fe Add test for overflowing pow
This would catch regressions of issue #28012.
2015-09-13 22:19:36 -04:00
bors
523acd9804 Auto merge of #28368 - lfairy:write-impl, r=alexcrichton
There is already a corresponding impl for `std::io::Write`. This change
will make the two traits more consistent.
2015-09-14 01:43:10 +00:00
bors
6873b9fee4 Auto merge of #28357 - semmaz:libfmt-macros, r=alexcrichton
This changes libfmt_macros `CharIndices` iterator into `Peekable` so it can be used without `.clone()`.

Also changed some `loop match` and `match` to `while let` and `if let` respectively (mostly for readability).
2015-09-13 23:09:27 +00:00
Björn Steinbrink
e4e67bd489 Add an attribute to mark function as unwinding 2015-09-13 23:42:40 +02:00
Björn Steinbrink
90c48bed25 Centralise the handling of attributes on extern functions 2015-09-13 23:42:40 +02:00
bors
483600e65f Auto merge of #28178 - christopherdumas:fix_ice, r=nikomatsakis
This fixes the ICE, and makes it just a compiler error/warning. I'm not exactly sure that's whats wanted, so tell me if it isn't.
2015-09-13 21:27:07 +00:00
Ariel Ben-Yehuda
5d4455510a ensure projections are prohibited when type parameters are
Technically a [breaking-change], but the broken code is useless,
like `i32<Param=()>`.

Fixes #24682
2015-09-13 23:47:41 +03:00
Sean Bowe
522d4b0a35 Fixed regression in associated item resolution with default type parameters that reference Self in traits. 2015-09-13 14:14:04 -06:00
bors
cedbd998a4 Auto merge of #28339 - alexcrichton:stabilize-1.4, r=aturon
The FCP is coming to a close and 1.4 is coming out soon, so this brings in the
libs team decision for all library features this cycle.

Stabilized APIs:

* `<Box<str>>::into_string`
* `Arc::downgrade`
* `Arc::get_mut`
* `Arc::make_mut`
* `Arc::try_unwrap`
* `Box::from_raw`
* `Box::into_raw`
* `CStr::to_str`
* `CStr::to_string_lossy`
* `CString::from_raw`
* `CString::into_raw`
* `IntoRawFd::into_raw_fd`
* `IntoRawFd`
* `IntoRawHandle::into_raw_handle`
* `IntoRawHandle`
* `IntoRawSocket::into_raw_socket`
* `IntoRawSocket`
* `Rc::downgrade`
* `Rc::get_mut`
* `Rc::make_mut`
* `Rc::try_unwrap`
* `Result::expect`
* `String::into_boxed_slice`
* `TcpSocket::read_timeout`
* `TcpSocket::set_read_timeout`
* `TcpSocket::set_write_timeout`
* `TcpSocket::write_timeout`
* `UdpSocket::read_timeout`
* `UdpSocket::set_read_timeout`
* `UdpSocket::set_write_timeout`
* `UdpSocket::write_timeout`
* `Vec::append`
* `Vec::split_off`
* `VecDeque::append`
* `VecDeque::retain`
* `VecDeque::split_off`
* `rc::Weak::upgrade`
* `rc::Weak`
* `slice::Iter::as_slice`
* `slice::IterMut::into_slice`
* `str::CharIndices::as_str`
* `str::Chars::as_str`
* `str::split_at_mut`
* `str::split_at`
* `sync::Weak::upgrade`
* `sync::Weak`
* `thread::park_timeout`
* `thread::sleep`

Deprecated APIs

* `BTreeMap::with_b`
* `BTreeSet::with_b`
* `Option::as_mut_slice`
* `Option::as_slice`
* `Result::as_mut_slice`
* `Result::as_slice`
* `f32::from_str_radix`
* `f64::from_str_radix`

Closes #27277
Closes #27718
Closes #27736
Closes #27764
Closes #27765
Closes #27766
Closes #27767
Closes #27768
Closes #27769
Closes #27771
Closes #27773
Closes #27775
Closes #27776
Closes #27785
Closes #27792
Closes #27795
Closes #27797
2015-09-13 19:45:15 +00:00
Ariel Ben-Yehuda
38f76dbc38 don't duplicate the code snippet in the "trait unimplemented" error
new error style:
```
path.rs:4:6: 4:7 error: the trait `core::marker::Sized` is not implemented for the type `[u8]` [E0277]
path.rs:4 fn f(p: Path) {}
               ^
path.rs:4:6: 4:7 help: run `rustc --explain E0277` to see a detailed explanation
path.rs:4:6: 4:7 note: `[u8]` does not have a constant size known at compile-time
path.rs:4:6: 4:7 note: required because it appears within the type `std::sys::os_str::Slice`
path.rs:4:6: 4:7 note: required because it appears within the type `std::ffi::os_str::OsStr`
path.rs:4:6: 4:7 note: required because it appears within the type `std::path::Path`
path.rs:4:6: 4:7 note: all local variables must have a statically known size
path.rs:7:5: 7:36 error: the trait `core::marker::Send` is not implemented for the type `alloc::rc::Rc<()>` [E0277]
path.rs:7     foo::<BTreeMap<Rc<()>, Rc<()>>>();
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
path.rs:7:5: 7:36 help: run `rustc --explain E0277` to see a detailed explanation
path.rs:7:5: 7:36 note: `alloc::rc::Rc<()>` cannot be sent between threads safely
path.rs:7:5: 7:36 note: required because it appears within the type `collections::btree::node::Node<alloc::rc::Rc<()>, alloc::rc::Rc<()>>`
path.rs:7:5: 7:36 note: required because it appears within the type `collections::btree::map::BTreeMap<alloc::rc::Rc<()>, alloc::rc::Rc<()>>`
path.rs:7:5: 7:36 note: required by `foo`
error: aborting due to 2 previous errors
```

This improves the #21793/#23286 situation
2015-09-13 22:42:21 +03:00
Ariel Ben-Yehuda
8478acf695 sort the existential bounds list in tydecode
The sort key is a (DefId, Name), which is *not* stable between
runs, so we must re-sort when loading.

Fixes #24063
Fixes #25467
Fixes #27222
Fixes #28377
2015-09-13 20:59:40 +03:00
bors
c494cf1d01 Auto merge of #28390 - christopherdumas:beginners_manuel, r=steveklabnik 2015-09-13 16:57:09 +00:00
christopherdumas
00cbe1db95 Added link to @bors cheetsheet (thanks, @nagisa) 2015-09-13 08:21:10 -07:00
Vadim Petrochenkov
bc7c4304ab Implement more traits for function pointers 2015-09-13 18:11:10 +03:00
Aidan Hobson Sayers
1a6bdba05e Update musl build in light of llvm 3.7 release 2015-09-13 14:57:54 +01:00
bors
9040b06ed2 Auto merge of #28286 - matklad:remove-dead-code, r=eddyb
There is a dead code in libsyntax/parser/parse.rs, when parsing structs.

Two functions are involved:

* [parse_item_struct](cd9c9f048f/src/libsyntax/parse/parser.rs (L4691))
* [parse_tuple_struct_body](cd9c9f048f/src/libsyntax/parse/parser.rs (L4769))

The problem is that both functions handle the case with unit structs. But because
`parse_tuple_struct_body` is called from `parse_item_struct`, it never faces
this case.

This PR removes unit struct case from `parse_tuple_struct_body` function. I tested with `make -j8 check-statge1`.
2015-09-13 13:09:22 +00:00
bors
fd230ff124 Auto merge of #28370 - ranma42:slow_pat_gen, r=alexcrichton
Commit 9104a902c0 fixed the generated
files, but that change would be lost (or require additional manual
intervention) if they are re-generated of if new architectures are
added.

cc #28273
2015-09-13 00:01:28 +00:00
Chris Wong
2305dc093a Add a blanket impl for &mut std::fmt::Write
There is already a corresponding impl for `std::io::Write`. This change
will make the two traits more consistent.
2015-09-13 11:42:42 +12:00
Guillaume Gomez
7358a5e8ea Add part of new error codes in librustc 2015-09-13 00:38:36 +02:00
christopherdumas
4611308751 Rwind LLVM 2015-09-12 15:26:50 -07:00
bors
f710aae2ef Auto merge of #28366 - christopherdumas:beginners_manuel, r=steveklabnik
This is something that I wish I had when I started contributing to Rust (not that long ago :). I plan on writing a manual for bors and the rust testing setup too, if there isn't one already.
2015-09-12 22:15:41 +00:00
bors
50a6c798d1 Auto merge of #28375 - tbu-:pr_sip_write, r=alexcrichton 2015-09-12 19:23:05 +00:00
bors
4d20369998 Auto merge of #28371 - killercup:docs/trpl-markup-fixes, r=steveklabnik
- Headlines begin at 1st level now like the rest of the book
- All Headlines a blank line above and below
- Fix links in this chapter's TOC

r? @steveklabnik
2015-09-12 16:31:10 +00:00
Sébastien Marie
18ee9d71d5 disable jemalloc tests for openbsd
ignore severals tests under openbsd as we have disabling jemalloc under
this target.
2015-09-12 17:33:18 +02:00
Andrea Canciani
9aa1289a67 Add a comment to explain the #[inline(never)] annotation
and regenerate the platform intrinsics source files.
2015-09-12 17:05:29 +02:00
christopherdumas
d09ba5d3ce Compiler test manual 2015-09-12 08:02:01 -07:00
Tobias Bucher
d0426fd316 Stop a private method on SipHasher from shadowing Hasher::write 2015-09-12 15:25:39 +01:00
bors
b858f218da Auto merge of #28372 - killercup:docs/nomicon-markup-fixes, r=steveklabnik
The style `[name][]` does not work with Pandoc, whereas `[name]` does. I hope hoedown accepts this as well.

r? @steveklabnik
2015-09-12 13:44:44 +00:00
Pascal Hertleif
4828c88af6 Nomicon: Fix Links
The style `[name][]` does not work with Pandoc, whereas `[name]` does.
I hope hoedown accepts this as well.
2015-09-12 12:13:24 +02:00
Pascal Hertleif
39f97cfcf8 TRPL: Fix Headlines, Links in "Error Handling"
- Headlines begin at 1st level now like the rest of the book
- All Headlines a blank line above and below
- Fix links in this chapter's TOC
2015-09-12 12:09:59 +02:00
Andrea Canciani
9ef62a4490 Fix generator.py to avoid pathological inlining
Commit 9104a902c0 fixed the generated
files, but that change would be lost (or require additional manual
intervention) if they are re-generated of if new architectures are
added.

cc #28273
2015-09-12 09:28:53 +02:00
bors
d89a10b0a6 Auto merge of #28340 - brson:configure, r=alexcrichton
Redirect stdout on the python bogosity detector. This is printing
pwd to the terminal currently.

Reformat the bogus python/cmake messages so they format correctly.
echo does not always escape newlines (it doesn't here), and multiline
strings don't whitespace munch.

r? @alexcrichton
2015-09-12 02:57:01 +00:00
christopherdumas
3f86602e00 Added useful links section 2015-09-11 18:24:11 -07:00
bors
33f0920d0e Auto merge of #28350 - dotdash:llvm_fix, r=eddyb 2015-09-11 23:03:47 +00:00
Brian Anderson
2662a72537 configure cleanup on windows
Redirect stdout on the python bogosity detector. This is printing
pwd to the terminal currently.

Reformat the bogus python/cmake messages so they format correctly.
echo does not always escape newlines (it doesn't here), and multiline
strings don't whitespace munch.
2015-09-11 14:33:29 -07:00
Brian Anderson
ec3ec1073b Add release dates for all releases 2015-09-11 13:29:53 -07:00
bors
c8ded9a14f Auto merge of #28306 - alexcrichton:less-rt, r=brson
This commit does some refactoring to make almost all of the `std::rt` private.
Specifically, the following items are no longer part of its API:

* DEFAULT_ERROR_CODE
* backtrace
* unwind
* args
* at_exit
* cleanup
* heap (this is just alloc::heap)
* min_stack
* util

The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is
an entry point for the `panic!` macro via the `begin_unwind` and
`begin_unwind_fmt` reexports.
2015-09-11 19:42:19 +00:00
christopherdumas
175a6421b2 Fixed test 2015-09-11 11:53:45 -07:00
Alex Crichton
f4be2026df std: Internalize almost all of std::rt
This commit does some refactoring to make almost all of the `std::rt` private.
Specifically, the following items are no longer part of its API:

* DEFAULT_ERROR_CODE
* backtrace
* unwind
* args
* at_exit
* cleanup
* heap (this is just alloc::heap)
* min_stack
* util

The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is
an entry point for the `panic!` macro via the `begin_unwind` and
`begin_unwind_fmt` reexports.
2015-09-11 11:19:20 -07:00
bors
eda85fede0 Auto merge of #28348 - petrochenkov:novirt, r=alexcrichton
Noticed these yesterday while reading libsyntax
2015-09-11 17:58:59 +00:00
Alex Crichton
f0b1326dc7 std: Stabilize/deprecate features for 1.4
The FCP is coming to a close and 1.4 is coming out soon, so this brings in the
libs team decision for all library features this cycle.

Stabilized APIs:

* `<Box<str>>::into_string`
* `Arc::downgrade`
* `Arc::get_mut`
* `Arc::make_mut`
* `Arc::try_unwrap`
* `Box::from_raw`
* `Box::into_raw`
* `CStr::to_str`
* `CStr::to_string_lossy`
* `CString::from_raw`
* `CString::into_raw`
* `IntoRawFd::into_raw_fd`
* `IntoRawFd`
* `IntoRawHandle::into_raw_handle`
* `IntoRawHandle`
* `IntoRawSocket::into_raw_socket`
* `IntoRawSocket`
* `Rc::downgrade`
* `Rc::get_mut`
* `Rc::make_mut`
* `Rc::try_unwrap`
* `Result::expect`
* `String::into_boxed_slice`
* `TcpSocket::read_timeout`
* `TcpSocket::set_read_timeout`
* `TcpSocket::set_write_timeout`
* `TcpSocket::write_timeout`
* `UdpSocket::read_timeout`
* `UdpSocket::set_read_timeout`
* `UdpSocket::set_write_timeout`
* `UdpSocket::write_timeout`
* `Vec::append`
* `Vec::split_off`
* `VecDeque::append`
* `VecDeque::retain`
* `VecDeque::split_off`
* `rc::Weak::upgrade`
* `rc::Weak`
* `slice::Iter::as_slice`
* `slice::IterMut::into_slice`
* `str::CharIndices::as_str`
* `str::Chars::as_str`
* `str::split_at_mut`
* `str::split_at`
* `sync::Weak::upgrade`
* `sync::Weak`
* `thread::park_timeout`
* `thread::sleep`

Deprecated APIs

* `BTreeMap::with_b`
* `BTreeSet::with_b`
* `Option::as_mut_slice`
* `Option::as_slice`
* `Result::as_mut_slice`
* `Result::as_slice`
* `f32::from_str_radix`
* `f64::from_str_radix`

Closes #27277
Closes #27718
Closes #27736
Closes #27764
Closes #27765
Closes #27766
Closes #27767
Closes #27768
Closes #27769
Closes #27771
Closes #27773
Closes #27775
Closes #27776
Closes #27785
Closes #27792
Closes #27795
Closes #27797
2015-09-11 09:48:48 -07:00
Simon Mazur
15d5c0878d some code improvements in libfmt_macros 2015-09-11 19:44:06 +03:00
Simon Mazur
69092ffdf2 Changed libfmt_macros Parse iterator to Peekable 2015-09-11 19:44:05 +03:00