Commit graph

92100 commits

Author SHA1 Message Date
Mark Mansi
6fd3f5acaf forgot one 2019-04-10 21:32:46 -05:00
Mark Mansi
d7f5c50a33 make duplicate matcher bindings a hard error 2019-04-10 21:29:17 -05:00
Kampfkarren
1156ce6f54 Feedback 2019-04-10 19:22:43 -07:00
Esteban Küber
3ab97062cf Tweak unstable diagnostic output 2019-04-10 18:10:30 -07:00
Esteban Küber
ac037c1359 Recover from missing semicolon based on the found token
When encountering one of a few keywords when a semicolon was
expected, suggest the semicolon and recover:

```
error: expected one of `.`, `;`, `?`, or an operator, found `let`
  --> $DIR/recover-missing-semi.rs:4:5
   |
LL |     let _: usize = ()
   |                      - help: missing semicolon here
LL |
LL |     let _ = 3;
   |     ^^^

error[E0308]: mismatched types
  --> $DIR/recover-missing-semi.rs:2:20
   |
LL |     let _: usize = ()
   |                    ^^ expected usize, found ()
   |
   = note: expected type `usize`
              found type `()`
```
2019-04-10 18:07:52 -07:00
David Wood
16592f691b
Suggest removing ? to resolve type errors.
This commit adds a suggestion to remove the `?` from expressions if
removing the `?` would resolve a type error.
2019-04-10 23:52:01 +02:00
Kampfkarren
4af7cf37d4 Fix tests, I think 2019-04-10 14:39:51 -07:00
Jethro Beekman
e2d1d667e2 SGX target: fix cfg(test) build 2019-04-10 14:08:54 -07:00
Guillaume Gomez
825a11ea3b Fix attributes position in type declaration 2019-04-10 22:31:42 +02:00
Alex Crichton
acf3ddb5ad std: Add {read,write}_vectored for more types
This commit implements the `{read,write}_vectored` methods on more types
in the standard library, namely:

* `std::fs::File`
* `std::process::ChildStd{in,out,err}`
* `std::io::Std{in,out,err}`
* `std::io::Std{in,out,err}Lock`
* `std::io::Std{in,out,err}Raw`

Where supported the OS implementations hook up to native support,
otherwise it falls back to the already-defaulted implementation.
2019-04-10 12:51:25 -07:00
John Kåre Alsaker
7b28ddc39d Update Cargo.lock 2019-04-10 21:18:35 +02:00
John Kåre Alsaker
cf0454ca1a Don't build test helpers for wasm32 2019-04-10 21:17:33 +02:00
John Kåre Alsaker
b70124ed47 Don't require a C compiler on wasm32 2019-04-10 21:17:32 +02:00
John Kåre Alsaker
81a1121341 Update cmake, cc and compiler_builtins for VS 2019 support 2019-04-10 21:17:31 +02:00
Kampfkarren
2b6143126d Fix error brought up by changing tabs to spaces 2019-04-10 12:14:53 -07:00
Kampfkarren
de02dd96fd Adhere to tidy script 2019-04-10 10:41:47 -07:00
Kampfkarren
4a938b5b3c Special error when using catch after try 2019-04-10 10:35:48 -07:00
Andy Russell
bbdeafc13c
clarify what the item is in "not a module" error 2019-04-10 12:55:21 -04:00
bors
96d700f1b7 Auto merge of #59810 - matthiaskrgr:submodule_upd, r=oli-obk
submodules: update clippy, rls and miri

