Commit Graph

90419 Commits

Author SHA1 Message Date
Nicholas Nethercote
895a79423b Remove some unnecessary into() calls.
These are probably leftovers from recent `TokenStream` simplifications.
2019-02-18 10:17:59 +11:00
Stein Somers
0b9ad6e6fd Explain a panic in test case net::tcp::tests::double_bind 2019-02-18 00:13:31 +01:00
Nicholas Nethercote
82ad4f1f45 Make interpolated_to_tokenstream a method on Nonterminal. 2019-02-18 10:06:26 +11:00
Nicholas Nethercote
f0d8fbd283 Avoid a clone() in transcribe().
The current code (expensively) clones the value within an `Rc`. This
commit changes things so that the `Rc` itself is (cheaply) cloned
instead, avoid some allocations.

This requires converting a few `Rc` instances to `Lrc`.
2019-02-18 09:46:33 +11:00
Nicholas Nethercote
f8801f3bf6 Remove LazyTokenStream.
It's present within `Token::Interpolated` as an optimization, so that if
a nonterminal is converted to a `TokenStream` multiple times, the
first-computed value is saved and reused.

But in practice it's not needed. `interpolated_to_tokenstream()` is a
cold function: it's only called a few dozen times while compiling rustc
itself, and a few hundred times across the entire `rustc-perf` suite.
Furthermore, when it is called, it is almost always the first
conversion, so no benefit is gained from it.

So this commit removes `LazyTokenStream`, along with the now-unnecessary
`Token::interpolated()`.

As well as a significant simplification, the removal speeds things up
slightly, mostly due to not having to `drop` the `LazyTokenStream`
instances.
2019-02-18 09:46:33 +11:00
Nicholas Nethercote
d26bf742db Change Token::interpolated_to_tokenstream().
It is currently a method of `Token`, but it only is valid to call if
`self` is a `Token::Interpolated`. This commit eliminates the
possibility of misuse by changing it to an associated function that
takes a `Nonterminal`, which also simplifies the call sites.

