Commit Graph

82291 Commits

Author SHA1 Message Date
Alex Crichton
2438cfc755 Fix usage of wasm_target_feature 2018-08-13 18:03:06 -07:00
David Tolnay
69b9c23b38
Address review of RcVec 2018-08-13 17:09:13 -07:00
Esteban Küber
397db46ae3 Mark prior failure to avoid ICE
Fix #53251
2018-08-13 15:28:18 -07:00
Eduard-Mihai Burtescu
5218a5cf35 syntax: add uniform_paths feature-gate. 2018-08-14 01:18:05 +03:00
Andre Bogus
05ddad37d1 use ? to simplify TransitiveRelation.maybe_map 2018-08-13 23:12:36 +02:00
ljedrz
e5e6375352 Move SmallVec and ThinVec out of libsyntax 2018-08-13 22:11:57 +02:00
Esteban Küber
d35e2677fc review comment 2018-08-13 12:57:21 -07:00
bors
d5a448b3f4 Auto merge of #53270 - petrochenkov:macuse-regr, r=alexcrichton
Fix a few regressions from enabling macro modularization

The first commit restores the old behavior for some minor unstable stuff (`rustc_*` and `derive_*` attributes) and adds a new feature gate for arbitrary tokens in non-macro attributes.

The second commit fixes https://github.com/rust-lang/rust/issues/53205

The third commit fixes https://github.com/rust-lang/rust/issues/53144.
Same technique is used as for other things blocking expansion progress - if something causes indeterminacy too often, then prohibit it.
In this case referring to crate-local macro-expanded `#[macro_export]` macros via module-relative paths is prohibited, see comments in code for more details.

cc https://github.com/rust-lang/rust/pull/50911
2018-08-13 17:10:04 +00:00
Unknown
6e562d24c6 fix behavior 2018-08-13 23:01:48 +09:00
bors
a78ae85e59 Auto merge of #53161 - michaelwoerister:cstrings, r=wesleywiser
Avoid many allocations for CStrings during codegen.

Giving in to my irrational fear of dynamic allocations. Let's see what perf says to this.
2018-08-13 11:19:07 +00:00
ljedrz
40d9bd0147 A few cleanups and minor improvements for the lexer 2018-08-13 12:57:25 +02:00
Unknown
b95f6f2e8f bug fix 2018-08-13 17:30:09 +09:00
bors
147ca2d2a6 Auto merge of #53238 - nrc:update, r=kennytm
Update RLS

Should fix RLS toolstate
2018-08-13 06:42:15 +00:00
David Tolnay
2fa1da9919
TokenStream::extend 2018-08-12 22:45:32 -07:00
bors
ab93561b5f Auto merge of #53051 - varkor:trait-method-pattern-arguments-error, r=petrochenkov
Emit error for pattern arguments in trait methods

The error and check for this already existed, but the parser didn't try to parse trait method arguments as patterns, so the error was never emitted. This surfaces the error, so we get better errors than simple parse errors.

This improves the error message described in https://github.com/rust-lang/rust/issues/53046.

r? @petrochenkov
2018-08-13 02:28:13 +00:00
bors
5a0d2961ce Auto merge of #53297 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 15 pull requests

Successful merges:

 - #52955 (Update compiler test documentation)
 - #53019 (Don't collect() when size_hint is useless)
 - #53025 (Consider changing assert! to debug_assert! when it calls visit_with)
 - #53059 (Remove explicit returns where unnecessary)
 - #53165 ( Add aarch64-unknown-netbsd target)
 - #53210 (Deny future duplication of rustc-ap-syntax)
 - #53223 (A few cleanups for rustc_data_structures)
 - #53230 ([nll] enable feature(nll) on various crates for bootstrap: part 4)
 - #53231 (Add let keyword doc)
 - #53240 (Add individual documentation for <integer>`.swap_bytes`/.`reverse_bits`)
 - #53253 (Remove unwanted console log)
 - #53264 (Show that Command can be reused and remodified)
 - #53267 (Fix styles)
 - #53273 (Add links to std::char::REPLACEMENT_CHARACTER from docs.)
 - #53283 (wherein we suggest float for integer literals where a float was expected)

Failed merges:

