bors
5c97719393
Auto merge of #118250 - petrochenkov:optdefkind, r=compiler-errors
...
rustc: Make `def_kind` mandatory for all `DefId`s
Prerequisite for https://github.com/rust-lang/rust/pull/118188 .
2023-11-26 04:44:20 +00:00
Nicholas Nethercote
57cd5e6551
Use rustc_fluent_macro::fluent_messages!
directly.
...
Currently we always do this:
```
use rustc_fluent_macro::fluent_messages;
...
fluent_messages! { "./example.ftl" }
```
But there is no need, we can just do this everywhere:
```
rustc_fluent_macro::fluent_messages! { "./example.ftl" }
```
which is shorter.
2023-11-26 08:38:40 +11:00
Nicholas Nethercote
a733082be9
Avoid need for {D,Subd}iagnosticMessage
imports.
...
The `fluent_messages!` macro produces uses of
`crate::{D,Subd}iagnosticMessage`, which means that every crate using
the macro must have this import:
```
use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage};
```
This commit changes the macro to instead use
`rustc_errors::{D,Subd}iagnosticMessage`, which avoids the need for the
imports.
2023-11-26 08:38:00 +11:00
Vadim Petrochenkov
2c23386344
rustc: Make def_kind
mandatory for all DefId
s
2023-11-25 14:49:43 +03:00
Nilstrieb
21a870515b
Fix clippy::needless_borrow
in the compiler
...
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`.
Then I had to remove a few unnecessary parens and muts that were exposed
now.
2023-11-21 20:13:40 +01:00
Mark Rousskov
db3e2bacb6
Bump cfg(bootstrap)s
2023-11-15 19:41:28 -05:00
cui fliter
a44a4edc0e
Fix some typos
...
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-11-14 23:06:50 +08:00
Nicholas Nethercote
8ff624a9f2
Clean up rustc_*/Cargo.toml
.
...
- Sort dependencies and features sections.
- Add `tidy` markers to the sorted sections so they stay sorted.
- Remove empty `[lib`] sections.
- Remove "See more keys..." comments.
Excluded files:
- rustc_codegen_{cranelift,gcc}, because they're external.
- rustc_lexer, because it has external use.
- stable_mir, because it has external use.
2023-10-30 08:46:02 +11:00
Oli Scherer
5c9a74d88b
Merge associated types with the other alias types
2023-10-23 10:10:22 +00:00
Oli Scherer
d5c0f4d139
Sync the logic for inherent and weak type aliases
2023-10-23 09:53:04 +00:00
Oli Scherer
60956837cf
s/Generator/Coroutine/
2023-10-20 21:10:38 +00:00
Michael Goulet
b2d2184ede
Format all the let chains in compiler
2023-10-13 08:59:36 +00:00
Michael Howell
c6e6ecb1af
rustdoc: remove rust logo from non-Rust crates
2023-10-08 20:17:53 -07:00
Michael Goulet
d6ce9ce115
Don't store lazyness in DefKind
2023-09-26 02:53:59 +00:00
Camille GILLOT
44ac8dcc71
Remove GeneratorWitness and rename GeneratorWitnessMIR.
2023-09-23 13:47:30 +00:00
Matthias Krüger
e7a347baf8
Rollup merge of #115727 - fee1-dead-contrib:effect-fallback, r=oli-obk
...
Implement fallback for effect param
r? `@oli-obk` or `@lcnr`
tracking issue for this ongoing work: https://github.com/rust-lang/rust/issues/110395
2023-09-11 17:03:31 +02:00
Deadbeef
9654d5ceaf
add is_host_effect
to GenericParamDefKind::Const
and address review
2023-09-11 13:18:36 +00:00
Michael Goulet
14e59bb317
Lint node for PRIVATE_BOUNDS is the item which has the bounds
2023-09-07 06:48:24 +00:00
bors
1accf068d8
Auto merge of #113126 - Bryanskiy:delete_old, r=petrochenkov
...
Replace old private-in-public diagnostic with type privacy lints
Next part of RFC https://github.com/rust-lang/rust/issues/48054 .
r? `@petrochenkov`
2023-09-01 12:40:01 +00:00
Nilstrieb
c75fc573aa
Use {Local}ModDefId
in many queries
2023-08-14 07:22:48 +00:00
Nilstrieb
40de40e094
Add typed {Local}DefId
for modules
...
This allows for better type safety in the compiler and also improves the
documentation for many things, making it clear that they expect modules.
2023-08-13 05:54:50 +00:00
León Orell Valerian Liehr
5468336d6b
Store the laziness of type aliases in the DefKind
2023-08-07 15:54:31 +02:00
Deadbeef
4fec845c3f
Remove constness from TraitPredicate
2023-08-02 15:38:00 +00:00
Bryanskiy
e26614e6a7
Replace old private-in-public diagnostic with type privacy lints
2023-08-02 13:40:28 +03:00
Bryanskiy
8203d1ddf6
Weaken unnameable_types lint
2023-07-30 14:02:21 +03:00
Mahdi Dibaiee
e55583c4b8
refactor(rustc_middle): Substs -> GenericArg
2023-07-14 13:27:35 +01:00
Santiago Pastorino
20429af7a3
Replace RPITIT current impl with new strategy that lowers as a GAT
2023-07-08 18:21:34 -03:00
Michael Goulet
0c73b41cd6
remove TypeWellFormedFromEnv
2023-07-03 21:40:04 +00:00
Bryanskiy
f9a4db7312
Fix associated items effective visibility calculation for type privacy lints
2023-06-30 15:00:24 +03:00
Bryanskiy
35c6a1d0f3
Fix type privacy lints error message
2023-06-29 16:24:07 +03:00
Matthias Krüger
42a495da7e
Rollup merge of #112670 - petrochenkov:typriv, r=eholk
...
privacy: Type privacy lints fixes and cleanups
See individual commits.
Follow up to https://github.com/rust-lang/rust/pull/111801 .
2023-06-29 05:48:39 +02:00
Michael Goulet
374173cd99
TypeWellFormedInEnv
2023-06-26 23:12:04 +00:00
Michael Goulet
fbdef58414
Migrate predicates_of and caller_bounds to Clause
2023-06-26 23:12:03 +00:00
Michael Goulet
46a650f4e0
Migrate item_bounds to ty::Clause
2023-06-22 18:34:23 +00:00
Michael Goulet
21226eefb2
Fully fledged Clause type
2023-06-19 15:46:08 +00:00
Michael Goulet
fca56a8d2c
s/Clause/ClauseKind
2023-06-19 14:57:42 +00:00
Matthias Krüger
3436069c34
Rollup merge of #112734 - dswij:bounds-predicates-clause, r=compiler-errors
...
Make `Bound::predicates` use `Clause`
Part of #107250
`Bound::predicates` returns an iterator over `Binder<_, Clause>` instead of `Predicate`.
I tried updating `explicit_predicates_of` as well, but it seems that it needs a lot more change than I thought. Will do it in a separate PR instead.
2023-06-18 08:06:43 +02:00
Michael Goulet
6594c75449
Move ConstEvaluatable to Clause
2023-06-17 21:27:13 +00:00
Michael Goulet
52d3fc93f2
Move WF goal to clause
2023-06-17 21:20:20 +00:00
dswij
f874345784
Bound::predicates
to return Clause
2023-06-17 17:16:30 +08:00
Oli Scherer
f3b7dd6388
Add AliasKind::Weak
for type aliases.
...
Only use it when the type alias contains an opaque type.
Also does wf-checking on such type aliases.
2023-06-16 19:39:48 +00:00
Vadim Petrochenkov
98a86ffc9f
privacy: Rename some variables for clarity
2023-06-15 21:25:47 +03:00
Vadim Petrochenkov
95a24c6ed4
privacy: Do not mark items reachable farther than their nominal visibility
...
This commit reverts a change made in #111425 .
It was believed that this change was necessary for implementing type privacy lints, but #111801 showed that it was not necessary.
Quite opposite, the revert fixes some issues.
2023-06-15 21:25:47 +03:00
Vadim Petrochenkov
17edd1a779
privacy: Remove (Non)ShallowEffectiveVis
...
Use a boolean constant parameter instead.
Also turn some methods on `DefIdVisitor` into associated constants.
2023-06-15 21:25:47 +03:00
Bryanskiy
6d46382f6f
Private-in-public lints implementation
2023-06-12 01:02:19 +03:00
Bryanskiy
5e917a6039
increase the accuracy of effective visibilities calculation
2023-06-08 19:22:30 +03:00
Deadbeef
21bc5cded4
Rename impl_defaultness
to defaultness
2023-06-01 06:14:06 +00:00
clubby789
f97fddab91
Ensure Fluent messages are in alphabetical order
2023-05-25 23:49:35 +00:00
Vadim Petrochenkov
edf95b5d8c
rustc_privacy: Reach underlying types of impl Trait
s in a separate pass
...
outside of fixed point iteration.
2023-05-22 19:59:38 +03:00
Vadim Petrochenkov
e41c422dff
rustc_privacy: Merge three matches on ItemKind
into one
...
and remove some more `Option`s as a result
2023-05-22 19:59:35 +03:00