This requires splitting out a new function, `nonterminal_to_string`.
2019-02-18 09:38:34 +11:00
Simon Sapin
cf267540eb Review comments 2019-02-17 21:30:38 +01:00
Guy Taylor
88e462bf7f Add links to codegen docs for rustc synonym flags
The rustc "-g" and "-o" fags are synonyms of the "-c" codegen flags.
This adds a link to the codegen docs for each synonym.
2019-02-17 19:45:13 +00:00
Guy Taylor
55c25f8c8d Fix doc for rustc "-g" flag
The rustc "-g" CLI flag was miss documented to be a synonym of "-C
debug-level=2" and not the correct "-C debuginfo=2".
2019-02-17 19:44:45 +00:00
Taiki Endo
1b7ca961d9 librustc_codegen_llvm => 2018 2019-02-18 03:58:58 +09:00
emlai
ee948d9981 Add regression test for a specialization-related ICE (#39448) 2019-02-17 20:41:18 +02:00
Jonas Schievink
1a0d800ef6 Bump the bootstrap compiler 2019-02-17 18:14:32 +01:00
Aaron Stillwell
35d8c4400d Changed feature gate for new PathBuf methods
Feature gate changed to `path_buf_capacity` as per advice from @Mark-Simulacrum
2019-02-17 17:14:10 +00:00
Aaron Stillwell
dbf60d9ca1 Fixes for implementation of PathBuf methods (aliases for OsString)
- Fixed incorrect `mut` usage
- Fixed style in accordance with tidy
- Marked all methods as unstable
- Changed feature identifier to path_buf_alias_os_string_methods
2019-02-17 16:41:05 +00:00
Andre Bogus
dad211ef9f Modify doctest's auto-fn main() to allow Results
This lets the default `fn main()` unwrap any `Result`s, which
allows the use of `?` in most tests without adding it manually.
2019-02-17 16:42:49 +01:00
kennytm
66ae3131fc
publish_toolstate.py: further fix the runtime errors
The regex was missing a `,`, causing `relevant_pr_match` to become None
and set the PR number to -1 and assigned the new issue to
`@<unknown user>`. This causes the 422 error when creating the issue due
to invalid assignee and unable to leave the tool-is-broken comment since
PR -1 does not exist.

The default user names are now also changed to @ghost to prevent the
422 error in case anything goes wrong again.
2019-02-17 23:39:50 +08:00
Aaron Stillwell
a23c40ec94 Add alias methods to PathBuf for underlying OsString
Implemented the following methods on PathBuf which
forward to the underlying OsString.

- capacity
- with_capacity
- clear
- reserve
- reserve_exact
- shrink_to_fit
- shrink_to
2019-02-17 15:17:46 +00:00
bors
9a3392e174 Auto merge of #58416 - cuviper:dist-linux-gcc, r=alexcrichton
[CI] Update GCC in the dist-linux builders

Upstream LLVM is planning to raise their minimum toolchain requirements, so they may start using C++14 features. This new policy has already landed in the form of a "soft" error.
http://lists.llvm.org/pipermail/llvm-dev/2019-February/130117.html

For GCC, they will require at least version 5.1. This PR moves our crosstool-ng builders to their max GCC 5.2, with a few small patches to fix compatibility. The dist-x86_64-linux builder is updated to GCC 5.5 and LLVM/Clang 8.0.0-rc2, which also affects dist-i686-linux sharing the same scripts.

r? @alexcrichton
2019-02-17 14:29:33 +00:00
Konrad Borowski
0cf1a912e3 Remove UB in test_ptr_subtraction test 2019-02-17 13:04:48 +01:00
Konrad Borowski
3281e62188 Remove UB in test_is_null test 2019-02-17 12:58:48 +01:00
Dale Wijnand
8fbb013c1c
Mention capping forbid lints
I felt the description of forbid was misleading/incomplete without
mentioning how --cap-lints interacts with it.
2019-02-17 10:24:25 +00:00
Ralf Jung
aba0d29320 update stdsimd 2019-02-17 11:22:04 +01:00
bors
8af675a075 Auto merge of #58495 - kennytm:rollup, r=kennytm
Rollup of 19 pull requests

Successful merges:

 - #57929 (Rustdoc remove old style files)
 - #57981 (Fix #57730)
 - #58074 (Stabilize slice_sort_by_cached_key)
 - #58196 (Add specific feature gate error for const-unstable features)
 - #58293 (Remove code for updating copyright years in generate-deriving-span-tests)
 - #58306 (Don't default on std crate when manipulating browser history)
 - #58359 (librustc_mir: use ? in impl_snapshot_for! macro)
 - #58395 (Instant::checked_duration_since)
 - #58429 (fix Box::into_unique effecitvely transmuting to a raw ptr)
 - #58433 (Update which libcore/liballoc tests Miri ignores, and document why)
 - #58438 (Use posix_spawn_file_actions_addchdir_np when possible)
 - #58440 (Whitelist the ARM v6 target-feature)
 - #58448 (rustdoc: mask `compiler_builtins` docs)
 - #58468 (split MaybeUninit into several features, expand docs a bit)
 - #58479 (compile-pass test for #53606)
 - #58489 (Fix runtime error in generate-keyword-tests)
 - #58496 (Fix documentation for std::path::PathBuf::pop)
 - #58509 (Notify myself when Clippy toolstate changes)
 - #58521 (Fix tracking issue for error iterators)
2019-02-17 07:34:48 +00:00
Scott McMurray
564c569bcb Monomorphize less code in fs::{read|write}
Since the generic-ness is only for the as_refs, might as well have std just compile the important part once instead of on every use.
2019-02-16 23:19:24 -08:00
kennytm
c65a82ab4e
Rollup merge of #58521 - sfackler:error-iter-issue, r=withoutboats
Fix tracking issue for error iterators
2019-02-17 14:54:00 +08:00
kennytm
4fcee62736
Rollup merge of #58509 - phansch:add_myself_to_clippy_toolstate_maintainers, r=oli-obk
Notify myself when Clippy toolstate changes
2019-02-17 14:52:25 +08:00
kennytm
98f1865718
Rollup merge of #58496 - nathan:doc-std-path-pathbuf-pop, r=frewsxcv
Fix documentation for std::path::PathBuf::pop

Closes #58474.
2019-02-17 14:52:24 +08:00
kennytm
17b07f99e8
Rollup merge of #58395 - vi:checked_duration_since, r=dtolnay
Instant::checked_duration_since
2019-02-17 14:52:23 +08:00
kennytm
f8ccdeb0d4
Rollup merge of #57929 - GuillaumeGomez:rustodc-remove-old-style-files, r=ollie27
Rustdoc remove old style files

Reopening of #56577 (which I can't seem to reopen...).

I made the flag unstable so with this change, what was blocking the PR is now gone I assume.
2019-02-17 14:52:21 +08:00
kennytm
4739cd8fea
Rollup merge of #58489 - xfix:fix-keyword-tests-runtime-error, r=alexcrichton
Fix runtime error in generate-keyword-tests

The script was made unusable after removing license headers.
2019-02-17 14:52:20 +08:00
kennytm
cfa6a702cf
Rollup merge of #58479 - saleemjaffer:test_promote_evaluation_unused_result, r=oli-obk
compile-pass test for #53606

fixes #53606
2019-02-17 14:52:18 +08:00
John Kåre Alsaker
cdd1c0efbb Don't use an allocation for ItemId in StmtKind 2019-02-17 07:23:13 +01:00
bors
6982acd867 Auto merge of #58477 - rust-lang:fix-publish-toolstate-syntax-error, r=oli-obk
Fix the syntax error in publish_toolstate.py
2019-02-17 04:57:50 +00:00
Patrick McCarter
71cd4c8e4a ui test for directed quote help suggestion #58436 2019-02-16 20:56:12 -05:00
Patrick McCarter
c34aac7b17 help suggestion when trying to delimit string literals with directed unicode quotes #58436 2019-02-16 19:56:30 -05:00
Steven Fackler
3ba6177515 Fix tracking issue for error iterators 2019-02-16 12:16:18 -08:00
Oliver Scherer
1fe7eb0094 Limit the visibility further and expand on a comment 2019-02-16 15:16:02 +01:00
Oliver Scherer
4b085337bb Update docs and visibilities of const to op methods 2019-02-16 15:05:14 +01:00
Oliver Scherer
4fdeb2da74 Add eval prefix to clarify what the function does 2019-02-16 14:56:07 +01:00
Oliver Scherer
27e438ad94 Make may_normalize explicit in the type system 2019-02-16 14:54:48 +01:00
Oliver Scherer
525983a2a4 Make validity checking use MPlaceTy instead of OpTy 2019-02-16 14:54:48 +01:00
Ralf Jung
bee3c670db
Update src/librustc_mir/interpret/operand.rs
Co-Authored-By: oli-obk <github35764891676564198441@oli-obk.de>
2019-02-16 14:52:34 +01:00
Oliver Scherer
7db96a37e7 Reintroduce the invariant comment for clarity 2019-02-16 14:33:54 +01:00
Oliver Scherer
f7c493121d Reuse the Pointer type instead of passing reassembling it at many use sites 2019-02-16 14:29:27 +01:00
varkor
727e20410c Add a test for const parameter uppercase lint 2019-02-16 13:04:15 +00:00
varkor
425fb58cac Don't abort early when collecting const generics 2019-02-16 13:03:58 +00:00
varkor
2a1b6c52d3 Check for Const param in collect 2019-02-16 13:03:30 +00:00
Oliver Scherer
b2bf37aec0 Burn some invariants we keep up into code 2019-02-16 13:27:54 +01:00
Oliver Scherer
bd18cc5708 Remove an intermediate value from discriminant reading 2019-02-16 12:47:22 +01:00
Oliver Scherer
235a6b7d06 Expose const -> op functions that don't allow violiting const eval invariants 2019-02-16 12:32:22 +01:00