r? @ghost
2018-08-12 21:52:22 +00:00
Guillaume Gomez
3959dca205
Rollup merge of #53283 - zackmdavis:and_the_case_of_the_flotation_device, r=estebank
wherein we suggest float for integer literals where a float was expected

@sunjay pointed out that this is a nice thing that we could do.

Resolves #53280.

r? @estebank
2018-08-12 23:27:05 +02:00
Guillaume Gomez
f618071c46
Rollup merge of #53273 - frewsxcv:frewsxcv-ufffd, r=GuillaumeGomez
Add links to std::char::REPLACEMENT_CHARACTER from docs.

There are a few places where we mention the replacement character in the
docs, and it could be helpful for users to utilize the constant which is
available in the standard library, so let’s link to it!
2018-08-12 23:27:04 +02:00
Guillaume Gomez
34956ac0f6
Rollup merge of #53267 - GuillaumeGomez:fix-styles, r=QuietMisdreavus
Fix styles

Fixes #53262.

r? @QuietMisdreavus
2018-08-12 23:27:02 +02:00
Guillaume Gomez
17d4bd0c0b
Rollup merge of #53264 - Havvy:patch-3, r=GuillaumeGomez
Show that Command can be reused and remodified

The prior documentation did not make it clear this was possible.

I wanted to make the `list_dir` example work on Windows, but I don't know if passing "/" will error or show the root of the current volume (e.g. `C:`).

r? @GuillaumeGomez
2018-08-12 23:27:01 +02:00
Guillaume Gomez
b0d7f91c4e
Rollup merge of #53253 - GuillaumeGomez:remove-console, r=kennytm
Remove unwanted console log

Forgot to remove a `console.log`, now it's fixed.

r? @QuietMisdreavus
2018-08-12 23:26:59 +02:00
Guillaume Gomez
b1b5c66e10
Rollup merge of #53240 - llogiq:doc-num-swap-reverse, r=joshtriplett
Add individual documentation for <integer>`.swap_bytes`/.`reverse_bits`
2018-08-12 23:26:58 +02:00
Guillaume Gomez
dfb122ecc6
Rollup merge of #53231 - GuillaumeGomez:let-keyword, r=QuietMisdreavus
Add let keyword doc

Part of #34601.

r? @rust-lang/docs
2018-08-12 23:26:57 +02:00
Guillaume Gomez
3e9a1a1b82
Rollup merge of #53230 - memoryruins:nll_bootstrap_4, r=nikomatsakis
[nll] enable feature(nll) on various crates for bootstrap: part 4

#53172

r? @nikomatsakis
2018-08-12 23:26:56 +02:00
Guillaume Gomez
f1ae95f7e2
Rollup merge of #53223 - ljedrz:cleanup_data_structures, r=oli-obk
A few cleanups for rustc_data_structures

- remove a redundant `clone()`
- make some calls to `.iter()` implicit
- collapse/simplify a few operations
- remove some explicit `return`s
- make `SnapshotMap::{commit, rollback_to}` take references
- remove unnecessary struct field names
- change `transmute()`s in `IdxSet::{from_slice, from_slice_mut}` to casts
- remove some unnecessary lifetime annotations
- split 2 long literals
2018-08-12 23:26:55 +02:00
Guillaume Gomez
0903b18e9f
Rollup merge of #53210 - alexcrichton:deny-rustc-syntax, r=nrc
Deny future duplication of rustc-ap-syntax

Enable the tidy check to forbid this!

Closes #53006
2018-08-12 23:26:54 +02:00
Guillaume Gomez
d509e31b93
Rollup merge of #53165 - jakllsch:netbsd-ad22a005-b917-47f3-8156-f717d36f6bbe, r=estebank
Add aarch64-unknown-netbsd target

Depends on #53116.
2018-08-12 23:26:52 +02:00
Guillaume Gomez
28e1a7ba5e
Rollup merge of #53059 - ljedrz:unneeded_returns, r=kennytm
Remove explicit returns where unnecessary
2018-08-12 23:26:51 +02:00
Guillaume Gomez
fbe6241064
Rollup merge of #53025 - ljedrz:debug_asserts_limited, r=varkor
Consider changing assert! to debug_assert! when it calls visit_with

