Commit Graph

124585 Commits

Author SHA1 Message Date
Georgio Nicolas
1e2ce28ec0 Document the discrepancy in the mask type for _mm_shuffle_ps 2020-08-02 18:22:26 +03:00
liuzhenyu
3b4151c9f3 fix typos 2020-08-02 23:20:00 +08:00
Mark Rousskov
cc7abc7563 Avoid dumping rustc invocations to stdout
These are quite long, usually, and in most cases not interesting. On smaller
terminals they can take up more than a full page of output, hiding the error
diagnostics emitted.
2020-08-02 10:54:13 -04:00
David Wood
1530563bd7
compiletest: print diff for pretty tests
This commit modifies compiletest so that a diff of actual and expected
output is shown for pretty tests. This makes it far easier to work out
what has changed.

Signed-off-by: David Wood <david@davidtw.co>
2020-08-02 15:33:07 +01:00
David Wood
c773226aba
tests: add regression test for #74745
This commit adds a regression test for #74745. While a
`ignore-tidy-trailing-lines` header is required, this doesn't stop the
test from reproducing, so long as there is no newline at the end of the
file.

However, adding the header comments made the test fail due to a bug in
pprust, fixed in the previous commit.

Signed-off-by: David Wood <david@davidtw.co>
2020-08-02 15:33:06 +01:00
David Wood
86f80d3ba8
pprust: adjust mixed comment printing
This commit adjusts the pretty printing of mixed comments so that the
initial zero-break isn't emitted at the beginning of the line. Through
this, the `block-comment-wchar` test can have the `pp-exact` file
removed, as it no longer converges from pretty printing of the source.

Signed-off-by: David Wood <david@davidtw.co>
2020-08-02 15:33:03 +01:00
Camille GILLOT
4d4b8f2d41 Rename rustc_middle::cstore::DepKind to DependencyKind. 2020-08-02 16:21:46 +02:00
bors
e8876ae2c1 Auto merge of #74675 - pietroalbini:aarch64-ci-fallible, r=Mark-Simulacrum
Add fallible AArch64 CI builder

This adds the `aarch64-gnu` CI builder to the `auto-fallible` job, as a first step in the process of actually gating on it.

r? @Mark-Simulacrum
2020-08-02 14:08:48 +00:00
Camille GILLOT
058e021457 Use Lift derive proc-macro in librustc_traits. 2020-08-02 15:49:26 +02:00
Camille GILLOT
2baefd3206 Move IntercrateAmbiguityCause to librustc_trait_selection. 2020-08-02 15:49:26 +02:00
Camille GILLOT
e288d05012 Introduce an abstraction for EvaluationCache and SelectionCache. 2020-08-02 15:49:26 +02:00
bors
fd4d151aed Auto merge of #74210 - estebank:type-ascriptomatic, r=petrochenkov
Deduplicate `::` -> `:` typo errors

Deduplicate errors caused by the same type ascription typo, including
ones suggested during parsing that would get reported again during
resolve. Fix #70382.
2020-08-02 12:20:09 +00:00
Aleksey Kladov
1a2d07e084 Formatting: don't mix mod and use
Seems to be a fallout from rustfmt transition
2020-08-02 14:09:25 +02:00
Aleksey Kladov
7fdffe183d Use NonterminalKind for MetaVarDecl
This is more type safe and allows us to remove a few dead branches
2020-08-02 14:09:25 +02:00
Aleksey Kladov
2595d75ea9 Introduce NonterminalKind
It encapsulate the (part of) the interface between the parser and
macro by example (macro_rules) parser.

The second bit is somewhat more general `parse_ast_fragment`, which is
the reason why we keep some `parse_xxx` functions as public.
2020-08-02 14:09:25 +02:00
Guillaume Gomez
093e45dce6 Clean up E0744 explanation 2020-08-02 13:26:02 +02:00
Guillaume Gomez
507f403f95 Clean up E0733 explanation 2020-08-02 13:24:40 +02:00
bors
1e99138078 Auto merge of #74972 - second-state:wasi-right-fix, r=KodrAus
Fix std::fs::File::metadata permission on WASI target

Previously `std::fs::File::metadata` on wasm32-wasi would call `fd_filestat_get`
to get metadata associated with fd, but that fd is opened without
RIGHTS_FD_FILESTAT_GET right, so it will failed on correctly implemented WASI
environment.

