Commit Graph

91356 Commits

Author SHA1 Message Date
Saleem Jaffer
fb93f10dac code review fixes 2019-03-24 08:59:11 +05:30
bors
93f5ba0ee5 Auto merge of #59084 - estebank:diagnostic-spans, r=davidtwco
Tweak some diagnostic spans
2019-03-23 22:26:11 +00:00
Esteban Küber
59f0f2edc1 Fix span after rebase 2019-03-23 14:10:39 -07:00
Esteban Küber
81394ce9ae Fix rebase 2019-03-23 13:05:30 -07:00
Esteban Küber
0a4ecf3438 Mark duplicate import removal suggestion tool only 2019-03-23 13:05:30 -07:00
Esteban Küber
ce90db1ff1 Deduplicate const eval error spans for better output 2019-03-23 13:05:30 -07:00
Esteban Küber
44730271f7 Hide obvious suggestion from cli output 2019-03-23 13:05:30 -07:00
Esteban Küber
3211f38828 Tweak unnecessary import suggestion 2019-03-23 13:05:30 -07:00
Esteban Küber
9bfb0ef818 Tweak unsupported negative trait bounds message 2019-03-23 13:05:30 -07:00
Esteban Küber
e1be8b0318 Swap primary/secondary spans for E0458 2019-03-23 13:05:30 -07:00
Esteban Küber
8e043950c8 Swap const evaluation lint spans to point at problem in primary span 2019-03-23 13:05:30 -07:00
Esteban Küber
1b0ab0b8a9 Tweak spans for E0599 2019-03-23 13:05:29 -07:00
bors
0633c55d20 Auto merge of #59068 - ljedrz:kill_off_NodeId_stragglers, r=Zoxc
HirIdification: kill off NodeId stragglers