The perf run from #52956 revealed that there were 3 benchmarks that benefited most from changing `assert!`s to `debug_assert!`s:

- issue #46449: avg -4.7% for -check
- deeply-nested (AKA #38528): avg -3.4% for -check
- regression #31157: avg -3.2% for -check

I analyzed their fixing PRs and decided to look for potentially heavy assertions in the files they modified. I noticed that all of the non-trivial ones contained indirect calls to `visit_with()`.

It might be a good idea to consider changing `assert!` to `debug_assert!` in those places in order to get the performance wins shown by the benchmarks.
2018-08-12 23:26:50 +02:00
Guillaume Gomez
7d3864954e
Rollup merge of #53019 - ljedrz:bad_collects, r=estebank
Don't collect() when size_hint is useless

This adjusts PRs #52738 and #52697 by falling back to calculating capacity and extending or pushing in a loop where `collect()` can't be trusted to calculate the right capacity.

It is a performance win.
2018-08-12 23:26:49 +02:00
Guillaume Gomez
0653c259c2
Rollup merge of #52955 - tromey:compiler-test-docs, r=nikomatsakis
Update compiler test documentation

Update the compiler test documentation to document ignore-gdb-version
and min-system-llvm-version; and expand the min-gdb-version,
min-lldb-version, and min-llvm-version documentation a little.
2018-08-12 23:26:48 +02:00
Esteban Küber
5ae3801c8d Various changes to rustc_on_unimplemented
- Add `from_method` and `from_desugaring` to formatting options
- Change wording of errors slightly
2018-08-12 12:26:38 -07:00
Vadim Petrochenkov
dd0a766e06 Prohibit using macro-expanded macro_export macros through module-relative paths 2018-08-12 22:07:09 +03:00
whitequark
66fd1ebfae Make LLVM emit assembly comments with -Z asm-comments.
Fixes #35741.
2018-08-12 17:59:33 +00:00
Zack M. Davis
58f660f025 wherein we suggest float for integer literals where a float was expected
Sunjay Varma pointed out that this is a nice thing that we could do.

Resolves #53280.
2018-08-12 10:20:35 -07:00
Ralf Jung
376a6b2663 unions are not always trivially dropable
Fixes #52786
2018-08-12 18:59:08 +02:00
Simonas Kazlauskas
dc02a6070f Do not generate assumes for plain integer casts 2018-08-12 18:38:46 +03:00
Esteban Küber
54e11c96a6 Extend documentation of rustc_on_unimplemented 2018-08-11 15:01:06 -07:00
varkor
5c814e2e4e Clean up and add extra tests 2018-08-11 21:25:48 +01:00
varkor
49e9c5fe90 Add E0642 to parser error 2018-08-11 21:08:24 +01:00
varkor
e4c3b49fe7 Emit an error during parsing 2018-08-11 21:08:24 +01:00
varkor
a478cd41e3 Improve diagnostics 2018-08-11 21:08:24 +01:00
varkor
235905c080 Fix handling of trait methods with bodies and improve efficiency 2018-08-11 21:08:24 +01:00
varkor
b05f0bec1a Suggest replacing patterns with underscores 2018-08-11 21:08:24 +01:00
varkor
90a6954327 Emit error for pattern arguments in trait methods
The error and check for this already existed, but the parser didn't try to parse trait method arguments as patterns, so the error was never emitted. This surfaces the error, so we get better errors than simple parse errors.
2018-08-11 21:08:24 +01:00
Havvy (Ryan Scheel)
0070b46626 Fix indent 2018-08-11 13:02:49 -07:00
Corey Farwell
ec18991492 Add links to std::char::REPLACEMENT_CHARACTER from docs.
There are a few places where we mention the replacement character in the
docs, and it could be helpful for users to utilize the constant which is
available in the standard library, so let’s link to it!
2018-08-11 15:42:35 -04:00
ljedrz
535bd13fe4 A few cleanups for fmt_macros, graphviz, apfloat, target, serialize and term 2018-08-11 20:56:29 +02:00
Guillaume Gomez
f9f934f7fd Add let keyword doc 2018-08-11 20:06:46 +02:00
bjorn3
44af068388 Remove statics field from CodegenCx 2018-08-11 18:54:36 +02:00