Mazdak Farrokhzad
8bd3d240e3
nix syntax::errors & prefer rustc_errors over errors
2020-01-10 07:41:30 +01:00
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
Mazdak Farrokhzad
7901c7f707
canonicalize FxHash{Map,Set} imports
2020-01-04 18:57:22 +01:00
Mazdak Farrokhzad
4ff12ce4c1
Normalize `syntax::symbol` imports.
2020-01-02 13:57:04 +01:00
Vadim Petrochenkov
70f1d57048
Rename `syntax_pos` to `rustc_span` in source code
2020-01-01 09:15:18 +03:00
Mark Rousskov
a06baa56b9
Format the world
2019-12-22 17:42:47 -05:00
Mikhail Babenko
45aadf7ae6
add `enclosing_scope` param to `rustc_on_unimplmented`
...
add ui test
compute enclosing_scope_span on demand
add scope test
make tidy happy
stylistic and typo fixes
2019-11-25 18:05:56 +03:00
Guillaume Gomez
798e389e57
Update to use new librustc_error_codes library
2019-11-14 13:05:42 +01:00
Nicholas Nethercote
5bc7084f7e
Convert `x.as_str().to_string()` to `x.to_string()` where possible.
2019-11-02 09:01:00 +11:00
Tyler Mandry
d75338e630
Rollup merge of #65902 - gilescope:issue62570, r=estebank
...
Make ItemContext available for better diagnositcs
Fix #62570
2019-11-01 11:20:14 -07:00
Giles Cope
d7869ec022
Make ItemContext available for better diagnositcs.
2019-10-30 06:12:49 +00:00
Nicholas Nethercote
02edd14cde
Convert some `InternedString`s to `Symbols`.
...
This avoids the needs for various conversions, and makes the code
slightly faster, because `Symbol` comparisons and hashing is faster.
2019-10-21 11:31:02 +11:00
Nicholas Nethercote
bf536dde3b
Remove `LocalInternedString` uses from `librustc/traits/`.
2019-09-04 14:23:45 +10: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
Mark Rousskov
dc13072b7b
Use Symbol for named arguments in fmt_macros
2019-06-09 13:45:16 -06:00
Mark Rousskov
20efb19043
Make a few methods private
2019-06-09 13:44:55 -06:00
Esteban Küber
24160171e4
Tweak macro parse errors when reaching EOF during macro call parse
...
- Add detail on origin of current parser when reaching EOF and stop
saying "found <eof>" and point at the end of macro calls
- Handle empty `cfg_attr` attribute
- Reword empty `derive` attribute error
2019-05-24 11:49:33 -07:00
Nicholas Nethercote
b557567c35
Remove impls for `InternedString`/string equality.
...
`Symbol` received the same treatment in #60630 .
Also, we can derive `PartialEq` for `InternedString`.
2019-05-21 20:08:33 +10:00
Nicholas Nethercote
fb084a48e2
Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.
2019-05-13 09:29:22 +10:00
Vadim Petrochenkov
db74efce69
Make meta-item API compatible with `LocalInternedString::get` soundness fix
2019-03-17 17:04:58 +03:00
Vadim Petrochenkov
0cf96131f4
Refactor away `NestedMetaItemKind`
...
Remove methods `Attribute::span` and `MetaItem::span` duplicating public fields
2019-03-16 23:14:42 +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
Eduard-Mihai Burtescu
e0c75ff40d
rustc: rename item_path to def_path (except the module in ty).
2019-03-15 13:25:10 +02:00
varkor
54b935b9b9
Handle const generics elsewhere
...
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05 22:20:01 +00:00
Mark Mansi
e957ed9d10
move librustc to 2018
2019-02-05 12:45:47 -06:00
Vadim Petrochenkov
41c65992c5
Implement basic input validation for built-in attributes
2019-01-13 14:17:19 +03:00
Esteban Küber
862ebc4c38
Various changes to string format diagnostics
...
- Point at opening mismatched formatting brace
- Account for differences between raw and regular strings
- Account for differences between the code snippet and `InternedString`
- Add more tests
2018-12-26 14:29:43 -08:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
Zack M. Davis
5b22d9b2ca
don't elide lifetimes in paths in librustc/
...
This seemed like a good way to kick the tires on the
elided-lifetimes-in-paths lint (#52069 )—seems to work! This was also
pretty tedious—it sure would be nice if `cargo fix` worked on this
codebase (#53896 )!
2018-09-29 21:48:29 -07:00
ljedrz
a8ec8e5cb7
A few cleanups and minor improvements to rustc/traits
2018-09-18 08:48:39 +02:00
Esteban Küber
5ae3801c8d
Various changes to `rustc_on_unimplemented`
...
- Add `from_method` and `from_desugaring` to formatting options
- Change wording of errors slightly
2018-08-12 12:26:38 -07:00
Colin Wallace
10d82137b3
librustc: Prefer `Option::map`/etc over `match` where applicable
2018-07-23 22:05:45 -07:00
Esteban Küber
93b2bb01a9
Remove dependency on `libsyntax`
2018-07-21 16:18:06 -07:00
Esteban Küber
f4306ffbfc
Use correct spans for format string errors
...
When encountering format string errors in a raw string, or regular
string literal with embedded newlines, account for the positional
change to use correct spans.
:drive by fix: 🚗
2018-07-19 23:18:07 -07:00
Eduard-Mihai Burtescu
73f62106ad
rustc: move TypeParamDef's fields into GenericParamDefKind::Type.
2018-05-21 12:13:19 +03:00
varkor
030f10f752
Clean up generic param handling
2018-05-15 14:21:32 +01:00
varkor
fe1f651e4c
Review refactoring
2018-05-15 14:21:32 +01:00
varkor
007de2f896
Lift pure_wrt_drop to GenericParamDef
2018-05-15 14:21:32 +01:00
varkor
9200bdee26
Refactor generic params loops
2018-05-15 14:21:32 +01:00
varkor
4bed895cab
Pull common parameters into GenericParamDef
...
This leads to a lot of simplifications, as most code doesn't actually need to know about the specific lifetime/type data; rather, it's concerned with properties like name, index and def_id.
2018-05-15 14:21:32 +01:00
varkor
5e89312a22
Inline get_type
2018-05-15 14:21:32 +01:00
varkor
0b8b14f6f5
Eliminate ty::Generics::types()
...
And with one final incanation, the specific kind iterators were banished from ty::Generics, never to be seen again!
2018-05-15 14:21:03 +01:00
varkor
b75f421ee9
Generalise more cases of explicit iteration of specific kinds
2018-05-15 14:21:03 +01:00
varkor
4a6c946368
Generalise cases of explicit iteration of specific kinds
2018-05-15 14:21:03 +01:00
varkor
e5825c29c3
Prefer iterator to vec
2018-05-15 14:20:19 +01:00