This change instead to add the missing rights when opening an fd.
2020-08-02 09:41:17 +00:00
bishtpawan
fee58ebe20 Replace from log to tracing 2020-08-02 13:24:08 +05:30
bors
12799ad60c Auto merge of #74899 - sajattack:libc_0.2.74_bump, r=jonas-schievink
bump libc version to 0.2.74
2020-08-02 07:23:14 +00:00
bishtpawan
980edf5baa Replace from log to tracing in libsrustrustc_ast_lowering, librustc_ast_passes, librustc_ast_pretty 2020-08-02 12:21:39 +05:30
bors
46cf80dc1a Auto merge of #75004 - Aaron1011:move-probably-equal, r=petrochenkov
Move 'probably equal' methods to librustc_parse

This is preparation for PR #73084
2020-08-02 05:34:40 +00:00
bors
8141873e6d Auto merge of #74785 - euclio:deprecation-kinds, r=petrochenkov
report kind of deprecated item in message

This is important for fields, which are incorrectly referred to as
"items".
2020-08-02 03:47:29 +00:00
Aaron Hill
70ba491b78
Update elasticlunr-rs and ammonia transitive deps
This removes all dependencies on pre-1.0 proc-macro ecosystem crates
(syn, quote, and proc-macro2)
2020-08-01 21:15:53 -04:00
Aaron Hill
183947f6ba
Move 'probably equal' methods to librustc_parse
This is preparation for PR #73084
2020-08-01 21:12:49 -04:00
bors
e18b56345f Auto merge of #75033 - Manishearth:rollup-d8afil1, r=Manishearth
Rollup of 5 pull requests

Successful merges:

 - #74602 (Clarify the doc for MaybeUninit::zeroed on incorrect use)
 - #74720 (Clean up E0728 explanation)
 - #74992 (fix rustdoc generic param order)
 - #75015 (Add Vec::spare_capacity_mut)
 - #75022 (Use a slice pattern instead of rchunks_exact(_).next())

Failed merges:

r? @ghost
2020-08-02 01:04:54 +00:00
Manish Goregaokar
82147885bb
Rollup merge of #75022 - cuviper:sliced-rchunk, r=lcnr
Use a slice pattern instead of rchunks_exact(_).next()

This is a minor cleanup, but trying a single-use `rchunks` iterator can
be more directly matched with a slice pattern, `[.., a, b]`.
2020-08-01 17:42:18 -07:00
Manish Goregaokar
d544e21dc3
Rollup merge of #75015 - Amanieu:vec_spare, r=sfackler
Add Vec::spare_capacity_mut

Returns the remaining spare capacity of the vector as a slice of `MaybeUninit<T>`.

As suggested by @sfackler in https://github.com/rust-lang/rust/pull/70967#issuecomment-612659006.

r? @sfackler
2020-08-01 17:42:16 -07:00
Manish Goregaokar
98a9397c2a
Rollup merge of #74992 - lcnr:fix-generic-param-order, r=GuillaumeGomez
fix rustdoc generic param order

fixes #61292

r? @varkor cc @GuillaumeGomez
2020-08-01 17:42:15 -07:00
Manish Goregaokar
fac959b570
Rollup merge of #74720 - GuillaumeGomez:cleanup-e0728, r=jyn514
Clean up E0728 explanation

r? @Dylan-DPC
2020-08-01 17:42:13 -07:00
Manish Goregaokar
39436ebe72
Rollup merge of #74602 - poliorcetics:maybe-uninit-zeroed-doc-clarification, r=jyn514
Clarify the doc for MaybeUninit::zeroed on incorrect use

Fixes #74343.

@rustbot modify labels: C-enhancement, T-doc
2020-08-01 17:42:11 -07:00
bors
5ef872f961 Auto merge of #74605 - rust-lang:vec-leak, r=Amanieu
Stabilize Vec::leak as a method

Closes https://github.com/rust-lang/rust/issues/62195

The signature is changed to a method rather than an associated function:

```diff
-pub fn leak<'a>(vec: Vec<T>) -> &'a mut [T]
+pub fn leak<'a>(self) -> &'a mut [T]
```

The reason for `Box::leak` not to be a method (`Deref` to an arbitrary `T` which might have its own, different `leak` method) does not apply.
2020-08-01 22:29:30 +00:00
Yuki Okushi
86d0b9cbd0
Do not trigger unused_{braces,parens} lints with yield 2020-08-02 07:20:28 +09:00
Stein Somers
99398dd2fd BTreeMap::drain_filter no longer touches the root during iteration 2020-08-01 23:35:30 +02:00
bors
05762e3d6f Auto merge of #74726 - oli-obk:tracing, r=Mark-Simulacrum
Move from `log` to `tracing`

The only visible change is that we now get timestamps in our logs:

```
Jul 24 18:41:01.065 TRACE rustc_mir::transform::const_prop: skipping replace of Rvalue::Use(const () because it is already a const
Jul 24 18:41:01.065 TRACE rustc_mir::transform::const_prop: propagated into _2
Jul 24 18:41:01.065 TRACE rustc_mir::transform::const_prop: visit_constant: const ()
```

