Commit Graph

62615 Commits

Author SHA1 Message Date
Nick Cameron
2a3663f606 Handle feature=rustbuild
Taken from https://github.com/rust-lang/rust/pull/40347/files

And update rls-span to a version with the rustbuild boilerplate
2017-03-15 21:21:20 +13:00
Nick Cameron
979a9881ea Move the API json dumper to use rls-data too 2017-03-15 21:21:20 +13:00
Nick Cameron
bf07f1c6bb Add rls-span to do some conversions into rls-data.
And fix some warnings and borrow errors
2017-03-15 21:21:20 +13:00
Nick Cameron
83f84ff1bc Use out-of-tree rustc serialize
And remove a few data structures in favour of rls-data ones
2017-03-15 21:21:20 +13:00
Nick Cameron
a77e52875b Change json dumper (and a few other bits and pieces) to use rls-data rather than its own data structures 2017-03-15 21:21:20 +13:00
Nick Cameron
fee1f64434 save-analysis: depend on the rls-data crate 2017-03-15 21:21:19 +13:00
bors
11a33760ec Auto merge of #40212 - SimonSapin:utf8error-resume-from, r=aturon
Add Utf8Error::error_len, to help incremental and/or lossy decoding.

Without this, code outside of the standard library needs to reimplement most of the logic `from_utf8` to interpret the bytes after `valid_up_to()`.
2017-03-15 07:04:20 +00:00
Tim Neumann
cc23d17ce9 make shift builtins panic-free with new unchecked_sh* intrinsics
Also update some 128 bit builtins to be panic-free without relying
on the const evaluator.
2017-03-15 06:59:09 +01:00
bors
71d7b29475 Auto merge of #40009 - clarcharr:box_to_buf, r=alexcrichton
Leftovers from #39594; From<Box> impls

These are a few more impls that follow the same reasoning as those from #39594.

What's included:
* `From<Box<str>> for String`
* `From<Box<[T]>> for Vec<T>`
* `From<Box<CStr>> for CString`
* `From<Box<OsStr>> for OsString`
* `From<Box<Path>> for PathBuf`
* `Into<Box<str>> for String`
* `Into<Box<[T]>> for Vec<T>`
* `Into<Box<CStr>> for CString`
* `Into<Box<OsStr>> for OsString`
* `Into<Box<Path>> for PathBuf`
* `<Box<CStr>>::into_c_string`
* `<Box<OsStr>>::into_os_string`
* `<Box<Path>>::into_path_buf`
* Tracking issue for latter three methods + three from previous PR.

Currently, the opposite direction isn't doable with `From` (only `Into`) because of the separation between `liballoc` and `libcollections`. I'm holding off on those for a later PR.
2017-03-15 04:24:10 +00:00
Eric Findlay
18a8494485 Ammended minor documentation detail abour Unicode cases. 2017-03-15 10:05:55 +09:00
Brian Anderson
3554ff32db Make docs required again 2017-03-14 19:31:20 +00:00
Esteban Küber
e3b8550a60 Point out correct turbofish usage on Foo<Bar<Baz>>
Whenever we parse a chain of binary operations, as long as the first
operation is `<` and the subsequent operations are either `>` or `<`,
present the following diagnostic help:

    use `::<...>` instead of `<...>` if you meant to specify type arguments

This will lead to spurious recommendations on situations like
`2 < 3 < 4` but should be clear from context that the help doesn't apply
in that case.
2017-03-14 12:09:21 -07:00
steveklabnik
8b7c7f3fa5 Link core::slice to std::slice 2017-03-14 13:42:12 -04:00
Peter Wagenet
61d93877b7 Target builds for older macOS 2017-03-14 10:08:29 -07:00
Steve Klabnik
cc08edc854 Remove incorrect feature from the 1.16 relnotes 2017-03-14 11:16:34 -04:00
Tobias Schottdorf
f06b04949f Improve the documentation for rvalue_static_promotion 2017-03-14 11:06:50 -04:00
Tobias Schottdorf
20c0f323fc Use && instead of &
It does not seem valuable to always evaluate the right-hand side here.
2017-03-14 11:06:50 -04:00
Tobias Schottdorf
b43c744318 Add feature toggle for rvalue-static-promotion RFC
See https://github.com/rust-lang/rfcs/pull/1414.

Updates #38865.
2017-03-14 11:06:50 -04:00
Corey Farwell
6adbbfc6ba Add doc example for OsString::into_boxed_os_str. 2017-03-14 09:30:18 -04:00
Corey Farwell
bda57dbc05 Add doc example for OsString::shrink_to_fit. 2017-03-14 09:30:00 -04:00
Corey Farwell
5537955b17 Add doc example for OsString::reserve_exact. 2017-03-14 09:29:38 -04:00
Corey Farwell
4d57d92f07 Add doc example for OsString::reserve. 2017-03-14 09:29:09 -04:00
Corey Farwell
9a7b789c37 Add doc example for OsStr::to_os_string. 2017-03-14 09:28:30 -04:00
Stjepan Glavina
8af30132f1 Inline functions Ordering::{then, then_with}
@jongiddy noticed bad performance due to the lack of inlining on `then`
and `then_with`. I confirmed that inlining really is the culprit by
creating a custom `then` function and repeating his benchmark on my
machine with and without the `#[inline]` attribute.

