Simon Sapin
c09b9f9372
Deprecate the AsciiExt trait in favor of inherent methods
...
The trait and some of its methods are stable and will remain.
Some of the newer methods are unstable and can be removed later.
Fixes https://github.com/rust-lang/rust/issues/39658
2018-03-21 17:54:33 +01:00
bors
cc34ca1c97
Auto merge of #48818 - michaelwoerister:issue-47309, r=eddyb
...
Properly handle collecting default impls of methods with lifetime parameters.
r? @eddyb
Fixes #47309 .
2018-03-16 11:13:13 +00:00
bors
5f3996c3ec
Auto merge of #48813 - sinkuu:build_in_assert_macro, r=alexcrichton
...
Make `assert` a built-in procedural macro
Makes `assert` macro a built-in one without touching its functionality. This is a prerequisite for RFC 2011 (#44838 ).
2018-03-16 08:22:11 +00:00
bors
a7170b0412
Auto merge of #48524 - abonander:check-macro-stability, r=petrochenkov
...
check stability of macro invocations
I haven't implemented tests yet but this should be a pretty solid prototype. I think as-implemented it will also stability-check macro invocations in the same crate, dunno if we want that or not.
I don't know if we want this to go through `rustc::middle::stability` or not, considering the information there wouldn't be available at the time of macro expansion (even for external crates, right?).
r? @nrc
closes #34079
cc @petrochenkov @durka @jseyfried #38356
2018-03-16 02:46:23 +00:00
bors
36b6687318
Auto merge of #49051 - kennytm:rollup, r=kennytm
...
Rollup of 17 pull requests
- Successful merges: #48706 , #48875 , #48892 , #48922 , #48957 , #48959 , #48961 , #48965 , #49007 , #49024 , #49042 , #49050 , #48853 , #48990 , #49037 , #49049 , #48972
- Failed merges:
2018-03-16 00:09:14 +00:00
kennytm
a199fb2319
Rollup merge of #49037 - estebank:coherence-tweaks, r=nikomatsakis
...
Coherence diagnostic tweaks
2018-03-16 05:38:11 +08:00
kennytm
64490ff883
Rollup merge of #48990 - ExpHP:dont-drop-the-bomb, r=estebank
...
Fix ICE on malformed plugin attributes
See #48941 for some discussion.
This bug had several duplicate reports which were never closed as dupes:
Fixes #47612
Fixes #48387
Fixes #48941
Fixes #48982
2018-03-16 05:37:39 +08:00
kennytm
55a0075a20
Rollup merge of #49042 - kennytm:fix-e0307-typo, r=rkruppe
...
Remove unnecessary "`" in error message E0307 (invalid self type).
2018-03-16 05:35:20 +08:00
kennytm
5a7aa6cae5
Rollup merge of #49007 - estebank:follow-up-47574, r=oli-obk
...
Some tweaks to "type parameters from outer function" diagnostic
Follow up to #47574 .
2018-03-16 05:35:12 +08:00
Esteban Küber
4d5cd21a0d
Coherence diagnostic tweaks
2018-03-15 11:59:54 -07:00
kennytm
e1d19df9a5
Rollup merge of #48922 - petrochenkov:asunder, r=nikomatsakis
...
Implement import renaming with `_` (RFC 2166)
cc https://github.com/rust-lang/rust/issues/48216
2018-03-16 01:49:42 +08:00
kennytm
da88827267
Rollup merge of #48875 - jcowgill:mips-test-fixes, r=sanxiyn
...
MIPS testsuite fixes
This PR adjusts various bits in the testsuite so that more stuff passes on mips*.
2018-03-16 01:49:39 +08:00
kennytm
a45b79ddb7
Rollup merge of #48706 - ehuss:main-not-found-in-crate, r=estebank
...
Add crate name to "main function not found" error message.
Fixes #44798 and rust-lang/cargo#4948 .
I was wondering if it might be cleaner to update the ui tests to add a simple `fn main() {}` for the unrelated tests. Let me know if you would prefer that.
2018-03-16 01:49:38 +08:00
bors
3926453944
Auto merge of #47813 - kennytm:stable-incl-range, r=nrc
...
Stabilize inclusive range (`..=`)
Stabilize the followings:
* `inclusive_range` — The `std::ops::RangeInclusive` and `std::ops::RangeInclusiveTo` types, except its fields (tracked by #49022 separately).
* `inclusive_range_syntax` — The `a..=b` and `..=b` expression syntax
* `dotdoteq_in_patterns` — Using `a..=b` in a pattern
cc #28237
r? @rust-lang/lang
2018-03-15 16:00:40 +00:00
bors
ff2d506c2c
Auto merge of #48138 - estebank:issue-45092, r=nikomatsakis
...
Reword E0044 and message for `!Send` types
- Reword E0044 help.
- Change error message for types that don't implement `Send`
CC #45092 , #46678 , #24909 , #33307 .
2018-03-15 13:16:09 +00:00
Michael Woerister
5218c2d5ef
Properly handle collecting default impls of methods with lifetime parameters.
2018-03-15 13:37:46 +01:00
kennytm
b6ec75fe62
Remove unnecessary "`" in error message E0307 (invalid self type).
2018-03-15 17:59:17 +08:00
kennytm
6399d16cfd
Disallow &a..=b and box a..=b in pattern.
...
They are disallowed because they have different precedence than
expressions. I assume parenthesis in pattern will be soon stabilized and
thus write that as suggestion directly.
2018-03-15 16:58:03 +08:00
kennytm
a4d80336c9
Stabilize dotdoteq_in_patterns language feature.
...
Stabilize `match 2 { 1..=3 => {} }`.
2018-03-15 16:58:02 +08:00
kennytm
92d1f8d8e4
Stabilize inclusive_range_syntax language feature.
...
Stabilize the syntax `a..=b` and `..=b`.
2018-03-15 16:58:02 +08:00
kennytm
b5913f2e76
Stabilize inclusive_range library feature.
...
Stabilize std::ops::RangeInclusive and std::ops::RangeInclusiveTo.
2018-03-15 16:58:01 +08:00
bors
a4af6f089b
Auto merge of #48648 - snf:fallible_allocation, r=Kimundi
...
Fallible allocation
Implementing RFC#2116 [Fallible Allocation](https://github.com/rust-lang/rust/issues/48043 ) .
Work in progress. Initially adding @Gankro's try_reserve for Vec.
2018-03-15 08:18:58 +00:00
Esteban Küber
1bbd4fd395
Add span label to E0044
2018-03-14 19:14:30 -07:00
Esteban Küber
bfc66daef9
Review comment: remove mention of move closure
2018-03-14 18:05:55 -07:00
Esteban Küber
cb5667eaa5
Make hint clearer, with the potential of being wrong
2018-03-14 18:04:21 -07:00
Esteban Küber
fe1975448c
Suggest using move when trying to share ...::channel::{Receiver, Sender}
...
Extend `rustc_on_unimplemented` to match on ADT without evaluating type
arguments.
2018-03-14 18:04:20 -07:00
Esteban Küber
6d8a173980
Reword E0044 and message for !Send types
...
- Reword E0044 help.
- Change error message for types that don't implement `Send`
2018-03-14 18:04:20 -07:00
bors
5ebf74851d
Auto merge of #47630 - canndrew:exhaustive-patterns, r=nikomatsakis
...
Stabilise feature(never_type). Introduce feature(exhaustive_patterns)
This stabilizes `!`, removing the feature gate as well as the old defaulting-to-`()` behavior. The pattern exhaustiveness checks which were covered by `feature(never_type)` have been moved behind a new `feature(exhaustive_patterns)` gate.
2018-03-14 23:43:04 +00:00
Eric Huss
5257275294
Update E0601 test for new message format.
2018-03-14 13:04:24 -07:00
Esteban Küber
16d424f147
Some tweaks to "type parameters from outer function" diagnostic
...
Follow up to #47574 .
2018-03-14 12:35:25 -07:00
Eric Huss
2f1b34cc15
Add backticks to main not found errors.
2018-03-14 12:23:29 -07:00
Eric Huss
b08e6d305f
Add suggestion where to add main function.
2018-03-14 12:23:29 -07:00
Eric Huss
6aa4dcb9cf
Add empty main() to tests where it is missing.
2018-03-14 12:23:28 -07:00
Eric Huss
b4b7ccbd1c
Add crate name to "main function not found" error message.
...
Fixes #44798 and rust-lang/cargo#4948 .
2018-03-14 11:40:13 -07:00
kennytm
4074bafcf1
Rollup merge of #48988 - bobtwinkles:add_48070_test, r=nikomatsakis
...
Add a test for #48070
Resolves #48070 .
The bug itself was fixed by #48770 , but that PR didn't add a test for it.
r? @nikomatsakis
2018-03-15 00:15:52 +08:00
John Kåre Alsaker
cbdf4ec03e
Remove syntax and syntax_pos thread locals
2018-03-14 11:56:01 +01:00
snf
06057d9143
try_reserve: updating message for feature-gate-try_reserve.stderr
2018-03-14 03:48:42 -07:00
snf
92bfcd2b19
implementing fallible allocation API (try_reserve) for Vec, String and HashMap
2018-03-14 03:48:42 -07:00
Vadim Petrochenkov
12ac032c72
Implement import renaming with _ (RFC 2166)
2018-03-14 12:32:53 +03:00
Shotaro Yamada
4a254c0050
Escape stringified expression
...
Payload of `Literal` token must be escaped.
Also print printable non-ASCII characters.
2018-03-14 18:11:42 +09:00
Andrew Cann
a8a0c69191
fix ui test error again
2018-03-14 13:31:02 +08:00
Andrew Cann
b1526ca384
Fixes after rebase
2018-03-14 12:45:14 +08:00
Andrew Cann
5b32211e62
Add note about fallback to !: !Trait error
2018-03-14 12:44:52 +08:00
Andrew Cann
5a6b781266
really actually fix ui test error for real
2018-03-14 12:44:52 +08:00
Andrew Cann
b4f1081af1
really fix ui test errors for real
2018-03-14 12:44:52 +08:00
Andrew Cann
04cad56915
really fix ui test errors
2018-03-14 12:44:51 +08:00
Andrew Cann
edb9d2b20d
Fix ui test errors
2018-03-14 12:44:51 +08:00
Andrew Cann
59688e119e
Make coerce_never lint an error
...
Remove the coerce_never lint and make the behaviour an error.
2018-03-14 12:44:51 +08:00
Andrew Cann
a9fc3901b0
stabilise feature(never_type)
...
Replace feature(never_type) with feature(exhaustive_patterns).
feature(exhaustive_patterns) only covers the pattern-exhaustives checks
that used to be covered by feature(never_type)
2018-03-14 12:44:51 +08:00
Andrew Cann
9b15ddb29e
remove defaulting to unit
...
Types will no longer default to `()`, instead always defaulting to `!`.
This disables the associated warning and removes the flag from TyTuple
2018-03-14 12:44:51 +08:00