Vadim Petrochenkov
30d5dc9a0a
Do not encode gensymed imports in metadata
2019-03-19 22:50:46 +03:00
Mazdak Farrokhzad
8ebe2acb7b
Rollup merge of #59116 - estebank:comma-sugg, r=petrochenkov
...
Be more discerning on when to attempt suggesting a comma in a macro invocation
Fix #58796 .
2019-03-19 15:16:55 +01:00
Mazdak Farrokhzad
d4ef74b2da
Rollup merge of #57847 - clarcharr:dbg_no_params, r=Centril
...
dbg!() without parameters
Fixes #57845 .
2019-03-19 15:16:46 +01:00
Mazdak Farrokhzad
c1975dbd34
Rollup merge of #57729 - pnkfelix:issue-55748-pat-types-are-constraints-on-bindings-too, r=nikomatsakis
...
extra testing of how NLL handles wildcard type `_`
test that wildcard type `_` is not duplicated by `type Foo<X> = (X, X);` and potentially instantiated at different types when used in type ascriptions in let bindings.
(NLL's handling of this for the type ascription *expression form* is currently broken, or at least differs from what AST-borrowck does. I'll file a separate bug about that. Its not something critical to address since that expression is guarded by `#![feature(type_ascription)]`.)
cc #55748
2019-03-19 15:16:45 +01:00
bors
3bf064beaa
Auto merge of #56462 - Zoxc:query-macro, r=oli-obk
...
Define queries using a proc macro
cc @rust-lang/compiler
2019-03-18 21:24:12 +00:00
Andy Russell
a9108ebb76
filter suggestions from extern prelude
2019-03-18 11:13:15 -04:00
bors
cd45b19bd2
Auto merge of #58872 - rep-nop:diagnostic-fix-56031, r=petrochenkov
...
Adds help message in error for invalid `impl for T` syntax
Fixes #56031 .
2019-03-18 08:03:05 +00:00
John Kåre Alsaker
9e9d03fd66
Add load_cached query modifier and keep dep node names consistent with query names
2019-03-18 08:20:09 +01:00
John Kåre Alsaker
7d90547532
Define queries using a proc macro
2019-03-18 08:20:06 +01:00
Esteban Küber
6007e6f649
Do not complain about non-existing fields after parse recovery
...
When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.
2019-03-17 20:09:53 -07:00
bors
817d074e54
Auto merge of #59250 - bovinebuddha:filter_ui_revision_tests, r=petrochenkov
...
Filter ui revision tests
Updates UI test output filtering to also filter away test annotations for revisions:
Previously filtered: //~ ERROR [XXXX]
Now also filters: //[revision]~ ERROR [XXXX]
I reckon, if we have the one, we should have the other for consistency, its lack was probably an oversight (the existence of revision testing is not really well documented...)
2019-03-17 23:51:18 +00:00
bors
c82834e2b9
Auto merge of #58994 - oli-obk:deprecated_derive, r=petrochenkov
...
Hide deprecation warnings inside derive expansions
Fixes #58822
2019-03-17 20:49:55 +00:00
bors
f649c76e98
Auto merge of #59047 - petrochenkov:modnodefid, r=Centril
...
resolve: Account for new importable entities
Fixes the ICE encountered in https://github.com/rust-lang/rust/pull/58837
r? @Centril
2019-03-17 17:25:10 +00:00
Mathias Blikstad
704649d96d
Removed obsolete .stderr test outputs
2019-03-17 17:01:59 +01:00
Mathias Blikstad
faed3a2b19
Updated UI test output to remove test annotations for revisions
2019-03-17 17:00:18 +01:00
Esteban Küber
1aa43af370
parse full visibility when recovering
2019-03-16 17:47:57 -07:00
Esteban Küber
b2b9555f95
Recover from incorrect pub kw in "reasonable" places
2019-03-16 17:47:57 -07:00
Esteban Küber
532dd4475b
Recover from missing comma between enum variants
2019-03-16 17:47:00 -07:00
Oliver Scherer
a69e12c21b
Don't report deprecation lints in derive expansions
2019-03-16 22:33:15 +01:00
Vadim Petrochenkov
6ad55b3dec
syntax: Introduce Ident::can_be_raw
2019-03-16 23:13:15 +03:00
Vadim Petrochenkov
5cb5083909
syntax_ext: Validate #[proc_macro_derive] input better
...
Tweak some error wording
2019-03-16 23:13:15 +03:00
Vadim Petrochenkov
8371caf5ee
syntax: Do not accidentally treat multi-segment meta-items as single-segment
2019-03-16 23:13:15 +03:00
Vadim Petrochenkov
e2009ea5ff
Add tests for malformed input in #[proc_macro_derive]
2019-03-16 23:13:15 +03:00
Andy Russell
b392c5e3c1
use the identifier span for missing struct field
2019-03-16 13:14:01 -04:00
kennytm
524a7afcf2
Rollup merge of #59201 - lambda:remove-repr-simd-isize-usize-restriction, r=alexcrichton
...
Remove restriction on isize/usize in repr(simd)
As discussed in #55078 , there's no known reason for this restriction.
It's unlikely that repr(simd) will be stabilized in its current form, but
might as well remove some restrictions on it.
This removes the branch in `is_machine` which returns false for these types.
`is_machine` is only used for the repr(simd) type validation check.
2019-03-16 22:40:49 +08:00
kennytm
8601c79aff
Rollup merge of #59169 - tmandry:allow-features-flag, r=cramertj
...
Add `-Z allow_features=...` flag
Adds a compiler option to allow only whitelisted features.
For projects on nightly that want to prevent feature-creep (and maybe, someday, move off of nightly). Not being able to enforce this has been a problem on Fuchsia and at other big companies.
This doesn't support filtering edition feature flags, but someone is welcome to add that if they need it.
2019-03-16 22:40:33 +08:00
kennytm
bbe5f3d08b
Rollup merge of #59146 - estebank:suggest-return-lt, r=varkor
...
Suggest return lifetime when there's only one named lifetime
Fix #29094 .
2019-03-16 22:40:15 +08:00
kennytm
3bf4398ed2
Rollup merge of #59139 - oli-obk:unions_are_a_good_thing, r=RalfJung
...
Unregress using scalar unions in constants.
fixes https://github.com/rust-lang/rust/issues/59126
r? @RalfJung
I also made a bunch of these invariants panic instead of report an error.
2019-03-16 22:40:10 +08:00
kennytm
464478fbbb
Rollup merge of #59118 - seanmonstar:alias-where-self-ice, r=alexreg
...
rustc: fix ICE when trait alias has bare Self
Fixes https://github.com/rust-lang/rust/issues/59029
2019-03-16 22:40:07 +08:00
kennytm
6fbd55385d
Rollup merge of #59079 - euclio:macro-semi, r=estebank
...
add suggestions to invalid macro item error
r? @estebank
2019-03-16 22:39:49 +08:00
Vadim Petrochenkov
47ee538a28
resolve: Account for new importable entities
2019-03-16 16:08:05 +03:00
Grigorii Kargin
7f395d2b3a
fix tests
2019-03-16 02:56:26 +03:00
Esteban Küber
d7bb98f7a1
Elide object safety errors on non-existent trait function
...
Fix #58734 .
2019-03-15 13:26:30 -07:00
Brian Campbell
5303c1b90b
Remove restriction on isize/usize in repr(simd)
...
As discussed in #55078 , there's no known reason for this restriction.
It's unlikely that repr(simd) will be stabilized in its current form, but
might as well remove some restrictions on it.
This removes the branch in `is_machine` which returns false for these types.
`is_machine` is only used for the repr(simd) type validation check.
2019-03-15 09:42:02 -04:00
Eduard-Mihai Burtescu
22d6c55cdf
rustc: print ExistentialProjection with spaces around =, e.g. dyn Foo<A = X>.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
a54a41ce47
rustc: provide DisambiguatedDefPathData in ty::print.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
8619edede1
rustc: slice substs in ty::print instead of passing the full ones.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
4deaa69b42
rustc: print elided regions as '_ instead of nothing, and use a separate check when optional.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
72690d24f0
rustc: always hide defaulted generic args, even in verbose mode.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
a15bfc6f48
rustc: merge PrintCx::parameterized and def_path printing.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
e0c75ff40d
rustc: rename item_path to def_path (except the module in ty).
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
6ca6c1a6cc
rustc_mir: adjust the type_length_limit diagnostic to be more useful.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
3e1cef7007
rustc: pass Option<&Substs> and Namespace around in ty::item_path.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
329b8ca818
rustc: always rely on '_ to be not printed by ty::Region itself.
2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
1c2a3c5d79
rustc: support impl's in PrintCx::parameterized.
2019-03-15 09:26:13 +02:00
Esteban Küber
6cd6759cfc
Do not complain about unmentioned fields in recovered patterns
...
When the parser has to recover from malformed code in a pattern, do not
complain about missing fields.
2019-03-14 18:28:24 -07:00
Tyler Mandry
7c59ce9f5d
Add -Z allow_features=... flag
2019-03-14 15:42:20 -07:00
bors
0ad3207745
Auto merge of #59120 - alexreg:move-issue-tests-1, r=varkor
...
Moved issue tests to subdirs and normalised names
Consistency, decluttering, ease of navigation :-)
r? @Centril
2019-03-14 01:28:18 +00:00
Alexander Regueiro
fe30743c79
Moved issue tests to subdirs and normalised names.
2019-03-14 01:00:49 +00:00
Felix S. Klock II
4e5692d985
test that wildcard type _ is not duplicated by type Foo<X> = (X, X); and potentially instantiated at different types.
...
(Updated to reflect changes in diagnostic output and compiletest infrastructure.)
2019-03-13 21:58:49 +01:00