The numbers were exactly the same on my machine without the attribute.
With `#[inline]` I got the same performance as I did with manually
inlined implementation.
2017-03-14 14:01:01 +01:00
NODA, Kai
0671cc10f0 .gitmodules: use official URLs w/o redirect 2017-03-14 20:52:01 +08:00
bors
6f10e2f63d Auto merge of #39921 - cramertj:add-catch-to-ast, r=nikomatsakis
Add catch {} to AST

Part of #39849. Builds on #39864.
2017-03-14 10:40:09 +00:00
Simon Sapin
73370c543e Add tracking issue number for Utf8Error::error_len 2017-03-14 10:03:08 +01:00
Simon Sapin
b5f16a10e9 Replace Utf8Error::resume_from with Utf8Error::error_len
Their relationship is:

* `resume_from = error_len.map(|l| l + valid_up_to)`
* error_len is always one of None, Some(1), Some(2), or Some(3).

When I started using resume_from I almost always ended up subtracting
valid_up_to to obtain error_len.
Therefore the latter is what should be provided in the first place.
2017-03-14 10:02:55 +01:00
Simon Sapin
182044248c Add Utf8Error::resume_from, to help incremental and/or lossy decoding.
Without this, code outside of the standard library needs to reimplement
most of the logic `from_utf8` to interpret the bytes after `valid_up_to()`.
2017-03-14 10:02:45 +01:00
bors
fa53235cc4 Auto merge of #40488 - alexcrichton:appveyor-debug, r=brson
appveyor: Turn down sccache logging

Let's not have it be quite so verbose
2017-03-14 07:18:39 +00:00
Alex Crichton
5fab9bf4f6 travis: Ensure cargo links libcurl statically
We don't want a dynamic dependency in the library that we ship, so link it
statically by configuring curl-sys's build script to not pick up the system
version via pkg-config.
2017-03-13 22:13:37 -07:00
Corey Farwell
5cc056a744 A few improvements to the core::hash top-level docs.
Primarily opened to address the concerns brought up in
https://github.com/rust-lang/rust/issues/40498.

* run rustfmt on code blocks
* use `DefaultHasher` instead of deprecated `SipHasher`
* rename `hash` to `calculate_hash` to prevent confusion with the `hash`
  method
2017-03-14 00:42:44 -04:00
Jeffrey Seyfried
85e02bdbfc Add tests. 2017-03-14 04:39:23 +00:00
Jeffrey Seyfried
839c2860cc Liberalize attributes. 2017-03-14 04:39:21 +00:00
Jeffrey Seyfried
68c1cc68b4 Refactor Attribute to use Path and TokenStream instead of MetaItem. 2017-03-14 04:03:43 +00:00
Jeffrey Seyfried
460bf55f8a Cleanup. 2017-03-14 03:35:16 +00:00
Joshua Horwitz
6a2ef9a25f clean up visuals on error index #40425 2017-03-13 23:12:54 -04:00
Esteban Küber
9ac628d5e8 Add label to primary span for mutable access of immutable struct error 2017-03-13 19:22:48 -07:00
Corey Farwell
e7b0f2badf Remove function invokation parens from documentation links.
This was never established as a convention we should follow in the 'More
API Documentation Conventions' RFC:

https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
2017-03-13 21:43:18 -04:00
Sean Gillespie
1545f4e2a3 std: remove a workaround for privacy limitations that isn't necessary anymore 2017-03-13 18:42:23 -07:00
Corey Farwell
d3ae2eb58e Rust unstable book: basic desc and example for concat_idents. 2017-03-13 21:39:19 -04:00
Corey Farwell
e58e3d0bc0 Rust unstable book: basic desc and example for non_ascii_idents. 2017-03-13 21:38:46 -04:00
Corey Farwell
137c1e8121 Rust unstable book: basic desc and example for i128_type. 2017-03-13 21:38:44 -04:00
Corey Farwell
0dd03ffaf7 Rust unstable book: basic desc and example for const_indexing. 2017-03-13 21:38:24 -04:00
Corey Farwell
327e8e9196 Rust unstable book: basic desc and example for conservative_impl_trait. 2017-03-13 21:38:07 -04:00
Corey Farwell
e06c51553d Rust unstable book: basic desc and example for const_fn. 2017-03-13 21:35:52 -04:00
Eric Findlay
5b7f330588 Corrected very minor documentation detail about Unicode and Japanese 2017-03-14 10:21:26 +09:00
Wesley Wiser
8b9b3b6d8b Fix sidebar not extending to the bottom of the page
Fixes #40459
2017-03-13 20:36:41 -04:00
projektir
11d3344562 Using X headings #39850 2017-03-13 19:13:26 -04:00
Matt Ickstadt
5e49f79b06 Add test for issue #29595 2017-03-13 17:58:09 -05:00