Let's give this another try.
r? @Manishearth
cc @Xanewok
2019-04-10 15:54:39 +00:00
Christian
cdeb7455ea Updated the description of -Z in the rustc book. 2019-04-10 12:20:47 +02:00
Christian
7acfa453df Updated the documentation, now claiming the -Z is associated to unstable compiler flags, instead of flags for debugging. 2019-04-10 12:10:25 +02:00
Oliver Scherer
f10394ae0c Documentation should have proper grammar 2019-04-10 11:21:19 +02:00
Lzu Tao
404df312d3 Update ui test 2019-04-10 06:33:43 +00:00
Anders Kaseorg
38264937fc std::ops::Div examples: correct nominator to numerator
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-04-09 21:43:41 -07:00
Lzu Tao
2f975529a0 Re-export NonZero signed variant in std 2019-04-10 03:21:11 +00:00
John Kåre Alsaker
223f1c7d1f Remove useless ?Sized bound 2019-04-10 03:58:13 +02:00
CrLF0710
6635fbed4c Eliminate FnBox usages from libstd. 2019-04-10 09:40:44 +08:00
Eric Huss
3e01901fcd Remove strange formatting in Ordering docs. 2019-04-09 15:41:38 -07:00
Eric Huss
1ad46cd1ed Fix links on keyword docs.
- Make links relative.
- Adjust links from old 2018-edition book.
- Fix broken link in `let` docs.
2019-04-09 15:38:32 -07:00
Andy Russell
757ef38431
improve unknown enum variant errors 2019-04-09 14:19:20 -04:00
Eduard-Mihai Burtescu
6688b03865 proc_macro: stop using LEB128 for RPC. 2019-04-09 21:05:15 +03:00
John Kåre Alsaker
04762ddfbb Fix a typo 2019-04-09 17:07:36 +02:00
Michael Woerister
724ca0584e Exclude profiler-generated symbols from MSVC __imp_-symbol workaround. 2019-04-09 14:47:00 +02:00
Edd Barrett
3262d1e252 Kill dead code dominator code. 2019-04-09 11:48:31 +01:00
Matthias Krüger
beeeb4360e update Cargo.lock 2019-04-09 10:50:08 +02:00
Matthias Krüger
956e815659 submodules: update rls from 90f7ab0 to 49efc06
Changes:
````
Account for changed format range in a test
Adapt format integration test to use new range
Add unit tests for Rustfmt::calc_text_edits
Prefer saturating_sub
Return only partial text edits on formatting request
Redo errors in format.rs
Rephrase unstable features helper function
Work around Rustfmt bug
Adjust range-formatting test
Update Rustfmt to 1.2
Allow unstable features under "dev" channel
Updated clippy_lints in to rev c81e43b92c to fix build breaking
Fix lint pass API changes
Remove a redundant import
Bump Clippy
Add more helpful compiler messages when the features are improperly specified
Silence some flaky tests.
Update Cargo.
Rename read_analysis to decode_buf
Update Clippy
Fix pointer to pointer silliness
Add serde implementation to complement rustc-serialize
````
2019-04-09 10:49:44 +02:00
Matthias Krüger
e3993c701c submodules: update miri from 0e4f963 to 28f2e5b
Changes:
````
Update src/fn_call.rs
Fix calloc test
Add calloc test
Tidy up calloc code
Update compiletest
Fix tagging order
Add `calloc`
rename MIRI_TARGET -> MIRI_COMPILETEST_TARGET to clarify that this affects compiletest only
compiletest can just propagate MIRI_SYSROOT from the outside
````
2019-04-09 10:49:39 +02:00
Matthias Krüger
1c0922069e submodules: update clippy from 92612c9d to 37f5c1ec
Changes:
````
Remove force-host and explain no-prefer-dynamic
Escape a single quote in single_char_pattern hint
cargo fmt
Re-add tmp feature to compiletest
Remove libtest from deps
Re-allow clippy::identity_conversion in compiletest
Use latest compiletest-rs
Revert tests/compile-test.rs to 61aa5c957c
Fix ICE in suspicious_else_formatting
use a multispan for MANY_SINGLE_CHAR_NAMES
Add missing `// run-pass` annotations to ICE tests
Remove clippy_dev as dev-dependency
NFC: fix typos
rustup https://github.com/rust-lang/rust/pull/59657
Add TransmutingNull Lint * Late Lint pass, catches:   * One liner: 0 -> null -> transmute   * One liner: std:null() -> transmute   * Const (which resolves to null) -> transmute * UI Test case for Lint * Updated test for issue 3849, because now the lint that code generated is in Clippy. * Expanded `const.rs` miri-based Constant Folding code, to cover   raw pointers
Run rustfmt
Set level of identity_conversion FP to warn
Rustup to https://github.com/rust-lang/rust/pull/58805
rustup 41316f0449
Updated source to match with recent rustc `master` toolchain changes
Fix dogfood error of question_mark lint fix
Fix question_mark lint+test
use `span_lint_and_sugg` in `explicit_counter_loop`
Fix some test failures
Hacky rustup
run cargo fmt
rustup https://github.com/rust-lang/rust/pull/59096/
Change explicit_counter_loop's message to add parentheses if necessary
Change explicit_counter_loop's message to reflect original variable name
cargo fmt
Add rustfix tests for mistyped_literal_suffix lint
Move some `unreadable_literal` ui tests to correct file
Add implementation for the EarlyLintPass trait into the Adding Lints documentation.
Add rust-toolchain for clippy_dev
````
2019-04-09 10:49:33 +02:00
John Kåre Alsaker
9017d46901 Make trait_methods_not_found use a lock 2019-04-09 10:20:14 +02:00
John Kåre Alsaker
03727a4f25 Clean up jobserver integration 2019-04-09 07:44:10 +02:00
Taylor Cramer
6786fa7795 Rename Waker::new_unchecked to Waker::from_raw 2019-04-08 14:22:31 -07:00
Taylor Cramer
01be78d69f Add Waker::wake_by_ref and make Waker::wake consume the Waker 2019-04-08 14:22:31 -07:00
Philipp Hansch
edebed9fc9
compiletest: Improve no_prefer_dynamic docs
This adds some extra docs for the `no-prefer-dynamic` header.

And also a `s/must_compile_successfully/compile_pass`.

`must_compile_successfully` has been renamed to `compile_pass` at some
point in the past and this comment was still referring to the old name.
2019-04-08 21:35:44 +02:00
Isaac Whitfield
d4d2317e02 Update test cases for changes to error messages 2019-04-08 12:21:18 -07:00
Oliver Scherer
ae4717d950 Elaborate on implicit promotability 2019-04-08 18:34:45 +02:00
Oliver Scherer
c63b9fff3f Pacify tidy 2019-04-08 16:25:10 +02:00
Oliver Scherer
d3d56732a7 Get rid of "is not const" naming 2019-04-08 15:36:00 +02:00
Oliver Scherer
ec5206588f Explicit promotion is indistinguishable from explicit promotion
Implicit promotion on the other hand has very strict rules on what may be done
2019-04-08 15:32:31 +02:00
Oliver Scherer
6b01844408 Generalize initial "not const" assignments 2019-04-08 15:28:00 +02:00
Ralf Jung
4d79d391b0 avoid reading from ZST locals 2019-04-08 13:40:43 +02:00