about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2022-09-28Fix span of byte-escaped left format args braceCassaundra Smith-0/+64
Fix #102057.
2022-09-28Auto merge of #100719 - CohenArthur:rust-safe-intrinsic-attribute, r=wesleywiserbors-3/+43
Add `#[rustc_safe_intrinsic]` This PR adds the `#[rustc_safe_intrinsic]` attribute as mentionned on Zulip. The goal of this attribute is to avoid keeping a list of symbols as the source for stable intrinsics, and instead rely on an attribute. This is similar to `#[rustc_const_stable]` and `#[rustc_const_unstable]`, which among other things, are used to mark the constness of intrinsic functions.
2022-09-29improve E0585 helpRageking8-19/+19
2022-09-28Auto merge of #101454 - cjgillot:concat-binders, r=estebankbors-6/+67
Do not overwrite lifetime binders for another HirId. This PR makes higher-ranked bounds in where clauses a bit more principled. We used to conflate `for<'a> T: Trait` with `(for<'a> T): Trait`. This PR separates both binders. This caused issued with fn types, which have their own binder, causing us to overwrite the predicates's binders with `fn`'s binders, ICEing. Fixes https://github.com/rust-lang/rust/issues/98594
2022-09-28Auto merge of #101619 - Xiretza:rustc_parse-session-diagnostics, r=davidtwcobors-25/+25
Migrate more of rustc_parse to SessionDiagnostic Still far from complete, but I thought I'd add a checkpoint here because rebasing was starting to get annoying.
2022-09-28fix unwind drop glue for if-then scopesDing Xiang Fei-0/+44
2022-09-28add testb-naber-0/+34
2022-09-28add regression testRageking8-0/+49
2022-09-28rustc_safe_intrinsic: Add UI testArthur Cohen-0/+25
2022-09-28Proper span for new generic param suggestionstoozy-2/+10
2022-09-28Auto merge of #102388 - JohnTitor:rollup-mbyw6fl, r=JohnTitorbors-19/+384
Rollup of 8 pull requests Successful merges: - #100747 (Add long description and test for E0311) - #102232 (Stabilize bench_black_box) - #102288 (Suggest unwrapping `???<T>` if a method cannot be found on it but is present on `T`.) - #102338 (Deny associated type bindings within associated type bindings) - #102347 (Unescaping cleanups) - #102348 (Tweak `FulfillProcessor`.) - #102378 (Use already resolved `self_ty` in `confirm_fn_pointer_candidate`) - #102380 (rustdoc: remove redundant mobile `.source > .sidebar` CSS) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-28Rollup merge of #102378 - compiler-errors:issue-102289, r=jackh726Yuki Okushi-0/+54
Use already resolved `self_ty` in `confirm_fn_pointer_candidate` Fixes #102289
2022-09-28Rollup merge of #102338 - ↵Yuki Okushi-2/+73
compiler-errors:assoc-ty-binding-in-assoc-ty-binding, r=cjgillot Deny associated type bindings within associated type bindings Fixes #102335 This was made worse by #100865, which unified the way we generate substs for GATs and non-generic associated types. However, the issue was not _caused_ by #100865, evidenced by the test I added for GATs: ```rust trait T { type A: S<C<(), i32 = ()> = ()>; //~^ ERROR associated type bindings are not allowed here } trait Q {} trait S { type C<T>: Q; } fn main() {} ``` ^ which passes on beta (where GATs are stable) and presumably ever since GATs support was added to `create_substs_for_associated_item` in astconv.
2022-09-28Rollup merge of #102288 - mejrs:inner, r=compiler-errorsYuki Okushi-0/+218
Suggest unwrapping `???<T>` if a method cannot be found on it but is present on `T`. This suggests various ways to get inside wrapper types if the method cannot be found on the wrapper type, but is present on the wrappee. For this PR, those wrapper types include `Localkey`, `MaybeUninit`, `RefCell`, `RwLock` and `Mutex`.
2022-09-28Rollup merge of #102232 - Urgau:stabilize-bench_black_box, r=TaKO8KiYuki Okushi-16/+3
Stabilize bench_black_box This PR stabilize `feature(bench_black_box)`. ```rust pub fn black_box<T>(dummy: T) -> T; ``` The FCP was completed in https://github.com/rust-lang/rust/issues/64102. `@rustbot` label +T-libs-api -T-libs
2022-09-28Rollup merge of #100747 - ↵Yuki Okushi-1/+36
MatthewPeterKelly:mpk/add-long-error-message-for-E0311, r=MatthewPeterKelly Add long description and test for E0311 Adds a long description and unit test for the E0311 compiler error. Fixes one line-item in https://github.com/rust-lang/rust/issues/61137.
2022-09-28fix a ui testTakayuki Maeda-3/+5
2022-09-28Auto merge of #100996 - m-ou-se:format-args-2, r=estebankbors-223/+198
Rewrite and refactor format_args!() builtin macro. This is a near complete rewrite of `compiler/rustc_builtin_macros/src/format.rs`. This gets rid of the massive unmaintanable [`Context` struct](https://github.com/rust-lang/rust/blob/76531befc4b0352247ada67bd225e8cf71ee5686/compiler/rustc_builtin_macros/src/format.rs#L176-L263), and splits the macro expansion into three parts: 1. First, `parse_args` will parse the `(literal, arg, arg, name=arg, name=arg)` syntax, but doesn't parse the template (the literal) itself. 2. Second, `make_format_args` will parse the template, the format options, resolve argument references, produce diagnostics, and turn the whole thing into a `FormatArgs` structure. 3. Finally, `expand_parsed_format_args` will turn that `FormatArgs` structure into the expression that the macro expands to. In other words, the `format_args` builtin macro used to be a hard-to-maintain 'single pass compiler', which I've split into a three phase compiler with a parser/tokenizer (step 1), semantic analysis (step 2), and backend (step 3). (It's compilers all the way down. ^^) This can serve as a great starting point for https://github.com/rust-lang/rust/issues/99012, which will only need to change the implementation of 3, while leaving step 1 and 2 unchanged. It also makes https://github.com/rust-lang/compiler-team/issues/541 easier, which could then upgrade the new `FormatArgs` struct to an `ast` node and remove step 3, moving that step to later in the compilation process. It also fixes a few diagnostics bugs. This also [significantly reduces](https://gist.github.com/m-ou-se/b67b2d54172c4837a5ab1b26fa3e5284) the amount of generated code for cases with arguments in non-default order without formatting options, like `"{1} {0}"` or `"{a} {}"`, etc.
2022-09-28Deduplicate some logicmejrs-15/+15
2022-09-27Add newlinemejrs-3/+3
2022-09-27Use already resolved self_ty in confirm_fn_pointer_candidateMichael Goulet-0/+54
2022-09-27Rollup merge of #102284 - compiler-errors:missing-type-in-raw-ptr, r=davidtwcoMatthias Krüger-4/+31
Structured suggestion for missing `mut`/`const` in raw pointer Fixes #102261
2022-09-27Rollup merge of #102281 - RalfJung:invalid-enums, r=cjgillotMatthias Krüger-112/+226
make invalid_value lint a bit smarter around enums Fixes https://github.com/rust-lang/rust/issues/102043
2022-09-27Address feedbackmejrs-12/+64
2022-09-27Wrapper suggestionsmejrs-0/+166
2022-09-27Bless stats.Camille GILLOT-6/+6
2022-09-27Rework "inner attribute not permitted" errorsXiretza-1/+1
2022-09-27Migrate more rustc_parse diagnostics to diagnostic structsXiretza-4/+4
2022-09-27Migrate "invalid literal suffix" diagnostic to diagnostic structsXiretza-18/+18
2022-09-27Migrate more diagnostics in rustc_parse to diagnostic structsXiretza-2/+2
2022-09-27Support bindings with anon consts in genericsMichael Goulet-0/+15
2022-09-27Deny associated type bindings within associated type bindingsMichael Goulet-2/+73
2022-09-27Do not overwrite binders for another HirId.Camille GILLOT-0/+61
2022-09-28improve errors for incomplete functions in struct definitionsTakayuki Maeda-5/+25
2022-09-27Stabilize bench_black_boxUrgau-16/+3
2022-09-27also query type_uninhabited_fromRalf Jung-37/+38
2022-09-27core: Mark all safe intrinsics with #[rustc_safe_intrinsic]Arthur Cohen-2/+9
2022-09-27attributes: Add #[rustc_safe_intrinsic] builtinArthur Cohen-1/+9
2022-09-27Fix ICE in const_trait check codeDeadbeef-0/+34
This fixes #102156.
2022-09-27Update test.Mara Bos-6/+4
2022-09-27Update tests.Mara Bos-209/+186
2022-09-27Rewrite and refactor format_args!() builtin macro.Mara Bos-8/+8
2022-09-27Auto merge of #102306 - lcnr:rustc_hir_analysis, r=compiler-errorsbors-2/+2
rename rustc_typeck to rustc_hir_analysis first part of https://github.com/rust-lang/compiler-team/issues/529 r? `@compiler-errors`
2022-09-27rustc_typeck to rustc_hir_analysislcnr-2/+2
2022-09-27Structured suggestion for missing mut/const in pointerMichael Goulet-4/+31
2022-09-27fix a ui testTakayuki Maeda-0/+2
2022-09-27add a label to struct/enum/union ident nameTakayuki Maeda-6/+65
2022-09-26remove implied link bound per reviewMatthew Kelly-2/+3
also update .stderr outputs
2022-09-26Merge remote-tracking branch 'origin/master' into ↵Matthew Kelly-4764/+11803
mpk/add-long-error-message-for-E0311
2022-09-26Enable inline stack probes on PowerPC and SystemZJosh Stone-8/+23