Commit graph

1258 commits

Author SHA1 Message Date
Bastian Kauschke
b79f7fbda8 rustdoc 2020-07-27 21:06:36 +02:00
Mark Rousskov
8454ee89b2 Migrate rustc_depr uses to use deprecation attribute
This should not be a change in behavior.
2020-07-20 21:22:14 -04:00
Manish Goregaokar
98450757e5 Revert "Remove "important traits" feature"
This reverts commit 1244ced958.
2020-07-16 09:58:17 -07:00
Nicholas Nethercote
f04e866e57 Add and use more static symbols.
Note that the output of `unpretty-debug.stdout` has changed. In that
test the hash values are normalized from a symbol numbers to small
numbers like "0#0" and "0#1". The increase in the number of static
symbols must have caused the original numbers to contain more digits,
resulting in different pretty-printing prior to normalization.
2020-07-15 08:42:59 +10:00
Bastian Kauschke
71b45b97d3 change skip_binder to use T by value 2020-06-30 09:13:56 +02:00
mark
268decbac8 make all uses of ty::Error or ConstKind::Error delay a span bug 2020-06-15 18:25:58 -05:00
Matthew Jasper
ee0d3c7f90 Rename TyKind::Def to OpaqueDef 2020-06-11 17:08:23 +01:00
Matthew Jasper
4201fd273e Remove associated opaque types
They're unused now.
2020-06-11 16:24:01 +01:00
Dylan MacKenzie
b4e06b9e88 Call skip_binder or no_bound_vars before self_ty 2020-06-01 12:18:57 -07:00
marmeladema
4b7e44f893 rustdoc: remove calls to local_def_id_from_node_id 2020-05-30 12:30:58 +01:00
Matthew Jasper
7d73e4cc47 Remove ReScope 2020-05-22 18:03:08 +01:00
Bastian Kauschke
f3164790bd introduce newtype'd Predicate<'tcx> 2020-05-20 15:44:34 +02:00
Bastian Kauschke
cad8fe90fd rename Predicate to PredicateKind, introduce alias 2020-05-20 15:38:03 +02:00
Ben Lewis
8b14b84933 Assume unevaluated consts are equal to the other consts and add ConstEquate obligation. This delays
the need to evaluate consts eagerly and therefore gets around const eval query cycles.
2020-05-17 11:01:02 +02:00
Jack Huey
41f6b958d5 Remove ty::UnnormalizedProjection 2020-05-12 01:56:29 -04:00
Camille GILLOT
d4e143ed2f Remove ast::{Ident, Name} reexports. 2020-05-08 13:13:15 +02:00
Dylan DPC
e51cbc8376
Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddyb
Add all remaining `DefKind`s.

r? @eddyb or @Centril

~~I'm not sure if this is what you were thinking of. There are also a few places where I'm not sure what the correct choice is because I don't fully understand the meaning of some variants.~~

~~In general, it feels a bit odd to add some of these as `DefKind`s (e.g. `Arm`) because they don't feel like definitions. Are there things that it makes sense not to add?~~
2020-04-26 01:00:13 +02:00
Josh Stone
2325c20925 Avoid unused Option::map results
These are changes that would be needed if we add `#[must_use]` to
`Option::map`, per #71484.
2020-04-24 13:58:41 -07:00
Eduard-Mihai Burtescu
95b3c427d4 Remove Option from the return type of def_kind. 2020-04-24 13:44:07 -05:00
marmeladema
fe7531579d Address comments from review 2020-04-23 23:14:07 +01:00
marmeladema
bfce24aa67 Modify as_local_hir_id to return a bare HirId 2020-04-23 23:14:07 +01:00
marmeladema
6148db719f Modify as_local_hir_id to accept a LocalDefId instead of a DefId 2020-04-23 23:14:07 +01:00
marmeladema
92fb59d7f3 librustc_middle: return LocalDefId instead of DefId in local_def_id 2020-04-23 23:14:07 +01:00
Josh Stone
554847c513 Dogfood or_patterns in rustdoc 2020-04-16 13:58:47 -07:00
marmeladema
c15e13ae16 Remove DUMMY_HIR_ID 2020-04-14 08:46:07 +01:00
Rustin-Liu
b07e7fe047 Rename AssocKind::Method to AssocKind::Fn
Rename fn_has_self_argument to fn_has_self_parameter

Rename AssocItemKind::Method to AssocItemKind::Fn

Refine has_no_input_arg

Refine has_no_input_arg

Revert has_no_input_arg

Refine suggestion_descr

Move as_def_kind into AssocKind

Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>

Fix tidy check issue

Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-14 07:12:07 +08:00
bors
e82734e56b Auto merge of #70161 - cjgillot:query-arena, r=nikomatsakis
Allocate some query results on an arena

