100734 Commits

Author SHA1 Message Date
bors
446e5e57b6 Auto merge of #65399 - Centril:rollup-6lzj0w5, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #65215 (Add long error explanation for E0697)
 - #65292 (Print lifetimes with backticks)
 - #65362 (syntax: consolidate function parsing in item.rs)
 - #65363 (Remove implicit dependencies on syntax::pprust)
 - #65379 (refactor session::config::build_session_options_and_crate_config)
 - #65392 (Move `Nonterminal::to_tokenstream` to parser & don't rely directly on parser in lowering)
 - #65395 (Add some tests for fixed ICEs)

Failed merges:

r? @ghost
2019-10-14 10:00:51 +00:00
Guillaume Gomez
65458190c5 Unification and cleanup of librustc_mir error codes 2019-10-14 11:06:20 +02:00
Guillaume Gomez
c6de3ebd69 Uncomment E0386 to let users have access to its old definition 2019-10-14 11:06:20 +02:00
Guillaume Gomez
307a3569c5 Sort long error code explanation by error code 2019-10-14 11:06:20 +02:00
Michael Woerister
f81b1548dd Add troubleshooting section to PGO chapter in rustc book. 2019-10-14 10:34:21 +02:00
Mazdak Farrokhzad
a73e0731f4
Rollup merge of #65395 - JohnTitor:add-tests, r=Centril
Add some tests for fixed ICEs

Fixes #44153 (from 1.23.0)
Fixes #47486 (from 1.36.0)
Fixes #48010 (from 1.38.0)
Fixes #48027 (from nightly)
Fixes #48638 (from nightly)
2019-10-14 07:37:01 +02:00
Mazdak Farrokhzad
28d08f3986
Rollup merge of #65392 - Centril:nt-to-tt, r=Mark-Simulacrum
Move `Nonterminal::to_tokenstream` to parser & don't rely directly on parser in lowering

Split out from https://github.com/rust-lang/rust/pull/65324.

r? @petrochenkov
2019-10-14 07:36:59 +02:00
Mazdak Farrokhzad
e29a6fcfa2
Rollup merge of #65379 - Centril:refactor-bso_and_cc, r=petrochenkov
refactor session::config::build_session_options_and_crate_config

I'm not exactly sure what happened in https://github.com/rust-lang/rust/pull/65361#issuecomment-541420179 so in an effort to bisect the error I'm extracting out the first commit so it can hopefully land (I suspect the error is in the 2nd-3rd commits.)

r? @petrochenkov