This PR was explicitly designed to be as low-impact as possible. We can now move to using the name `tracing` insteads of `log` on a crate-by-crate basis and use any of the other tracing features where desirable.

As far as I can tell this will allow tools to seamlessly keep working (since they are using `rustc_driver::init_log...`).

This is the first half of step 1 of the accepted `tracing` MCP (https://github.com/rust-lang/compiler-team/issues/331)
2020-08-01 20:43:12 +00:00
Tim Diekmann
db7d07b83b
Remove a trailing whitespace 2020-08-01 21:53:00 +02:00
Tim Diekmann
9cd9286e20
Update doc-comment for grow_zeroed 2020-08-01 21:51:50 +02:00
bors
de10abf50c Auto merge of #75016 - Manishearth:rollup-x553g7j, r=Manishearth
Rollup of 6 pull requests

Successful merges:

 - #74977 (Clean up E0741 error explanation)
 - #74981 (Some fixes for `plugin.md` in unstable-book)
 - #74983 (Replace a recursive algorithm with an iterative one and a stack.)
 - #74995 (Update the WASI libc build to LLVM 10.)
 - #74996 (submodules: update cargo from 974eb438d to 2d5c2381e)
 - #75007 (Clean up E0743 explanation)

Failed merges:

r? @ghost
2020-08-01 18:52:30 +00:00
Josh Stone
66a02ec2d6 Use a slice pattern instead of rchunks_exact(_).next()
This is a minor cleanup, but trying a single-use `rchunks` iterator can
be more directly matched with a slice pattern, `[.., a, b]`.
2020-08-01 11:41:59 -07:00
Stein Somers
602f9aab89 More benchmarks of BTreeMap mutation 2020-08-01 20:23:13 +02:00
Alexis Bourget
54eb3768e0 Reword incorrect use of zeroed() 2020-08-01 19:28:19 +02:00
Amanieu d'Antras
df3a30aee4 Add Vec::spare_capacity_mut 2020-08-01 18:24:35 +01:00
Manish Goregaokar
2e53ac53e7
Rollup merge of #75007 - GuillaumeGomez:cleanup-e0743, r=pickfire
Clean up E0743 explanation

r? @Dylan-DPC
2020-08-01 09:30:19 -07:00
Manish Goregaokar
302dfbc567
Rollup merge of #74996 - matthiaskrgr:submodule_upd, r=ehuss
submodules: update cargo from 974eb438d to 2d5c2381e

Changes:
````
Use the same index location on nightly as beta
relax deprecated diagnostic message check
Don't print to raw stderr in test
Emit the `test` field in cargo metadata
````

r? @ehuss

Trying to get the fix to the registry-index-hash upstream soonish.
2020-08-01 09:30:18 -07:00
Manish Goregaokar
58df0a0473
Rollup merge of #74995 - sunfishcode:update-llvm, r=alexcrichton
Update the WASI libc build to LLVM 10.

Among other things, this brings in [the `__main_argc_argv`] patch,
which simplifies the interaction between the compiler and WASI libc's
startup code, which will help work on reactor support.

[the `__main_argc_argv` patch]: 00072c08c7

r? @alexcrichton
2020-08-01 09:30:16 -07:00
Manish Goregaokar
69515819b6
Rollup merge of #74983 - oli-obk:mir_opt_goto_chain, r=ecstatic-morse
Replace a recursive algorithm with an iterative one and a stack.

fixes #74931
2020-08-01 09:30:14 -07:00
Manish Goregaokar
e65d6ed80f
Rollup merge of #74981 - giraffate:fix_sample_codes_in_unstable_book_plugin, r=GuilliameGomez
Some fixes for `plugin.md` in unstable-book

- sample codes not working
I referred to https://github.com/rust-lang/rust/blob/master/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs and https://github.com/rust-lang/rust/blob/master/src/test/ui-fulldeps/lint-plugin.rs.

- broken link
https://github.com/rust-lang/rust/blob/master/src/librustc/lint/builtin.rs -> https://github.com/rust-lang/rust/blob/master/src/librustc_session/lint/builtin.rs
2020-08-01 09:30:13 -07:00
Manish Goregaokar
60bf83d215
Rollup merge of #74977 - GuillaumeGomez:cleanup-e0741, r=pickfire
Clean up E0741 error explanation

r? @Dylan-DPC
2020-08-01 09:30:11 -07:00
Oliver Scherer
c7290379be Remove chrono feature from tracing 2020-08-01 16:24:52 +02:00
Guillaume Gomez
4bd313fb0f Clean up E0743 explanation 2020-08-01 15:19:00 +02:00