1482 Commits

Author SHA1 Message Date
Yuki Okushi
82f2b37635 Add Option<Span> to require_lang_item 2019-08-28 07:11:12 +09:00
Kevin Per
e0ce9f8c0a Cleanup: Consistently use Param instead of Arg #62426 2019-08-27 14:07:41 +02:00
Oliver Scherer
181ed55e96 Simplify eager normalization of constants 2019-08-23 00:48:52 +02:00
Esteban Küber
1808e4da68 review comments 2019-08-19 12:24:06 -07:00
Esteban Küber
94ee54c425 Use constraint span when lowering associated types 2019-08-19 11:50:34 -07:00
bors
a807902dd6 Auto merge of #63463 - matthewjasper:ty_param_cleanup, r=petrochenkov
Don't special case the `Self` parameter by name

This results in a couple of small diagnostic regressions. They could be avoided by keeping the special case just for diagnostics, but that seems worse.

closes #50125
cc #60869
2019-08-19 01:31:35 +00:00
Matthew Jasper
24587d20df Pre intern the Self parameter type
Use this to simplify the object safety code a bit.
2019-08-18 19:25:12 +01:00
Vadim Petrochenkov
136db2235a hygiene: ExpnInfo -> ExpnData
For naming consistency with everything else in this area
2019-08-15 20:41:45 +03:00
Vadim Petrochenkov
73dee258c1 hygiene: Remove Options from functions returning ExpnInfo
The expansion info is not optional and should always exist
2019-08-15 20:39:27 +03:00
Vadim Petrochenkov
6cb28b6617 Ident::with_empty_ctxt -> Ident::with_dummy_span
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.
2019-08-15 20:39:26 +03:00
Matthew Jasper
2f6babbc6d Remove is_self and has_self_ty methods 2019-08-11 15:00:42 +01:00
Ilija Tovilo
3a6a29b4ec
Use associated_type_bounds where applicable - closes #61738 2019-08-08 22:39:15 +02:00
Mazdak Farrokhzad
61da2f4d19
Rollup merge of #63264 - arielb1:revert-private-coherence-errors, r=estebank
Revert "Rollup merge of #62696 - chocol4te:fix_#62194, r=estebank"