(I'll r=you when the PR builder is happy)
2019-10-14 07:36:58 +02:00
Mazdak Farrokhzad
2800bc240e
Rollup merge of #65363 - Centril:less-pprust, r=Mark-Simulacrum
Remove implicit dependencies on syntax::pprust

Part of https://github.com/rust-lang/rust/pull/65324.

The main goal here is to facilitate the eventual move of pprust out from libsyntax and because an AST definition typically should not depend on its pretty printer.

r? @estebank
2019-10-14 07:36:57 +02:00
Mazdak Farrokhzad
66e428824b
Rollup merge of #65362 - Centril:extract_fun, r=petrochenkov
syntax: consolidate function parsing in item.rs

Extracted from https://github.com/rust-lang/rust/pull/65324.

r? @estebank
2019-10-14 07:36:55 +02:00
Mazdak Farrokhzad
c2ae4ded4d
Rollup merge of #65292 - JohnTitor:add-backticks, r=varkor,Centril
Print lifetimes with backticks

Fixes #65287

r? @varkor
2019-10-14 07:36:54 +02:00
Mazdak Farrokhzad
1ac00287af
Rollup merge of #65215 - JohnTitor:long-explanation-e0697, r=GuillaumeGomez
Add long error explanation for E0697

Part of #61137

r? @GuillaumeGomez
2019-10-14 07:36:52 +02:00
Esteban Küber
4bb771615e Bring attention to suggestions when the only difference is capitalization 2019-10-13 21:48:39 -07:00
Yuki Okushi
f6e01e8d40 Add test for issue-48638 2019-10-14 11:56:30 +09:00
Yuki Okushi
88a495cdcf Add test for issue-48027 2019-10-14 10:47:14 +09:00
Yuki Okushi
f653db92d6 Add test for issue-48010 2019-10-14 10:46:58 +09:00
Yuki Okushi
6323180b4a Add test for issue-47486 2019-10-14 10:45:56 +09:00
bors
d28a9c38fe Auto merge of #65240 - michaelwoerister:sp-review-3, r=Mark-Simulacrum
self-profiling: Add events for metadata loading (plus a small dep-tracking optimization)

This PR
- adds self-profiling events related to loading things from crate metadata
- makes the compiler cache the `DepNodeIndex` of upstream crates, so that they don't have to be looked up over and over.

The commits are best reviewed in isolation.

Self-profiling tracking issue: https://github.com/rust-lang/rust/issues/58967

r? @Mark-Simulacrum
cc @wesleywiser
2019-10-14 01:45:26 +00:00
Yuki Okushi
5c8fdc1954 Add test for issue-44153 2019-10-14 10:45:25 +09:00
Dylan MacKenzie
c08a871338 Add regression test for #65348 2019-10-13 16:00:49 -07:00
Nicholas Nethercote
18b48bf4b9 Lazify some mac_placeholder() calls.
This avoids some unnecessary creation of empty token streams.
2019-10-14 09:19:40 +11:00
Nicholas Nethercote
1ce0347fd4 Use TokenStream::default() in more places. 2019-10-14 09:19:31 +11:00
Nicholas Nethercote
5c93492da9 Remove the Option in TokenStream.
It means an allocation is required to create an empty `TokenStream`, but
all other operations are simpler and marginally faster due to not having
to check for `None`. Overall it simplifies the code for a negligible
performance effect.

The commit also removes `TokenStream::empty` by implementing `Default`,
which is now possible.
2019-10-14 09:14:39 +11:00
Dylan MacKenzie
8fd16baa57 Remove special case for zero-sized arrays from indirectly mut locals 2019-10-13 14:39:57 -07:00
Dylan MacKenzie
061b906683 Return false from needs_drop for all zero-sized arrays 2019-10-13 14:39:57 -07:00
bors
36d4506cc6 Auto merge of #65342 - Mark-Simulacrum:revert-rustc-dev, r=pietroalbini
Revert "Auto merge of #64823 - cuviper:min-std, r=Mark-Simulacrum"

This reverts commit 000d90b11f7be70ffb7812680f7abc6deb52ec88, reversing
changes made to 898f36c83cc28d7921a1d7b3605323dc5cfcf533.

This turned out to break quite a few targets, cc https://github.com/rust-lang/rust/issues/65335
2019-10-13 21:35:39 +00:00
Mazdak Farrokhzad
07e946caf7 lowering: connect to parser via function pointer instead 2019-10-13 23:27:18 +02:00
Mazdak Farrokhzad
1899432867 lowering: don't rely on parser directly. 2019-10-13 22:51:18 +02:00
Matthew Jasper
a9752596d3 Add more tests for underscore imports 2019-10-13 21:37:26 +01:00
Guillaume Gomez
9f392c43dc Update ui tests 2019-10-13 22:10:03 +02:00
Guillaume Gomez
6a64e9ca49 Add long error explanation for E0574 2019-10-13 22:10:03 +02:00
Mazdak Farrokhzad
42f32f06d6 token: extract Nonterminal::to_tokenstream to parser. 2019-10-13 20:13:18 +02:00
bors
c27f7568bc Auto merge of #65388 - Centril:rollup-rhg0dvs, r=Centril
Rollup of 10 pull requests

Successful merges:

 - #65214 (Split non-CAS atomic support off into target_has_atomic_load_store)
 - #65246 (vxWorks: implement get_path() and get_mode() for File fmt::Debug)
 - #65312 (improve performance of signed saturating_mul)
 - #65336 (Fix typo in task::Waker)
 - #65346 (nounwind tests and cleanup)
 - #65347 (Fix #[unwind(abort)] with Rust ABI)
 - #65366 (Implement Error::source on IntoStringError + Remove superfluous cause impls)
 - #65369 (Don't discard value names when using address or memory sanitizer)
 - #65370 (Add `dyn` to `Any` documentation)
 - #65373 (Fix typo in docs for `Rc`)

Failed merges:

r? @ghost
2019-10-13 17:18:56 +00:00
Mazdak Farrokhzad
92b36ce4a7
Rollup merge of #65373 - kalabukdima:patch-1, r=jonas-schievink
Fix typo in docs for `Rc`

r? @czipperz
2019-10-13 19:17:17 +02:00
Mazdak Farrokhzad
ecfcb4cf93
Rollup merge of #65370 - Cerberuser:patch-1, r=jonas-schievink
Add `dyn` to `Any` documentation

I noticed that in documentation to `Any` trait the old trait object syntax is used, which could be confusing for newcomers, since we generally recommend using `dyn Trait` instead of just `Trait`. This PR changes the documentation comment, so that it uses `&dyn Any`, `&mut dyn Any` and `Box<dyn Any>`, correspondingly.
2019-10-13 19:17:15 +02:00
Mazdak Farrokhzad
77f685390c
Rollup merge of #65369 - tmiasko:sanitizers-keep-names, r=varkor
Don't discard value names when using address or memory sanitizer

The value names are used when reporting issues found by address
sanitizer or memory sanitizer. Avoid discarding names when those
sanitizers are enabled, unless explicitly requested to do otherwise.
2019-10-13 19:17:14 +02:00
Mazdak Farrokhzad
8f8954e671
Rollup merge of #65366 - faern:source-on-intostringerror, r=bluss
Implement Error::source on IntoStringError + Remove superfluous cause impls

IntoStringError only implemented `Error::cause`, which is deprecated. This implemements `Error::source` instead.
`Error::cause` will still work as before, thanks to the default implementation.

I think this was the only/last `Error` impl in the standard library to have a cause, but not a source.
2019-10-13 19:17:12 +02:00
Mazdak Farrokhzad
d3cbf576da
Rollup merge of #65347 - RalfJung:unwind-abort-rust, r=varkor
Fix #[unwind(abort)] with Rust ABI

Fixes #63883.
2019-10-13 19:17:11 +02:00
Mazdak Farrokhzad
4f8214cf2f
Rollup merge of #65346 - RalfJung:nounwind-tests, r=nagisa
nounwind tests and cleanup

This is a follow-up to @pnkfelix' https://github.com/rust-lang/rust/pull/65020. In particular it adds some tests as @nagisa  asked. It also does a cleanup that the original PR omitted to reduce backporting risks.

I hope I finally managed to write an uncontroversial PR in this area. ;) This should not change any behavior, just test it better.
2019-10-13 19:17:10 +02:00
Mazdak Farrokhzad
d10702b577
Rollup merge of #65336 - BO41:typo, r=petrochenkov
Fix typo in task::Waker

