Commit Graph

237 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
John Kåre Alsaker 5a485ce4a3 Use self profile infrastructure for -Z time and -Z time-passes 2020-01-05 02:57:14 +01:00
Mark Rousskov a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Guillaume Gomez 798e389e57 Update to use new librustc_error_codes library 2019-11-14 13:05:42 +01:00
Mathias Blikstad ef5acdeceb RFC 2027: "first draft" of implementation
These are a squashed series of commits.
2019-10-22 15:24:33 -04:00
varkor e2e0f9af85 Rename `sty` to `kind` 2019-09-25 15:50:04 +01:00
ljedrz 37d7e1f22a rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-04 12:53:12 +02:00
Jeremy Stucki d50a3a7b86
Remove needless lifetimes 2019-07-03 10:01:01 +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
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
Eduard-Mihai Burtescu e0c75ff40d rustc: rename item_path to def_path (except the module in ty). 2019-03-15 13:25:10 +02:00
ljedrz 7e1914f75b hir: replace NodeId with HirId in trait_impls 2019-03-10 13:07:16 +01:00
John Kåre Alsaker 350f72fc67 Make wf checking parallel 2019-03-06 04:47:07 +01:00
Mazdak Farrokhzad e8ce56f126 librustc_typeck: deny(elided_lifetimes_in_paths) 2019-02-25 09:13:22 +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
Taiki Endo fe276239b3 librustc_typeck => 2018 2019-02-08 22:30:58 +09:00
John Kåre Alsaker 8d76060785 Add some time statements 2019-01-29 21:10:35 +01:00
John Kåre Alsaker 0c2bf6fe2a Add an ensure() method to TyCtxt used to ensure queries are run 2019-01-29 21:10:33 +01:00
Ariel Ben-Yehuda de6566ce39 forbid manually impl'ing one of an object type's marker traits
This shouldn't break compatibility for crates that do not use
`feature(optin_builtin_traits)`, because as the test shows, it is
only possible to impl a marker trait for a trait object in the crate the
marker trait is defined in, which must define
`feature(optin_builtin_traits)`.

Fixes #56934
2019-01-13 19:44:28 +02:00
Ariel Ben-Yehuda 3aa1503a61 add support for principal-less trait object types
should be a pure refactoring.
2019-01-04 00:34:52 +02:00
Mark Rousskov 2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Alexander Regueiro ee89c088b0 Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
John Kåre Alsaker a70babed03 Use a function to access the Hir map to be able to turn it into a query later 2018-12-06 17:24:36 +01:00
Oliver Scherer 78aaa3e546 Check the invariant for `principal` inside the method 2018-10-13 11:32:49 +02:00
ljedrz 608c395818 A few cleanups and minor improvements to typeck 2018-09-29 11:13:00 +02:00
Scott McMurray 7cee7eee72 Require that marker impls are empty, but allow them to overlap 2018-09-19 22:31:30 -07:00
varkor 6f637da50c Remove Ty prefix from Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error} 2018-08-22 16:07:44 +01:00
Donato Sciarra d3fe97f3d3 mv codemap() source_map() 2018-08-19 23:01:01 +02:00
Eduard-Mihai Burtescu 5a5c7ded0d rustc: rename ty::maps to ty::query. 2018-06-14 18:05:12 +03:00
Esteban Küber 4d5cd21a0d Coherence diagnostic tweaks 2018-03-15 11:59:54 -07:00
Michael Woerister 542bc75dea Turn features() into a query. 2018-03-05 11:05:01 +01:00
leonardo.yvens 3bb2ff05eb Move coherence/overlap.rs into coherence/mod.rs
`fn check_impl` was feeling lonely with a file all for itself.
2018-01-13 18:48:00 +03:00
leonardo.yvens f93183adb4 Remove `impl Foo for ..` in favor of `auto trait Foo`
No longer parse it.
Remove AutoTrait variant from AST and HIR.
Remove backwards compatibility lint.
Remove coherence checks, they make no sense for the new syntax.
Remove from rustdoc.
2018-01-13 18:48:00 +03:00
Michael Woerister 44a0522b18 incr.comp.: Use ensure() for some coherence-related queries. 2017-12-20 16:45:23 +01:00
leonardo.yvens 06506bb751 [Syntax Breaking] Rename DefaultImpl to AutoImpl
DefaultImpl is a highly confusing name for what we now call auto impls,
as in `impl Send for ..`. The name auto impl is not formally decided
but for sanity anything is better than `DefaultImpl` which refers
neither to `default impl` nor to `impl Default`.
2017-11-03 16:13:20 -02:00
Alex Crichton a2e2aba07d rustc: Migrate lang items to a query
This commit moves the calculation of the `LanguageItems` structure into a
query rather than being calculated before the `TyCtxt` exists, with the eventual
end goal of removing some `CrateStore` methods.
2017-09-05 07:37:57 -07:00
Michael Woerister 8da2fe8ed7 Remove interior mutability from TraitDef by turning fields into queries. 2017-05-15 15:28:28 +02:00
Oliver Schneider dd87eabd83 Remove need for &format!(...) or &&"" dances in `span_label` calls 2017-05-08 12:56:15 +02:00
Eduard-Mihai Burtescu 9bde6b6d96 rustc: expose the common DUMMY_SP query case as tcx methods. 2017-04-24 17:23:43 +03:00
Eduard-Mihai Burtescu 612bb1f54e rustc: rename some of the queries to match tcx methods. 2017-04-24 15:20:52 +03:00
Niko Matsakis 8388772f42 kill a bunch of one off tasks 2017-04-18 08:20:12 -04:00
Niko Matsakis a29ae3052a convert inherent-impl-related things to on-demand queries
There are now 3 queries:

- inherent_impls(def-id): for a given type, get a `Rc<Vec<DefId>>` with
  all its inherent impls. This internally uses `crate_inherent_impls`,
  doing some hacks to keep the current deps (which, btw, are not clearly
  correct).
- crate_inherent_impls(crate): gathers up a map from types
  to `Rc<Vec<DefId>>`, touching the entire krate, possibly generating
  errors.
- crate_inherent_impls_overlap_check(crate): performs overlap checks
  between the inherent impls for a given type, generating errors.
2017-03-23 13:27:28 -04:00
Niko Matsakis 1a87fc2635 convert `custom_coerce_unsized_kind` into a `coerce_unsized_info`
This "on-demand" task both checks for errors and computes the custom
unsized kind, if any. This task is only defined on impls of
`CoerceUnsized`; invoking it on any other kind of impl results in a bug.
This is just to avoid having an `Option`, could easily be changed.
2017-03-23 13:25:45 -04:00
Eduard-Mihai Burtescu c832e6f327 rustc_typeck: rework coherence to be almost completely on-demand. 2017-02-25 18:35:26 +02:00