The final stages of HirIdification (#57578).

This PR, along with https://github.com/rust-lang/rust/pull/59042, should finalize the HirIdification process (at least the more straightforward bits).

- replace `NodeId` with `HirId` in `trait_impls`
- remove all `NodeId`s from `borrowck`
- remove all `NodeId`s from `typeck`
- remove all `NodeId`s from `mir`
- remove `trait_auto_impl` (unused)

I would be cool to also remove `NodeId` from `hir::def::Def`, `middle::privacy::AccessLevel`  and `hir::ItemId`, but I don't know if this is feasible.

I'll be happy to do more if I've missed anything.
2019-03-23 17:34:18 +00:00
Saleem Jaffer
752544b284 adding mir::StaticKind enum for static and promoted 2019-03-23 20:18:52 +05:30
Vadim Petrochenkov
4b382946e4 syntax: Remove warning for unnecessary path disambiguators 2019-03-23 17:20:11 +03:00
Guillaume Gomez
befe9cac91 Add test 2019-03-23 14:44:20 +01:00
Guillaume Gomez
dc628b4f67 cleanup 2019-03-23 14:43:27 +01:00
varkor
5032643538 Use if let instead of match 2019-03-23 13:05:36 +00:00
bors
0f118f6a6c Auto merge of #59096 - ljedrz:HirIdify_AccessLevel, r=Zoxc
middle: replace NodeId with HirId in AccessLevels

Pushing the limits of HirIdification (#57578).

Replaces `NodeId` with `HirId` in `middle::privacy::AccessLevels`. Actually this time I was more successful and cracked it; I probably tried to HirIdify too much at once when I attempted it last time ^^.

r? @Zoxc
2019-03-23 12:21:27 +00:00
bors
d51a437e28 Auto merge of #59058 - petrochenkov:assocrecov3, r=estebank
syntax: Better recovery for `$ty::AssocItem` and `ty!()::AssocItem`

This PR improves on https://github.com/rust-lang/rust/pull/46788 covering a few missing cases.

Fixes https://github.com/rust-lang/rust/issues/52307
Fixes https://github.com/rust-lang/rust/issues/53776
r? @estebank
2019-03-23 05:51:16 +00:00
Esteban Küber
e929d19edc review comments 2019-03-22 21:54:19 -07:00
Esteban Küber
2f7b32091e extend on-unimplemented docs 2019-03-22 20:38:14 -07:00
Esteban Küber
ac3290e8d9 Add suggestion to use &*var when &str: From<String> is expected 2019-03-22 20:38:14 -07:00
Esteban Küber
57236324ee Add note to address check_match errors 2019-03-22 20:32:10 -07:00
Esteban Küber
afdc38da0a address review comments 2019-03-22 20:15:32 -07:00
Esteban Küber
c89872cb7d Do not track_errors in register_plugins 2019-03-22 20:15:32 -07:00
Esteban Küber
936dec8df3 Continue running after typeck_item_bodies has failed 2019-03-22 20:15:32 -07:00
Esteban Küber
d1808aa509 Remove track_errors from check_match 2019-03-22 20:15:32 -07:00
Esteban Küber
d72ef21ddd Reword type ascription note to reduce verbosity 2019-03-22 20:14:20 -07:00
Esteban Küber
44a086ef39 Review comment 2019-03-22 19:50:18 -07:00
Esteban Küber
81b876b6a3 Hide "type ascription is experimental error" unless it's the only one
In order to minimize the verbosity of common syntax errors that are parsed
as type ascription, hide the feature gate error unless there are no other
errors being emitted by the parser.
2019-03-22 19:50:18 -07:00
Esteban Küber
72a3089092 Only suggest let assignment for type ascription if we find an equals sign 2019-03-22 19:50:18 -07:00
Esteban Küber
b1a6c32660 Tweak labels 2019-03-22 19:50:18 -07:00
Esteban Küber
8ba1a97e37 Expand suggestions for type ascription parse errors 2019-03-22 19:50:18 -07:00
bors
f21dee2c61 Auto merge of #58929 - estebank:elide-object, r=zackmdavis
Elide object safety errors on non-existent trait function

Fix #58734.

r? @zackmdavis
2019-03-23 02:40:15 +00:00
Samuel Holland
8d3dd39d88 Correct minimum system LLVM version in tests
Since commit 9452a8dfa3, the new debug info format is only generated
for LLVM 8 and newer versions. However, the tests still assume that LLVM
7 will use the new debug info format. Fix the tests (and a comment in
the code) to match the actual version check.
2019-03-22 21:28:25 -05:00
Linus Färnstrand
1ccad16231 Update sys::time impls to have checked_sub_instant 2019-03-22 23:56:40 +01:00
Linus Färnstrand
d56b1fd0e7 Make duration_since use checked_duration_since 2019-03-22 22:53:07 +01:00
Linus Färnstrand
37cfeb2710 Add/rename checked_duration_since tests 2019-03-22 22:53:07 +01:00
bors
9f91bee03f Auto merge of #59370 - Centril:rollup, r=Centril
Rollup of 18 pull requests

Successful merges:

 - #59106 (Add peer_addr function to UdpSocket)
 - #59170 (Add const generics to rustdoc)
 - #59172 (Update and clean up several parts of CONTRIBUTING.md)
 - #59190 (consistent naming for Rhs type parameter in libcore/ops)
 - #59236 (Rename miri component to miri-preview)
 - #59266 (Do not complain about non-existing fields after parse recovery)
 - #59273 (some small HIR doc improvements)
 - #59291 (Make Option<ThreadId> no larger than ThreadId, with NonZeroU64)
 - #59297 (convert field/method confusion help to suggestions)
 - #59304 (Move some bench tests back from libtest)
 - #59309 (Add messages for different verbosity levels. Output copy actions.)
 - #59321 (Unify E0109, E0110 and E0111)
 - #59322 (Tweak incorrect escaped char diagnostic)
 - #59323 (use suggestions for "enum instead of variant" error)
 - #59327 (Add NAN test to docs)
 - #59329 (cleanup: Remove compile-fail-fulldeps directory again)
 - #59347 (Move one test from run-make-fulldeps to ui)
 - #59360 (Add tracking issue number for `seek_convenience`)

Failed merges:

r? @ghost
2019-03-22 21:00:07 +00:00
Andy Russell
b34a71b7da
add suggestions to trim_{left,right} deprecations 2019-03-22 14:56:08 -04:00
Mazdak Farrokhzad
cf8c73936d
Rollup merge of #59360 - LukasKalbertodt:patch-2, r=rkruppe
Add tracking issue number for `seek_convenience`

We forgot to do that in #58422
2019-03-22 19:31:41 +01:00
Mazdak Farrokhzad
4be19e36d9
Rollup merge of #59347 - petrochenkov:nomake, r=davidtwco
Move one test from run-make-fulldeps to ui

The test was written when `--extern` without path didn't exist.
2019-03-22 19:31:40 +01:00
Mazdak Farrokhzad
aae75cf4e1
Rollup merge of #59329 - petrochenkov:rmcff, r=alexcrichton
cleanup: Remove compile-fail-fulldeps directory again

It was already removed once in https://github.com/rust-lang/rust/pull/56444, but was partially resurrected by rebase of some other PR.
2019-03-22 19:31:38 +01:00
Mazdak Farrokhzad
9943a447c1
Rollup merge of #59327 - Xaeroxe:clamp-doc, r=scottmcm
Add NAN test to docs

Documents and tests NAN behavior for the new (f32, f64)::clamp function.
2019-03-22 19:31:37 +01:00
Mazdak Farrokhzad
de08d0ec2d
Rollup merge of #59323 - euclio:enum-instead-of-variant, r=varkor
use suggestions for "enum instead of variant" error
2019-03-22 19:31:36 +01:00
Mazdak Farrokhzad
9d33d6fa4b
Rollup merge of #59322 - estebank:diag-tweak, r=davidtwco
Tweak incorrect escaped char diagnostic
2019-03-22 19:31:34 +01:00
Mazdak Farrokhzad
11429b2d13
Rollup merge of #59321 - varkor:unify-E0109-E0110-E0111, r=davidtwco
Unify E0109, E0110 and E0111

Error messages should no longer be restricted to specific generic kinds.
2019-03-22 19:31:33 +01:00
Mazdak Farrokhzad
f1f34707ae
Rollup merge of #59309 - o01eg:verbose-copy-files, r=alexcrichton
Add messages for different verbosity levels. Output copy actions.
2019-03-22 19:31:31 +01:00
Mazdak Farrokhzad
8a36f76735
Rollup merge of #59304 - gnzlbg:bench_tests, r=alexcrichton
Move some bench tests back from libtest

It doesn't make much sense to test these on rust-lang/libtest since they exercise the `#[bench]` macro which is part of rust-lang/rust.

This PR moves these tests back here.

r? @alexcrichton
2019-03-22 19:31:30 +01:00