about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2022-10-26No need to probe when relating opaques in nll_relateMichael Goulet-0/+24
2022-10-26Process registered region obligation in resolve_regions_with_wf_tysMichael Goulet-0/+36
2022-10-26Auto merge of #103572 - Dylan-DPC:rollup-a8bnxrw, r=Dylan-DPCbors-122/+25
Rollup of 6 pull requests Successful merges: - #95710 (Stabilize arbitrary_enum_discriminant, take 2) - #102706 (Support excluding the generation of the standalone docs) - #103428 (Removed verbose printing from the `PrettyPrinter` when printing constants) - #103543 (Update books) - #103546 (interpret: a bit of cast cleanup) - #103554 (rustdoc: add visible focus outline to rustdoc-toggle) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-26privacy: Rename "accessibility levels" to "effective visibilities"Vadim Petrochenkov-209/+209
And a couple of other naming tweaks Related to https://github.com/rust-lang/rust/issues/48054
2022-10-26Rollup merge of #103428 - SarthakSingh31:issue-94187, r=compiler-errorsDylan DPC-0/+13
Removed verbose printing from the `PrettyPrinter` when printing constants Partially solves #94187 by completing the first step described in [this comment](https://github.com/rust-lang/rust/issues/94187#issuecomment-1282339909).
2022-10-26Rollup merge of #95710 - ↵Dylan DPC-122/+12
fee1-dead-contrib:stabilize_arbitrary_enum_discriminant, r=joshtriplett Stabilize arbitrary_enum_discriminant, take 2 Documentation has been updated in https://github.com/rust-lang/reference/pull/1055. cc #86860 for previous stabilization report. Not yet marks https://github.com/rust-lang/rust/issues/60553 as done: need documentation in the rust reference.
2022-10-26Adjust normalizationmejrs-16/+16
2022-10-26Auto merge of #103284 - compiler-errors:const-sad, r=oli-obkbors-3/+19
Revert "Unify tcx.constness and param env constness checks" Too much of a perf regression https://github.com/rust-lang/rust/pull/102975#issuecomment-1282702513, and an attempt in #103263 didn't fix it except for just a tiny bit. This change isn't really needed (see https://github.com/rust-lang/rust/pull/102830#issuecomment-1272514096), so this should be an easy revert.
2022-10-26Auto merge of #103562 - Dylan-DPC:rollup-sheepp5, r=Dylan-DPCbors-37/+210
Rollup of 10 pull requests Successful merges: - #102951 (suggest type annotation for local statement initialed by ref expression) - #103209 (Diagnostic derives: allow specifying multiple alternative suggestions) - #103287 (Use a faster allocation size check in slice::from_raw_parts) - #103416 (Name the `impl Trait` in region bound suggestions) - #103430 (Workaround unstable stmt_expr_attributes for method receiver expressions) - #103444 (Remove extra type error after missing semicolon error) - #103520 (rustc_middle: Rearrange resolver outputs structures slightly) - #103533 (Use &self instead of &mut self for cast methods) - #103536 (Remove `rustc_driver::set_sigpipe_handler()`) - #103542 (Pinning tests for some `macro_rules!` errors discussed in the lang meeting) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-26Rollup merge of #103542 - scottmcm:invalid-macro-patterns, r=compiler-errorsDylan DPC-0/+28
Pinning tests for some `macro_rules!` errors discussed in the lang meeting r? ``@nikomatsakis`` Mind just stamping these, since they were useful for the meeting discussion today?
2022-10-26Rollup merge of #103444 - chenyukang:yukang/fix-103425-extra-diag, r=davidtwcoDylan DPC-0/+44
Remove extra type error after missing semicolon error Fixes #103425
2022-10-26Rollup merge of #103430 - cjgillot:receiver-attrs, r=petrochenkovDylan DPC-14/+17
Workaround unstable stmt_expr_attributes for method receiver expressions Fixes https://github.com/rust-lang/rust/issues/103244 cc ``@Mark-Simulacrum`` ``@ehuss``
2022-10-26Rollup merge of #103416 - compiler-errors:rpit-named, r=cjgillotDylan DPC-23/+23
Name the `impl Trait` in region bound suggestions Slightly more descriptive message
2022-10-26Rollup merge of #102951 - SparrowLii:type_annotation, r=estebankDylan DPC-0/+98
suggest type annotation for local statement initialed by ref expression In a local statement with a type declaration, if a ref expression is used on the right side and not used on the left side, in addition to removing the `&` and `&mut` on the right side, we can add them on the left side alternatively Fixes #102892
2022-10-26Auto merge of #103279 - compiler-errors:normalize-hack-back, r=lcnrbors-0/+31
Add eval hack in `super_relate_consts` back Partially reverts 01adb7e98d5656c06497f33dd2747df144e78356. This extra eval call *still* needs to happen, for example, in `normalize_param_env_or_error` when a param-env predicate has an unnormalized constant, since the param-env candidates never get normalized during candidate assembly (everywhere else we can assume that they are normalized fully). r? `@lcnr,` though I feel like I've assigned quite a few PRs to you in the last few days, so feel free to reassign to someone else familiar with this code if you're busy! cc #103243 (fixes the issue, but don't want to auto-close that until a backport is performed).
2022-10-25Modify ui tests to reflect the changeByron Zhong-10/+11
2022-10-26Auto merge of #103158 - Bryanskiy:resolve_perf, r=petrochenkovbors-6/+6
Perf improvements for effective visibility calculating related to https://github.com/rust-lang/rust/pull/102026 r? `@petrochenkov`
2022-10-25diagnostics: add test case for issue 102354Michael Howell-0/+34
2022-10-26add testcase for suggest selfyukang-1/+28
2022-10-25Pinning tests for some macro_rules things discussed in the lang meetingScott McMurray-0/+28
2022-10-26suggest calling the method of the same name when method not foundyukang-4/+49
2022-10-25Name impl trait in region bound suggestionMichael Goulet-23/+23
2022-10-25Move a wf-check into the site where the value is instantiatedOli Scherer-12/+12
2022-10-25adopt to compiler changesMaybe Waffle-9/+20
2022-10-25add a test for gate `impl_trait_in_fn_trait_return`Maybe Waffle-0/+21
2022-10-25--blessMaybe Waffle-89/+106
2022-10-25Add even more tests for `impl Fn() -> impl Trait`Maybe Waffle-1/+53
2022-10-25Add more tests for `impl Fn() -> impl Trait`Maybe Waffle-0/+106
2022-10-25Allow `impl Fn() -> impl Trait` in return positionMaybe Waffle-66/+61
This allows writing the following function signatures: ```rust fn f0() -> impl Fn() -> impl Trait; fn f3() -> &'static dyn Fn() -> impl Trait; ``` These signatures were already allowed for common traits and associated types, there is no reason why `Fn*` traits should be special in this regard.
2022-10-25Fix #103451, find_width_of_character_at_span return width with 1 when ↵yukang-0/+37
reaching end
2022-10-25Perf improvements for effective visibility calculatingBryanskiy-6/+6
2022-10-25add a test to verify that compile-flags are provided lastPietro Albini-0/+8
2022-10-25Added helper to prevent verbose printing from the `PrettyPrinter` when ↵Sarthak Singh-0/+13
printing constants
2022-10-25Rollup merge of #103409 - compiler-errors:rpitit-signature-mismatch, r=lcnrYuki Okushi-0/+37
Delay span bug when we can't map lifetimes back in `collect_trait_impl_trait_tys` When a lifetime is late-bound in a trait signature, but early-bound in an impl signature, we already emit an error -- however, we also ICE in `collect_trait_impl_trait_tys`, so just delay a bug here. Fixes #103407
2022-10-25Rollup merge of #103382 - compiler-errors:anon-apit-lt-region-ice, r=cjgillotYuki Okushi-0/+28
Don't ICE when reporting borrowck errors involving regions from `anonymous_lifetime_in_impl_trait` The issue here is that when we have: ``` trait Trait<'a> { .. } fn foo(arg: impl Trait) { .. } ``` The anonymous lifetime `'_` that we generate for `arg: impl Trait` doesn't end up in the argument type (which is a param) but in a where-clause of the function, in a predicate whose self type is that param ty. Fixes #101660 r? ``@cjgillot``
2022-10-25Rollup merge of #103350 - clubby789:refer-to-assoc-method, r=wesleywiserYuki Okushi-9/+44
Change terminology for assoc method suggestions when they are not called Fixes #103325 ```@rustbot``` label +A-diagnostics
2022-10-25Rollup merge of #103333 - chenyukang:yukang/fix-103143, r=wesleywiserYuki Okushi-0/+25
Fix assertion failed for break_last_token and trailing token Fixes #103143
2022-10-24Add more normalization and testsmejrs-5/+88
2022-10-24Delay span bug when we can't map lifetimes back in collect_trait_impl_trait_tysMichael Goulet-0/+37
2022-10-24Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard errorAaron Hill-100/+36
2022-10-24Auto merge of #94063 - Aaron1011:pretty-print-rental, r=lcnrbors-105/+321
Only apply `ProceduralMasquerade` hack to older versions of `rental` The latest version of `rental` (v0.5.6) contains a fix that allows it to compile without relying on the pretty-print back-compat hack. Hopefully, there are no longer any crates relying on the affected versions of the (much less popular) `procedural-masquerade` crate. This should allow us to target the pretty-print back-compat hack specifically to older versions of `rental`, and specifically mention upgrading to `rental` v0.5.6 in the lint message.
2022-10-24fix parentheses surrounding spacing issue in parseryukang-5/+27
2022-10-24suggest type annotation for local statement initialed by ref expressionSparrowLii-0/+98
2022-10-24Port `dead_code` lints to be translatable.Charles Lew-6/+6
2022-10-24fix #103435, unused lint won't produce invalid codeyukang-0/+75
2022-10-24fix #103425, remove extra type error after missing semicolon erroryukang-0/+44
2022-10-23Cleanup message and bless testsJack Huey-15/+15
2022-10-23Enable varargs support for calling conventions other than C or cdeclSoveu-21/+104
This patch makes it possible to use varargs for calling conventions, which are either based on C (like efiapi) or C is based on them (for example sysv64 and win64).
2022-10-23Rollup merge of #103414 - compiler-errors:rpit-print-lt, r=cjgillotMichael Howell-21/+21
Pretty print lifetimes captured by RPIT This specifically makes the output in #103409 change from: ```diff error: `impl` item signature doesn't match `trait` item signature --> $DIR/signature-mismatch.rs:15:5 | LL | fn async_fn(&self, buff: &[u8]) -> impl Future<Output = Vec<u8>>; | ----------------------------------------------------------------- expected `fn(&'1 Struct, &'2 [u8]) -> impl Future<Output = Vec<u8>>` ... LL | fn async_fn<'a>(&self, buff: &'a [u8]) -> impl Future<Output = Vec<u8>> + 'a { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 Struct, &'2 [u8]) -> impl Future<Output = Vec<u8>>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 Struct, &'2 [u8]) -> impl Future<Output = Vec<u8>> + '2` | = note: expected `fn(&'1 Struct, &'2 [u8]) -> impl Future<Output = Vec<u8>>` - found `fn(&'1 Struct, &'2 [u8]) -> impl Future<Output = Vec<u8>>` + found `fn(&'1 Struct, &'2 [u8]) -> impl Future<Output = Vec<u8>> + '2` = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait` = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output error: aborting due to previous error ``` Along with the UI tests in this PR, which I think are all improvements! r? `@oli-obk` though feel free to re-roll
2022-10-23Rollup merge of #103402 - joshtriplett:niche-wrap-fix, r=oli-obkMichael Howell-51/+69
Fix wrapped valid-range handling in ty_find_init_error Rust's niche handling allows for wrapping valid ranges with end < start; for instance, a valid range with start=43 and end=41 means a niche of 42. Most places in the compiler handle this correctly, but `ty_find_init_error` assumed that `lo > 0` means the type cannot contain a zero. Fix it to handle wrapping ranges.