about summary refs log tree commit diff
path: root/tests/ui/dyn-star
AgeCommit message (Collapse)AuthorLines
2025-07-01Remove support for dyn*Michael Goulet-1290/+0
2025-04-08UI tests: add missing diagnostic kinds where possibleVadim Petrochenkov-2/+2
2025-02-06remove `feature(trait_upcasting)` from tests and bless themWaffle Lapkin-14/+5
2024-12-22Rollup merge of #134642 - kpreid:pointerlike-cell, r=compiler-errorsMatthias Krüger-2/+38
Implement `PointerLike` for `isize`, `NonNull`, `Cell`, `UnsafeCell`, and `SyncUnsafeCell`. * Implementing `PointerLike` for `UnsafeCell` enables the possibility of interior mutable `dyn*` values. Since this means potentially exercising new codegen behavior, I added a test for it in `tests/ui/dyn-star/cell.rs`. Please let me know if there are further sorts of tests that should be written, or other care that should be taken with this change. It is unfortunately not possible without compiler changes to implement `PointerLike` for `Atomic*` types, since they are not `repr(transparent)` (and, in theory if not in practice, `AtomicUsize`'s alignment may be greater than that of an ordinary pointer or `usize`). * Implementing `PointerLike` for `NonNull` is useful for pointer types which wrap `NonNull`. * Implementing `PointerLike` for `isize` is just for completeness; I have no use cases in mind, but I cannot think of any reason not to do this. * Tracking issue: #102425 `@rustbot` label +F-dyn_star (there is no label or tracking issue for F-pointer_like_trait)
2024-12-22Implement `PointerLike` for `isize`, `NonNull`, `Cell`, `UnsafeCell`, and ↵Kevin Reid-2/+38
`SyncUnsafeCell`. Implementing `PointerLike` for `UnsafeCell` enables the possibility of interior mutable `dyn*` values. Since this means potentially exercising new codegen behavior, I added a test for it in `tests/ui/dyn-star/cell.rs`. Also updated UI tests to account for the `isize` implementation changing error messages.
2024-12-22Rollup merge of #134635 - compiler-errors:dyn-dyn, r=fmeaseMatthias Krüger-0/+43
Don't ICE on illegal `dyn*` casts Fixes #134544 Fixes #132127
2024-12-21Don't ICE on illegal dyn* castsMichael Goulet-0/+43
2024-12-20Explain why a type is not eligible for `impl PointerLike`.Kevin Reid-0/+167
The rules were baffling when I ran in to them trying to add some impls, so I made the compiler explain them to me. The logic of the successful cases is unchanged, but I did rearrange it to reverse the order of the primitive and `Adt` cases; this makes producing the errors easier.
2024-12-20unimplement `PointerLike` for trait objectsLukas Markeffsky-0/+62
2024-12-05Stabilize noop_wakerEric Holk-1/+0
Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
2024-11-20Make PointerLike opt-in as a traitMichael Goulet-14/+104
2024-09-24unify dyn* coercions with other pointer coercionsLukas Markeffsky-4/+22
2024-05-09Fix test problems discovered by the revision checkZalathar-2/+3
Most of these changes either add revision names that were apparently missing, or explicitly mark a revision name as currently unused.
2024-03-11Remove some unnecessary allow(incomplete_features)Michael Goulet-2/+1
2024-03-10Ignore tests w/ current/next revisions from compare-mode=next-solverMichael Goulet-2/+4
2024-03-10fix metadata for dyn-star in new solverLukas Markeffsky-0/+38
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-30/+30
2024-01-24On E0308 involving `dyn Trait`, mention trait objectsEsteban Küber-0/+1
When encountering a type mismatch error involving `dyn Trait`, mention the existence of boxed trait objects if the other type involved implements `Trait`. Partially addresses #102629.
2024-01-22Revert "Auto merge of #118133 - Urgau:stabilize_trait_upcasting, r=WaffleLapkin"Oli Scherer-4/+4
This reverts commit 6d2b84b3ed7848fd91b8d6151d4451b3103ed816, reversing changes made to 73bc12199ea8c7651ed98b069c0dd6b0bb5fabcf.
2024-01-17Remove unnecessary `let`s and borrowing from `Waker::noop()` usage.Kevin Reid-3/+2
`Waker::noop()` now returns a `&'static Waker` reference, so it can be passed directly to `Context` creation with no temporary lifetime issue.
2024-01-13Bless testsGeorge-lewis-0/+4
Update tests
2024-01-07Unions are not PointerLikeMichael Goulet-0/+36
2024-01-02Adjust compiler tests for unused_tuple_struct_fields -> dead_codeJake Goulding-1/+1
2023-12-14Rollup merge of #118948 - compiler-errors:noop, r=eholkJubilee-19/+5
Use the `Waker::noop` API in tests Avoids the need to duplicate this code over and over again r? eholk
2023-12-14Use the Waker::noop API in testsMichael Goulet-19/+5
2023-12-14update use of feature flagslcnr-3/+3
2023-11-24Show number in error message even for one errorNilstrieb-15/+15
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-22Stabilize RFC3324 dyn upcasting coercionUrgau-4/+4
Aka trait_upcasting feature. And also adjust the `deref_into_dyn_supertrait` lint.
2023-09-10Point out if a local trait has no implementationsMichael Goulet-0/+6
2023-08-03add testslcnr-35/+6
2023-07-29cg_llvm: remove pointee types and pointercast/bitcast-of-ptrErik Desjardins-23/+0
2023-07-27Update the minimum external LLVM to 15Josh Stone-2/+0
2023-07-21Revert "Auto merge of #113166 - moulins:ref-niches-initial, r=oli-obk"David Tolnay-1/+1
This reverts commit 557359f92512ca88b62a602ebda291f17a953002, reversing changes made to 1e6c09a803fd543a98bfbe1624d697a55300a786.
2023-07-21Track ABI info. in `NaiveLayout`, and use it for `PointerLike` checksMoulins-1/+0
THis significantly complicates `NaiveLayout` logic, but is necessary to ensure that bounds like `NonNull<T>: PointerLike` hold in generic contexts. Also implement exact layout computation for structs.
2023-07-21add `naive_layout_of` queryMoulins-0/+1
2023-07-18moved note as unspanned note, moved note to the bottom of the msgnxya-5/+1
2023-07-18added links as a notenxya-1/+1
2023-07-18add links to query documentation for E0391nxya-1/+1
2023-07-18added links as a notenxya-1/+6
2023-07-18add links to query documentation for E0391nxya-1/+1
2023-07-14tests: adapt for removal of -opaque-pointers in LLVM 17Krasimir Georgiev-0/+2
The commit https://github.com/llvm/llvm-project/commit/53717cabf837a589dd54a47dd8b4b3b9677f0b85 removed the flag from LLVM.
2023-07-07Normalize opaques during codegen in new solverMichael Goulet-3/+34
2023-07-06Dont ICE for `dyn* Trait: Trait` goals during selection in new trait solverMichael Goulet-1/+3
2023-07-03update testslcnr-58/+14
2023-05-31Check that RPITs are compatible with the opaques inferred during HIR typeck tooMichael Goulet-35/+0
2023-05-25Strongly prefer alias and param-env boundsMichael Goulet-7/+63
2023-05-23Don't ICE when computing PointerLike trait when region vars are in param-envMichael Goulet-0/+52
2023-05-12Don't ICE in layout computation for placeholder typesMichael Goulet-1/+19
2023-04-08Enforce that PointerLike requires a pointer-like ABIMichael Goulet-12/+20
2023-04-04dyn* is a valid constMichael Goulet-0/+21