Commit Graph

230 Commits

Author SHA1 Message Date
Mazdak Farrokhzad 2c3e5d3de0 - remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}
- remove syntax::{help!, span_help!, span_note!}
- remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!}
- lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints
- inline syntax::{struct_span_warn!, diagnostic_used!}
- stringify_error_code! -> error_code! & use it more.
- find_plugin_registrar: de-fatalize an error
- de-fatalize metadata errors
- move type_error_struct! to rustc_typeck
- struct_span_err! -> rustc_errors
2020-01-08 04:25:33 +01:00
Mazdak Farrokhzad ebfd8673a7 Remove rustc_hir reexports in rustc::hir. 2020-01-05 12:49:22 +01:00
Vadim Petrochenkov 70f1d57048 Rename `syntax_pos` to `rustc_span` in source code 2020-01-01 09:15:18 +03:00
Camille GILLOT 36f95ab3fa Fallout in other crates. 2019-12-27 19:20:28 +01:00
Mark Rousskov a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Mazdak Farrokhzad b50c3b7ddf
Rollup merge of #67160 - matthewjasper:gat-generics, r=nikomatsakis
Make GATs less ICE-prone.

After this PR simple lifetime-generic associated types can now be used in a compiling program. There are two big limitations:

* #30472 has not been addressed in any way (see src/test/ui/generic-associated-types/iterable.rs)
* Using type- and const-generic associated types errors because bound types and constants aren't handled by trait solving.
    * The errors are technically non-fatal, but they happen in a [part of the compiler](4abb0ad273/src/librustc_typeck/lib.rs (L298)) that fairly aggressively stops compiling on errors.

closes #47206
closes #49362
closes #62521
closes #63300
closes #64755
closes #67089
2019-12-21 19:07:31 +01:00
Mazdak Farrokhzad a7aec3f207 1. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.
2. mir::Mutability -> ast::Mutability.
2019-12-20 22:22:44 +01:00
Matthew Jasper db6d0b1638 Check associated type implementations for generic mismatches 2019-12-20 20:10:07 +00:00
Guillaume Gomez 798e389e57 Update to use new librustc_error_codes library 2019-11-14 13:05:42 +01:00
Camille GILLOT ed640c6a27 Merge hir::Mutability into ast::Mutability. 2019-11-10 12:21:05 +01:00
Andy Russell ad550b8ef3
use American spelling for `pluralize!` 2019-11-05 15:10:24 -05:00
varkor c3d8791373 Rename `Ty.node` to `Ty.kind` 2019-09-26 18:21:10 +01:00
varkor d4573c9c1e Rename `TraitItem.node` to `TraitItem.kind` 2019-09-26 18:21:09 +01:00
varkor ce6aabbaa1 Rename `ImplItem.node` to `ImplItem.kind` 2019-09-26 18:21:09 +01:00
Mazdak Farrokhzad 10541584d1
Rollup merge of #64302 - nnethercote:shrink-ObligationCauseCode, r=zackmdavis
Shrink `ObligationCauseCode`

These commits reduce the size of `ObligationCauseCode` from 56 bytes to 32 bytes on 64-bit. This reduces instruction counts on various benchmarks by up to 1%, due to less `memcpy`ing.
2019-09-14 16:42:23 +02:00
Nicholas Nethercote 36b37e22de Remove two unnecessary `clone()` calls. 2019-09-09 09:43:23 +10:00
V1shvesh c255206581 Refactor Pluralisation
Modify files performing pluralisation checks to incorporate the
dedicated macro located in `syntax::errors`.
2019-09-08 15:09:50 +05:30
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
ljedrz d996c4d5a3 remove _by_hir_id if there is no NodeId counterpart 2019-06-17 18:57:21 +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
Eduard-Mihai Burtescu fff08cb043 Run `rustfmt --file-lines ...` for changes from previous commits. 2019-06-12 13:38:28 +03:00
Eduard-Mihai Burtescu 17cdd356da rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu 2441253508 Fix fallout from `deny(unused_lifetimes)`. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu 37799a5552 rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`. 2019-06-12 13:38:27 +03:00
Esteban Küber 31918d6eef review comments: use param kind type to identify impl Trait 2019-06-01 19:30:13 -07:00
Esteban Küber 0754c84611 Explain that `impl Trait` introduces an implicit type argument 2019-06-01 11:35:54 -07:00
Esteban Küber 28859472f7 Point at individual type arguments on arg count mismatch 2019-06-01 10:35:31 -07:00
Esteban Küber 8e595f5610 Make generics always have a valid span 2019-05-31 22:19:30 -07:00
Andrew Xu 46b9ed4fa1 Rename "Associated*" to "Assoc*"
We are going to uniform the terminology of all associated items.
Methods that may or may not have `self` are called "associated
functions". Because `AssociatedFn` is a bit long, we rename `Associated`
to `Assoc`.
2019-05-26 17:49:02 +08:00
Eduard-Mihai Burtescu ff174fe09e rustc: rename hir::def::Def to Res (short for "resolution"). 2019-05-03 22:50:19 +03:00
Eduard-Mihai Burtescu a3fcab36d2 rustc: factor most DefId-containing variants out of Def and into DefKind. 2019-05-03 22:48:27 +03:00
flip1995 6c272b78dc
Fix lint findings in librustc 2019-04-28 21:19:26 +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
kyren 8b1742ea6a Fix #54822 and associated faulty tests
Type checking associated constants can require trait bounds, but an empty
parameter environment was provided to the trait solver.  Providing an
appropriate parameter environment seems to fix #54822 and also make one of the
cases in src/test/ui/nll/trait-associated-constant.rs that should compile
successfully do so.  It also (slightly) improves the error message in
src/test/ui/associated-const/associated-const-generic-obligations.rs
2019-03-10 23:01:30 -04:00
ljedrz d7120e400d hir: remove some obsolete NodeId methods 2019-03-07 15:46:41 +01:00
ljedrz cd06038b54 HirIdification: replace NodeId method calls 2019-03-07 09:22:43 +01:00
varkor a8361eb6fa Refactor compare_method
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05 22:13:10 +00:00
ljedrz fa61c67fe6 hir: HirIdify Impl&TraitItemId 2019-03-02 07:48:53 +01:00
csmoe cf11729787 rename Substs to InternalSubsts
Change-Id: I3fa00e999a2ee4eb72db1fdf53a8633b49176a18
2019-02-27 00:39:13 +08:00
Mazdak Farrokhzad e8ce56f126 librustc_typeck: deny(elided_lifetimes_in_paths) 2019-02-25 09:13:22 +01:00
varkor 18ce997e51 Fix rebase issue 2019-02-15 23:34:04 +00:00
varkor 7f3c6d7c04 Take Const into account in HIR
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15 22:29:24 +00:00
ljedrz eac43ccda4 HirId-ify hir::BodyId 2019-02-13 09:54:58 +01:00
bors b244f61b77 Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnik
Cosmetic improvements to doc comments

This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase).

r? @steveklabnik

Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-12 19:09:24 +00:00
Alexander Regueiro c3e182cf43 rustc: doc comments 2019-02-10 23:42:32 +00:00
ljedrz 6da9129b36 typeck: partially HirIdify 2019-02-05 20:34:06 +01:00
Andy Russell 0897ffc28f
remove `_with_applicability` from suggestion fns 2019-01-26 23:07:55 -05:00
scalexm 50f8ae364b Add a def-id in `ty::ParamEnv` 2018-12-27 19:21:15 +01:00
Mark Rousskov 2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00