Nicholas Nethercote
cc16c902f1
Remove #[macro_use] extern crate tracing
from rustc_hir_analysis
.
2024-08-30 17:14:59 +10:00
Nicholas Nethercote
5acf4e7b4b
Add warn(unreachable_pub)
to rustc_hir_analysis
.
2024-08-27 13:14:50 +10:00
Pavel Grigorenko
06f2d73b2b
repr_transparent_external_private_fields: treat rustc_pub_transparent
types as local
2024-08-24 23:05:54 +03:00
Camille GILLOT
c51f2d24d1
Use a LocalDefId in ResolvedArg.
2024-08-22 01:17:01 +00:00
Michael Goulet
25ff9b6bcb
Use bool in favor of Option<()> for diagnostics
2024-08-21 01:31:11 -04:00
Michael Goulet
833af65f38
Use FnSig instead of raw FnDecl for ForeignItemKind::Fn
2024-08-16 14:10:06 -04:00
Nicholas Nethercote
84ac80f192
Reformat use
declarations.
...
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
Michael Goulet
ce8a625092
Move all error reporting into rustc_trait_selection
2024-07-21 22:34:35 -04:00
Michael Goulet
c02d0de871
Account for structs that have unused params in nested types in fields
2024-07-17 21:12:12 -04:00
Michael Goulet
fe4c995ccb
Move trait selection error reporting to its own top-level module
2024-07-08 16:04:47 -04:00
Deadbeef
74e7b5bd76
temporarily disable effects on specialization tests
2024-06-28 10:57:35 +00:00
Deadbeef
72e8244e64
implement new effects desugaring
2024-06-28 10:57:35 +00:00
Michael Goulet
f26cc349d9
Split out IntoIterator and non-Iterator constructors for AliasTy/AliasTerm/TraitRef/projection
2024-06-24 11:28:21 -04:00
Michael Goulet
b1efe1ab5d
Rework precise capturing syntax
2024-06-17 22:35:25 -04:00
Michael Goulet
82ef3ad980
Uplift TypeError
2024-06-06 07:49:47 -04:00
Santiago Pastorino
2a377122dd
Handle safety keyword for extern block inner items
2024-06-04 14:19:42 -03:00
Michael Goulet
eb0a70a557
Opt-in diagnostics reporting to avoid doing extra work in the new solver
2024-06-03 09:27:52 -04:00
bors
b582f807fa
Auto merge of #125410 - fmease:adj-lint-diag-api, r=nnethercote
...
[perf] Delay the construction of early lint diag structs
Attacks some of the perf regressions from https://github.com/rust-lang/rust/pull/124417#issuecomment-2123700666 .
See individual commits for details. The first three commits are not strictly necessary.
However, the 2nd one (06bc4fc671
, *Remove `LintDiagnostic::msg`*) makes the main change way nicer to implement.
It's also pretty sweet on its own if I may say so myself.
2024-05-27 08:44:12 +00:00
Boxy
bd6344d829
Remove DefId
from EarlyParamRegion
(type system)
2024-05-24 17:33:48 +01:00
León Orell Valerian Liehr
06bc4fc671
Remove LintDiagnostic::msg
...
* instead simply set the primary message inside the lint decorator functions
* it used to be this way before [#]101986 which introduced `msg` to prevent
good path delayed bugs (which no longer exist) from firing under certain
circumstances when lints were suppressed / silenced
* this is no longer necessary for various reasons I presume
* it shaves off complexity and makes further changes easier to implement
2024-05-23 04:08:35 +02:00
Michael Goulet
1529c661e4
Warn against redundant use<...>
2024-05-13 23:57:56 -04:00
Nicholas Nethercote
f59348ff09
Remove extern crate rustc_middle
from rustc_hir_analysis
.
2024-05-13 08:04:47 +10:00
Michael Goulet
1c19b6ad60
Rename Generics::params to Generics::own_params
2024-05-09 20:58:46 -04:00
León Orell Valerian Liehr
e15d6f9d85
Rollup merge of #123993 - compiler-errors:coroutine-obl, r=lcnr
...
Do `check_coroutine_obligations` once per typeck root
We only need to do `check_coroutine_obligations` once per typeck root, especially since the new solver can't really (easily) associate which obligations correspond to which coroutines.
This requires us to move the checks for sized coroutine fields into `mir_coroutine_witnesses`, but that's fine imo.
r? lcnr
2024-04-23 17:25:16 +02:00
Michael Goulet
57085a06d9
Explicitly mention Self
2024-04-20 11:39:43 -04:00
Michael Goulet
fa0428c9d0
Flip spans for precise capturing syntax not capturing a ty/ct param
2024-04-20 10:35:04 -04:00
Michael Goulet
5daf58ffc1
Fix capturing duplicated lifetimes via parent
2024-04-19 14:12:21 -04:00
bors
00ed4edb44
Auto merge of #123674 - oli-obk:bogus_note, r=estebank
...
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls
fixes #123292
Also removes a bunch of extra diagnostics that were introduced in https://github.com/rust-lang/rust/pull/121154 and https://github.com/rust-lang/rust/pull/120558
2024-04-17 14:25:10 +00:00
Michael Goulet
06501156d1
redundant ::{self}
2024-04-15 19:54:51 -04:00
Michael Goulet
d29178c2ef
Do check_coroutine_obligations once per typeck root
2024-04-15 19:44:58 -04:00
Michael Goulet
aa1653e5be
Rename coroutine_stalled_predicates
2024-04-15 19:44:58 -04:00
Michael Goulet
ac7651ccaf
More polishing
2024-04-15 16:45:48 -04:00
Michael Goulet
ce8961039e
Some ordering and duplication checks
2024-04-15 16:45:26 -04:00
Michael Goulet
02d7317af2
Add hir::Node::PreciseCapturingNonLifetimeArg
2024-04-15 16:45:25 -04:00
Michael Goulet
42ba57c013
Validation and other things
2024-04-15 16:45:01 -04:00
klensy
7085ff2f60
remove some ancient debug output, looks unused?
2024-04-13 11:30:48 +03:00
Matthias Krüger
93645f481d
Rollup merge of #123704 - estebank:diag-changes, r=compiler-errors
...
Tweak value suggestions in `borrowck` and `hir_analysis`
Unify the output of `suggest_assign_value` and `ty_kind_suggestion`.
Ideally we'd make these a single function, but doing so would likely require modify the crate dependency tree.
2024-04-11 09:31:50 +02:00
Esteban Küber
a983dd8563
Tweak value suggestions in borrowck
and hir_analysis
...
Unify the output of `suggest_assign_value` and `ty_kind_suggestion`.
Ideally we'd make these a single function, but doing so would likely require modify the crate dependency tree.
2024-04-09 23:37:13 +00:00
Oli Scherer
c0a9c8c954
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls
2024-04-09 10:23:58 +00:00
Oli Scherer
2f2350e577
Eliminate DefiningAnchor
now that is just a single-variant enum
2024-04-08 15:00:27 +00:00
Vadim Petrochenkov
b40ea03f8a
rustc_index: Add a ZERO
constant to index types
...
It is commonly used.
2024-04-03 19:06:22 +03:00
beetrees
6e5f1dacf3
Use the Align
type when parsing alignment attributes
2024-04-01 03:05:55 +01:00
Michael Goulet
7be0dbe772
Make RawPtr take Ty and Mutbl separately
2024-03-22 11:13:29 -04:00
Michael Goulet
ff0c31e6b9
Programmatically convert some of the pat ctors
2024-03-22 11:13:29 -04:00
León Orell Valerian Liehr
82c2c8deb1
Update (doc) comments
...
Several (doc) comments were super outdated or didn't provide enough context.
Some doc comments shoved everything in a single paragraph without respecting
the fact that the first paragraph should be a single sentence because rustdoc
treats these as item descriptions / synopses on module pages.
2024-03-22 06:31:51 +01:00
Michael Goulet
026eb3dd64
Delay a bug for stranded opaques
2024-03-13 13:44:00 -04:00
Oli Scherer
bbbf06d5e9
Manual rustfmt
2024-03-12 05:53:46 +00:00
Oli Scherer
9816915954
Change DefKind::Static
to a struct variant
2024-03-12 05:53:46 +00:00
Oli Scherer
40d5609548
Make DefiningAnchor::Bind
only store the opaque types that may be constrained, instead of the current infcx root item.
...
This makes `Bind` almost always be empty, so we can start forwarding it to queries, allowing us to remove `Bubble` entirely
2024-03-11 17:19:37 +00:00
Michael Goulet
74d5bbbf94
Rename some functions to represent their generalized behavior
2024-03-08 02:10:11 +00:00