This reverts commit df21a6f040a7011d509769a61ac7af9502636b33 (#62696), reversing
changes made to cc16d0486933e02237190366de2eb43df2215c11.

That PR makes error messages worse than before, and we couldn't come up with a way of actually making them better, so revert it for now. Any idea for making this error message better is welcome!

Fixes #63145.

r? @estebank
2019-08-06 08:17:41 +02:00
Oliver Scherer
7710820d18 Fiddle param env through to try_eval_bits in most places 2019-08-05 17:48:05 +02:00
Oliver Scherer
9b87d22ea8 Don't abort on unevaluated constants without at least tryting to eval them 2019-08-05 17:48:04 +02:00
Ariel Ben-Yehuda
95f29aa81b Revert "Rollup merge of #62696 - chocol4te:fix_#62194, r=estebank"
This reverts commit df21a6f040a7011d509769a61ac7af9502636b33, reversing
changes made to cc16d0486933e02237190366de2eb43df2215c11.
2019-08-04 19:52:43 +03:00
bors
d7270712cb Auto merge of #63180 - varkor:trait-alias-impl-trait, r=Centril
Change opaque type syntax from `existential type` to type alias `impl Trait`

This implements a new feature gate `type_alias_impl_trait` (this is slightly different from the originally proposed feature name, but matches what has been used in discussion since), deprecating the old `existential_types` feature.

The syntax for opaque types has been changed. In addition, the "existential" terminology has been replaced with "opaque", as per previous discussion and the RFC.

This makes partial progress towards implementing https://github.com/rust-lang/rust/issues/63063.

r? @Centril
2019-08-03 02:21:23 +00:00
varkor
c28ce3e4ca Replace "existential" by "opaque" 2019-08-02 02:44:36 +01:00
Bruce Mitchener
86633b6389 Fix typos in doc comments. 2019-08-02 01:36:36 +07:00
Steven Fackler
91fa898975 Stabilize the type_name intrinsic in core::any
Closes rust-lang/rfcs#1428
2019-07-24 21:35:49 -07:00
Samy Kacimi
66815c613a
normalize use of backticks for compiler messages in remaining modules
https://github.com/rust-lang/rust/issues/60532
2019-07-23 23:09:59 +02:00
Ferdia McKeogh
3c11944376
Suggested change 2019-07-16 07:53:30 +02:00
Ferdia McKeogh
2ced474e80
Check that trait is exported or public before adding intercrate ambiguity hint 2019-07-16 07:53:30 +02:00
Vadim Petrochenkov
dcd30a4b17 hygiene: Fix wording of desugaring descriptions
Use variant names rather than descriptions for identifying desugarings in `#[rustc_on_unimplemented]`.
Both are highly unstable, but variant name is at least a single identifier.
2019-07-11 00:12:57 +03:00
Vadim Petrochenkov
3eafaae510 syntax: Make def-site span mandatory in ExpnInfo/MacroBacktrace/DiagnosticSpanMacroExpansion
We have to deal with dummy spans anyway

Remove def-site span from expander interfaces.
It's not used by the expansion infra, only by specific expanders, which can keep it themselves if they want it.
2019-07-11 00:12:07 +03:00
Vadim Petrochenkov
16918a8e28 Rename some things in syntax_pos/hygiene
More consistent with other naming:
ExpnFormat -> ExpnKind
ExpnKind::name -> ExpnKind::descr
DesugaringKind::name -> DesugaringKind::descr

Shorter, no tautology:
CompilerDesugaring -> Desugaring
CompilerDesugaringKind -> DesugaringKind
2019-07-11 00:12:07 +03:00
Jeremy Stucki
d28832dde9
Remove needless lifetimes 2019-07-03 10:01:02 +02:00
Jeremy Stucki
0477e07272
Remove needless lifetimes 2019-07-03 10:00:26 +02:00
Niko Matsakis
f933e0971b pass a &mut QueryRegionConstraints not just outlives constraints 2019-07-02 12:15:20 -04:00
Niko Matsakis
09bba9b89d introduce QueryRegionConstraints struct 2019-07-02 12:15:19 -04:00
Niko Matsakis
fd5f7673a7 rename QueryRegionConstraint to QueryOutlivesConstraint 2019-07-02 12:15:19 -04:00
John Kåre Alsaker
c9325181d6 Don't use lift to detect local types 2019-06-26 13:04:05 +02:00
ljedrz
f05cbc98f8 HIR: rename find_by_hir_id to find 2019-06-24 09:58:49 +02:00
ljedrz
d08bd72e97 HIR: rename get_parent_node_by_hir_id to get_parent_node 2019-06-24 09:46:38 +02:00
ljedrz
44109169a6 replace NodeId with HirId in traits::ObligationCauseCode 2019-06-20 12:47:25 +02:00
Eduard-Mihai Burtescu
673c3fc23a rustc: disallow cloning HIR nodes. 2019-06-19 21:16:08 +03:00
Mazdak Farrokhzad
de8066f73f
Rollup merge of #61842 - Zoxc:trim-lift, r=eddyb
Remove unnecessary lift calls

Note that some of these might be useful for sanity checking that there's no infer types or regions.

r? @eddyb
2019-06-19 01:52:06 +02:00
Eduard-Mihai Burtescu
4c4fc7512e rustc: reintroduce lifetime bounds where necessary. 2019-06-18 18:10:26 +03:00
Eduard-Mihai Burtescu
356a37d8d1 rustc: remove unused lifetimes. 2019-06-18 18:10:26 +03:00
Eduard-Mihai Burtescu
1d0cb40908 rustc: remove leftover lifetimes with no bounds from where clauses. 2019-06-18 18:10:25 +03:00
Eduard-Mihai Burtescu
b25b466a88 rustc: remove 'x: 'y bounds (except from comments/strings). 2019-06-18 18:10:21 +03:00
ljedrz
d996c4d5a3 remove _by_hir_id if there is no NodeId counterpart 2019-06-17 18:57:21 +02:00
ljedrz
61964d9732 replace some uses of NodeId with HirId 2019-06-17 18:57:20 +02:00
bors
e3175c34b4 Auto merge of #61754 - nikomatsakis:trait-caching-perf-3, r=pnkfelix
create a "provisional cache" to restore performance in the case of cycles

Introduce a "provisional cache" that caches the results of auto trait resolutions but keeps them from entering the *main* cache until everything is ready. This turned out a bit more complex than I hoped, but I don't see another short term fix -- happy to take suggestions! In the meantime, it's very clear we need to rework the trait solver. This resolves the extreme performance slowdown experienced in #60846 -- I plan to add a perf.rust-lang.org regression test to track this.

Caveat: I've not run `x.py test` in full yet.

r? @pnkfelix
cc @arielb1

Fixes #60846
2019-06-16 14:58:05 +00:00
John Kåre Alsaker
007aabae93 Remove unnecessary lift calls 2019-06-14 21:11:50 +02:00
Eduard-Mihai Burtescu
afc39bbf24 Run rustfmt --file-lines ... for changes from previous commits. 2019-06-14 18:58:32 +03:00
Eduard-Mihai Burtescu
f3f9d6dfd9 Unify all uses of 'gcx and 'tcx. 2019-06-14 18:58:23 +03:00
Niko Matsakis
cb8158d847 correctly set the reached_depth field 2019-06-12 17:55:10 -04:00
Niko Matsakis
59f5045a16 add more debug logs 2019-06-12 13:56:29 -04:00
Niko Matsakis
9639d8ec34 add the "provisional cache" 2019-06-12 13:56:29 -04:00