Noah Lev
d6f247f3d5
rm ItemKind::OpaqueTy
...
This introduce an additional collection of opaques on HIR, as they can no
longer be listed using the free item list.
2024-10-04 23:28:22 +00:00
Guillaume Gomez
ba94a2ada1
Rollup merge of #131202 - Urgau:wide-ptrs-compiler, r=jieyouxu
...
Use wide pointers consistenly across the compiler
This PR replace every use of "fat pointer" for the more recent "wide pointer" terminology.
Since some time T-lang as preferred the "wide pointer" terminology, as can be seen on [the last RFCs](https://github.com/search?q=repo%3Arust-lang%2Frfcs+%22wide+pointer%22&type=code ), on some [lints](https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#ambiguous-wide-pointer-comparisons ), but also in [the reference](https://doc.rust-lang.org/stable/reference/expressions/operator-expr.html?highlight=wide%20pointer#pointer-to-pointer-cast ).
Currently we have a [mix of both](https://github.com/search?q=repo%3Arust-lang%2Frust+%22wide+pointer%22&type=code ) (including in error messages), which isn't great, but with this PR no more.
r? `@jieyouxu` (feel free to re-roll)
2024-10-04 15:42:54 +02:00
Urgau
018ba0528f
Use wide pointers consistenly across the compiler
2024-10-04 14:06:48 +02:00
Michael Goulet
7cd466a036
Move in_trait into OpaqueTyOrigin
2024-10-02 22:48:26 -04:00
Michael Goulet
cb7e3695e8
Use named fields for OpaqueTyOrigin
2024-10-02 22:04:18 -04:00
Michael Goulet
c682aa162b
Reformat using the new identifier sorting from rustfmt
2024-09-22 19:11:29 -04:00
Michael Goulet
af8d911d63
Also fix if in else
2024-09-11 17:24:01 -04:00
Scott McMurray
d2309c2a9d
Ban non-array SIMD
2024-09-09 19:39:43 -07:00
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 (06bc4fc67145e3a7be9b5a2cf2b5968cef36e587, *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