summary refs log tree commit diff
path: root/tests/ui/rfcs
AgeCommit message (Collapse)AuthorLines
2023-07-06Rollup merge of #113334 - fmease:revert-lexing-c-str-lits, r=compiler-errorsfee1-dead-16/+120
Revert the lexing of `c"…"` string literals Fixes \[after beta-backport\] #113235. Further progress is tracked in #113333. This PR *manually* reverts parts of #108801 (since a git-revert would've been too coarse-grained & messy) and git-reverts #111647. CC `@fee1-dead` (#108801) `@klensy` (#111647) r? `@compiler-errors` `@rustbot` label F-c_str_literals beta-nominated
2023-07-05Add regression testLeón Orell Valerian Liehr-0/+24
2023-07-05Revert the lexing of c_str_literalsLeón Orell Valerian Liehr-16/+96
2023-07-04add testDeadbeef-0/+29
2023-06-20Auto merge of #112320 - compiler-errors:do-not-impl-via-obj, r=lcnrbors-0/+4
Add `implement_via_object` to `rustc_deny_explicit_impl` to control object candidate assembly Some built-in traits are special, since they are used to prove facts about the program that are important for later phases of compilation such as codegen and CTFE. For example, the `Unsize` trait is used to assert to the compiler that we are able to unsize a type into another type. It doesn't have any methods because it doesn't actually *instruct* the compiler how to do this unsizing, but this is later used (alongside an exhaustive match of combinations of unsizeable types) during codegen to generate unsize coercion code. Due to this, these built-in traits are incompatible with the type erasure provided by object types. For example, the existence of `dyn Unsize<T>` does not mean that the compiler is able to unsize `Box<dyn Unsize<T>>` into `Box<T>`, since `Unsize` is a *witness* to the fact that a type can be unsized, and it doesn't actually encode that unsizing operation in its vtable as mentioned above. The old trait solver gets around this fact by having complex control flow that never considers object bounds for certain built-in traits: https://github.com/rust-lang/rust/blob/2f896da247e0ee8f0bef7cd7c54cfbea255b9f68/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs#L61-L132 However, candidate assembly in the new solver is much more lovely, and I'd hate to add this list of opt-out cases into the new solver. Instead of maintaining this complex and hard-coded control flow, instead we can make this a property of the trait via a built-in attribute. We already have such a build attribute that's applied to every single trait that we care about: `rustc_deny_explicit_impl`. This PR adds `implement_via_object` as a meta-item to that attribute that allows us to opt a trait out of object-bound candidate assembly as well. r? `@lcnr`
2023-06-20Merge attrs, better validationMichael Goulet-0/+4
2023-06-18Better error for non const `PartialEq` call generated by `match`Deadbeef-0/+51
2023-06-12Adjust UI tests for `unit_bindings`许杰友 Jieyou Xu (Joe)-3/+3
- Either explicitly annotate `let x: () = expr;` where `x` has unit type, or remove the unit binding to leave only `expr;` instead. - Fix disjoint-capture-in-same-closure test
2023-06-05Better group RFC ui tests togetherMaybe Waffle-83/+16406
2023-05-02fix tidyDeadbeef-0/+0
2023-05-02make it semantic errorDeadbeef-0/+0
2023-05-02try gating early, add non-ascii testDeadbeef-0/+10
2023-05-02fix TODO commentsDeadbeef-0/+6
2023-05-02update and add a few testsDeadbeef-0/+35
2023-03-12Forbid the use of `#[target_feature]` on `start`Léo Lanteri Thauvin-0/+20
2023-03-12Forbid the use of `#[target_feature]` on `main`Léo Lanteri Thauvin-0/+15
2023-03-10Forbid `#[target_feature]` on safe default implementationsLéo Lanteri Thauvin-1/+16
2023-03-02Revert "Stabilize `#![feature(target_feature_11)]`"Léo Lanteri Thauvin-35/+69
This reverts commit b379d216eefaba083a0627b1724d73f99d4bdf5c.
2023-02-01Stabilize `#![feature(target_feature_11)]`Léo Lanteri Thauvin-69/+35
2023-01-30Make structured suggestion for fn casting verboseEsteban Küber-8/+12
2023-01-30Mention fn coercion rules (needs to be expanded)Esteban Küber-0/+2
2023-01-30Modify primary span label for E0308Esteban Küber-4/+4
The previous output was unintuitive to users.
2023-01-25Rollup merge of #106897 - estebank:issue-99430, r=davidtwcoMatthias Krüger-0/+3
Tweak E0597 CC #99430
2023-01-24Add suggestions for function pointersMatthew J Perez-4/+10
- On compiler-error's suggestion of moving this lower down the stack, along the path of `report_mismatched_types()`, which is used by `rustc_hir_analysis` and `rustc_hir_typeck`. - update ui tests, add test - add suggestions for references to fn pointers - modify `TypeErrCtxt::same_type_modulo_infer` to take `T: relate::Relate` instead of `Ty`
2023-01-15Tweak E0597Esteban Küber-0/+3
CC #99430
2023-01-11Move /src/test to /testsAlbert Larsan-0/+2286