summary refs log tree commit diff
path: root/compiler/rustc_passes/src/layout_test.rs
AgeCommit message (Collapse)AuthorLines
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-8/+8
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-10-04Reorder fullfillment errors to keep more interesting ones firstEsteban Küber-1/+1
In `report_fullfillment_errors` push back `T: Sized`, `T: WellFormed` and coercion errors to the end of the list. The pre-existing deduplication logic eliminates redundant errors better that way, keeping the resulting output with fewer errors than before, while also having more detail.
2023-09-26Don't store lazyness in DefKindMichael Goulet-1/+1
2023-09-11Disentangle `Debug` and `Display` for `Ty`.Nicholas Nethercote-1/+2
The `Debug` impl for `Ty` just calls the `Display` impl for `Ty`. This is surprising and annoying. In particular, it means `Debug` doesn't show as much information as `Debug` for `TyKind` does. And `Debug` is used in some user-facing error messages, which seems bad. This commit changes the `Debug` impl for `Ty` to call the `Debug` impl for `TyKind`. It also does a number of follow-up changes to preserve existing output, many of which involve inserting `with_no_trimmed_paths!` calls. It also adds `Display` impls for `UserType` and `Canonical`. Some tests have changes to expected output: - Those that use the `rustc_abi(debug)` attribute. - Those that use the `EMIT_MIR` annotation. In each case the output is slightly uglier than before. This isn't ideal, but it's pretty weird (particularly for the attribute) that the output is using `Debug` in the first place. They're fairly obscure attributes (I hadn't heard of them) so I'm not worried by this. For `async-is-unwindsafe.stderr`, there is one line that now lacks a full path. This is a consistency improvement, because all the other mentions of `Context` in this test lack a path.
2023-09-09better spans for WF errorsRalf Jung-2/+7
2023-09-09use hir_crate_items(()).definitions() instead of hir().items()Ralf Jung-12/+4
2023-09-09rustc_layout, rustc_abi: make sure the types are well-formedRalf Jung-21/+40
2023-09-06rustc_layout/abi: error when attribute is applied to the wrong thingRalf Jung-11/+24
2023-08-27add rustc_abi debugging attributeRalf Jung-9/+10
2023-08-19remove redundant var rebindingsMatthias Krüger-1/+0
2023-08-07Store the laziness of type aliases in the DefKindLeón Orell Valerian Liehr-1/+1
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-1/+1
2023-07-01Put `LayoutError` behind reference to shrink resultNilstrieb-0/+1
`LayoutError` is 24 bytes, which is bigger than the `Ok` types, so let's shrink that.
2023-06-01Use translatable diagnostics in `rustc_const_eval`Deadbeef-7/+2
2023-03-21Use local key in providersMichael Goulet-1/+1
2023-02-16remove bound_type_of query; make type_of return EarlyBinder; change type_of ↵Kyle Matsuda-1/+1
in metadata
2023-02-16change usages of type_of to bound_type_ofKyle Matsuda-1/+1
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-1/+1
2022-10-29Rename some `OwnerId` fields.Nicholas Nethercote-3/+3
spastorino noticed some silly expressions like `item_id.def_id.def_id`. This commit renames several `def_id: OwnerId` fields as `owner_id`, so those expressions become `item_id.owner_id.def_id`. `item_id.owner_id.local_def_id` would be even clearer, but the use of `def_id` for values of type `LocalDefId` is *very* widespread, so I left that alone.
2022-10-07First batch of review feedback changes from #102110Nathan Stocks-3/+4
2022-10-07migrate layout_test.rs to translateable diagnosticsNathan Stocks-33/+37
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-1/+1
fix a ui test use `into` fix clippy ui test fix a run-make-fulldeps test implement `IntoQueryParam<DefId>` for `OwnerId` use `OwnerId` for more queries change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-05-13remove LayoutTestMiguel Guarniz-79/+67
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-10only_local: always check for misuselcnr-4/+2
2021-12-15Remove `in_band_lifetimes` for `rustc_passes`Peter Jaszkowiak-6/+6
2021-09-29Avoid more invocations of hir_crate query.Camille GILLOT-1/+1
2021-09-02ty::layout: split `LayoutOf` into required and (blanket) provided halves.Eduard-Mihai Burtescu-2/+2
2021-09-02ty::layout: implement `layout_of` automatically as a default method.Eduard-Mihai Burtescu-3/+9
2021-09-02rustc_target: move `LayoutOf` to `ty::layout`.Eduard-Mihai Burtescu-5/+4
2021-08-27rustc_target: add lifetime parameter to `LayoutOf`.Eduard-Mihai Burtescu-1/+1
2021-08-21Remove `Session.used_attrs` and move logic to `CheckAttrVisitor`Aaron Hill-1/+1
Instead of updating global state to mark attributes as used, we now explicitly emit a warning when an attribute is used in an unsupported position. As a side effect, we are to emit more detailed warning messages (instead of just a generic "unused" message). `Session.check_name` is removed, since its only purpose was to mark the attribute as used. All of the callers are modified to use `Attribute.has_name` Additionally, `AttributeType::AssumedUsed` is removed - an 'assumed used' attribute is implemented by simply not performing any checks in `CheckAttrVisitor` for a particular attribute. We no longer emit unused attribute warnings for the `#[rustc_dummy]` attribute - it's an internal attribute used for tests, so it doesn't mark sense to treat it as 'unused'. With this commit, a large source of global untracked state is removed.
2021-02-15Only store a LocalDefId in hir::Item.Camille GILLOT-4/+2
Items are guaranteed to be HIR owner.
2020-11-26Store ForeignItem in a side table.Camille GILLOT-0/+1
2020-08-30mv compiler to compiler/mark-0/+142