This avoids a cloning few `Lrc` and `Vec`s in the queries.
2020-04-11 15:31:54 +00:00
marmeladema
555e024abc librustc_middle: return LocalDefId instead of DefId in local_def_id_from_node_id 2020-04-10 12:13:54 +01:00
marmeladema
f62c6e1c76 librustc_middle: return LocalDefId instead of DefId in body_owner_def_id 2020-04-10 12:13:54 +01:00
Dylan DPC
1758b7caf6
Rollup merge of #70828 - ollie27:rustdoc_external_macro_src, r=eddyb
rustdoc: Don't try to load source files from external crates

Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead.

Part of #70757

r? @GuillaumeGomez
cc @eddyb
2020-04-08 23:33:42 +02:00
Oliver Middleton
6f96dc221c rustdoc: Don't try to load source files from external crates
Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead.
2020-04-08 18:35:17 +01:00
Eduard-Mihai Burtescu
626abc7977 ty: remove {Existential,}Trait{Ref,Predicate}::input_types. 2020-04-06 21:55:51 +03:00
Camille GILLOT
587b9abd4e Retire rustc::ty::Attributes enum. 2020-04-05 15:26:09 +02:00
Camille GILLOT
3c0edc895f Allocate query Vecs on the arena. 2020-04-05 15:02:00 +02:00
Linus Färnstrand
d7f8928efd Stop importing int modules in librustdoc 2020-04-05 11:22:01 +02:00
Mazdak Farrokhzad
6daff1400a direct imports for langitem stuff 2020-04-02 13:40:43 +02:00
Matthias Krüger
08f2904dfa more clippy fixes
use is_empty() instead of len comparison (clippy::len_zero)
use if let instead of while let loop that never loops (clippy::never_loop)
remove redundant returns (clippy::needless_return)
remove redundant closures (clippy::redundant_closure)
use if let instead of match and wildcard pattern (clippy::single_match)
don't repeat field names redundantly (clippy::redundant_field_names)
2020-03-31 15:20:05 +02:00
Mazdak Farrokhzad
0cb9e36090 rustc -> rustc_middle part 2 2020-03-30 07:16:56 +02:00
Mazdak Farrokhzad
6c58e0194e
Rollup merge of #70277 - matthewjasper:remove-closurebound, r=nikomatsakis
Remove `ReClosureBound`

We now substitute external names for regions in the query response.

r? @nikomatsakis
2020-03-24 00:49:48 +01:00
Matthew Jasper
c3b98813c4 Remove ReClosureBound 2020-03-23 15:33:07 +00:00
Guillaume Gomez
b9167e6c7d Support type search for arguments and returned types 2020-03-16 18:29:19 +01:00
Mark Mansi
7bd8ce2e50 More Method->Fn renaming 2020-03-15 19:15:55 -05:00
John Kåre Alsaker
38e613c4eb Update krate_attrs and get_module 2020-03-14 22:52:29 +01:00
Mazdak Farrokhzad
9bc7386970
Rollup merge of #69674 - mark-i-m:assoc-fn, r=matthewjasper
Rename DefKind::Method and TraitItemKind::Method

r? @eddyb, @Centril, or @matthewjasper

cc #69498 #60163
2020-03-12 16:32:13 +01:00
Mazdak Farrokhzad
61150353bf
Rollup merge of #69514 - GuillaumeGomez:remove-spotlight, r=kinnison
Remove spotlight

I had a few comments saying that this feature was at best misunderstood or not even used so I decided to organize a poll about on [twitter](https://twitter.com/imperioworld_/status/1232769353503956994). After 87 votes, the result is very clear: it's not useful. Considering the amount of code we have just to run it, I think it's definitely worth it to remove it.

r? @kinnison

cc @ollie27
2020-03-10 06:47:47 +01:00
Matthias Krüger
c2bbe3349f Const items have by default a static lifetime, there's no need to annotate it. (clippy::redundant_static_lifetimes) 2020-03-05 16:38:24 +01:00
Mark Mansi
3aeb9f0faf rename TraitItemKind::Method -> Fn 2020-03-03 12:49:58 -06:00
bors
2917d99302 Auto merge of #69592 - petrochenkov:nosyntax, r=Centril
Rename `libsyntax` to `librustc_ast`

This was the last rustc crate that wasn't following the `rustc_*` naming convention.

Follow-up to https://github.com/rust-lang/rust/pull/67763.
2020-03-01 01:36:58 +00:00
Vadim Petrochenkov
e08c279eac Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
Dylan DPC
7d43997053
Rollup merge of #69572 - matthiaskrgr:try_err_and_iter_on_ref, r=Centril
use .iter() instead of .into_iter() on references
2020-02-29 18:54:01 +01:00