fixes  #65323

in `libstd/error.rs` there are a few mentions of `trait@Send` and `trait@Sync`. Are they wrong as well?
2019-10-13 19:17:08 +02:00
Mazdak Farrokhzad
f0f5e779bc
Rollup merge of #65312 - tspiteri:signed-sat-mul, r=dtolnay
improve performance of signed saturating_mul

Reciprocal throughput is improved from 2.3 to 1.7. https://godbolt.org/z/ROMiX6

Fixes #65309.
2019-10-13 19:17:07 +02:00
Mazdak Farrokhzad
2a9c791076
Rollup merge of #65246 - Wind-River:real_master_2, r=kennytm
vxWorks: implement get_path() and get_mode() for File fmt::Debug
2019-10-13 19:17:06 +02:00
Mazdak Farrokhzad
7c20a8ddb8
Rollup merge of #65214 - Amanieu:cfg_atomic, r=alexcrichton
Split non-CAS atomic support off into target_has_atomic_load_store

This PR implements my proposed changes in https://github.com/rust-lang/rust/issues/32976#issuecomment-518542029 by removing `target_has_atomic = "cas"` and splitting `target_has_atomic` into two separate `cfg`s:

* `target_has_atomic = 8/16/32/64/128`: This indicates the largest width that the target can atomically CAS (which implies support for all atomic operations).
* ` target_has_atomic_load_store = 8/16/32/64/128`: This indicates the largest width that the target can support loading or storing atomically (but may not support CAS).

cc #32976

r? @alexcrichton
2019-10-13 19:17:04 +02:00
Mazdak Farrokhzad
9d766ed593 refactor session::config::build_session_options_and_crate_config 2019-10-13 18:49:15 +02:00
kalabukdima
e67fa776ee
Fix typo in docs for Rc 2019-10-13 15:46:28 +03:00
bjorn3
f0e2fc7623 Improve type safety 2019-10-13 14:43:58 +02:00
bjorn3
ea60335c28 Add top level provide/provide_extern to cg_ssa and cg_utils 2019-10-13 14:43:58 +02:00
bjorn3
bcb01bca86 Remove MiscMethods::instances 2019-10-13 14:43:57 +02:00
bjorn3
dad8ddbfdd Inline functions from cg_ssa::callee and remove the mod
Fixes #65271
2019-10-13 14:42:59 +02:00
bjorn3
f1ed3a8786 s/FuncId/Function 2019-10-13 14:35:14 +02:00