about summary refs log tree commit diff
path: root/tests/ui
AgeCommit message (Collapse)AuthorLines
2023-03-21Return equal for two identical projectionsyukang-0/+41
2023-03-20Enforce non-lifetime-binders in supertrait preds are not object safeMichael Goulet-0/+80
2023-03-21Avoid ICE of attempt to add with overflow in emitteryukang-0/+46
2023-03-20Add `known-bug` test for typeid unsoundness issueEvgenii Zheltonozhskii-0/+52
2023-03-20Rollup merge of #109364 - compiler-errors:gat-const-arg, r=BoxyUwUMatthias Krüger-0/+29
Only expect a GAT const param for `type_of` of GAT const arg IDK why we were account for both `is_ty_or_const` instead of just for a const param, since we're computing the `type_of` a const param specifically. Fixes #109300
2023-03-20Rollup merge of #109307 - cjgillot:inline-location, r=compiler-errorsMatthias Krüger-2/+26
Ignore `Inlined` spans when computing caller location. Fixes https://github.com/rust-lang/rust/issues/105538
2023-03-20Rollup merge of #109277 - spastorino:new-rpitit-14, r=compiler-errorsMatthias Krüger-3/+51
Fix generics_of for impl's RPITIT synthesized associated type The only useful commit is the last one. This makes `generics_of` for the impl side RPITIT copy from the trait's associated type and avoid the fn on the impl side which was previously wrongly used. This solution is better but we still need to fix resolution of the generated generics. r? ``@compiler-errors``
2023-03-20feat: implement error recovery in `expected_ident_found`Ezra Shaw-33/+96
2023-03-20Rollup merge of #109370 - DaniPopes:issue-109334, r=NilstriebMatthias Krüger-13/+38
fix ClashingExternDeclarations lint ICE Fixes #109334 First "real" contribution, please let me know if I did something wrong. As I understand it, it's OK if a `#[repr(transparent)]` type has no non-zero sized types (aka is a ZST itself) and the function should just return the type normally instead of panicking r? `@Nilstrieb`
2023-03-20Rollup merge of #109301 - Ezrashaw:fix-ctf-ice, r=NilstriebMatthias Krüger-0/+25
fix: fix ICE in `custom-test-frameworks` feature Fixes #107454 Simple fix to emit error instead of ICEing. At some point, all the code in `tests.rs` should be refactored, there is a bit of duplication (this PR's code is repeated five times over lol). r? `@Nilstrieb` (active on the linked issue?)
2023-03-20Walk un-shifted nested `impl Trait` in trait when setting up default trait ↵Michael Goulet-0/+6
method assumptions
2023-03-20Auto merge of #108148 - parthopdas:master, r=oli-obkbors-0/+88
Implementing "<test_binary> --list --format json" for use by IDE test explorers / runners Fixes #107307 PR 1 of 2 - wiring up just the new information + implement the command line changes i.e. --format json + tests upcoming: PR 2 of 2 - clean up "#[cfg(not(bootstrap))]" from PR 1 As per the discussions on - MCP: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Implementing.20.22.3Ctest_binary.3E.20--list.20--form.E2.80.A6.20compiler-team.23592/near/328747548 - preRFC: https://internals.rust-lang.org/t/pre-rfc-implementing-test-binary-list-format-json-for-use-by-ide-test-explorers-runners/18308 - FYI on Discord: https://discord.com/channels/442252698964721669/459149169546887178/1075581549409484820
2023-03-20fix ClashingExternDeclarations lint ICEDaniPopes-13/+38
2023-03-19Only expect a GAT const argMichael Goulet-0/+29
2023-03-20Lint ambiguous glob re-exports许杰友 Jieyou Xu (Joe)-7/+90
2023-03-19fix: modify the condition that `resolve_imports` stopsbohan-0/+83
2023-03-19Rollup merge of #109243 - chenyukang:yukang/fix-ice-109144, r=petrochenkovDylan DPC-0/+13
The name of NativeLib will be presented Fixes #109144 I was working on a quick fix, but found change the name from `Option<Symbol>` to `Symbol` make life a little bit easier.
2023-03-19Rollup merge of #109212 - Ezrashaw:no-similar-sugg-for-unstable, r=estebankDylan DPC-0/+47
fix: don't suggest similar method when unstable Fixes #109177 Don't display typo suggestions for unstable things, unless the feature flag is enabled. AFAIK, there are two places this occurs: - `rustc_resolve`: before type checking, effectively just `FnCtxt::Free`. - `rustc_hir_typck`: during type checking, for `FnCtxt::Assoc(..)`s. The linked issue is about the latter, obviously the issue is applicable to both. r? `@estebank`
2023-03-19Rollup merge of #109003 - GuillaumeGomez:useless-anonymous-reexport-lint, ↵Dylan DPC-4/+80
r=cjgillot Add `useless_anonymous_reexport` lint This is a follow-up of https://github.com/rust-lang/rust/pull/108936. We once again show all anonymous re-exports in rustdoc, however we also wanted to add a lint to let users know that it very likely doesn't have the effect they think it has.
2023-03-19Rollup merge of #104100 - ink-feather-org:const_iter_range, r=the8472,fee1-deadDylan DPC-15/+1
Allow using `Range` as an `Iterator` in const contexts. ~~based on #102225 by `@fee1-dead~~`
2023-03-19fix: fix ICE in `custom-test-frameworks` featureEzra Shaw-0/+25
2023-03-19refactor: improve "ident starts with number" errorEzra Shaw-4/+20
2023-03-19Delay overlap errors if errors are involvedMichael Goulet-7/+10
2023-03-19Constrain const vars to error if const types are mismatchedMichael Goulet-4/+26
2023-03-19The name of NativeLib will be presentedyukang-0/+13
2023-03-18Ignore `Inlined` spans when computing caller location.Camille GILLOT-2/+26
2023-03-18Rollup merge of #109238 - spastorino:new-rpitit-12, r=compiler-errorsMatthias Krüger-1/+16
Fix generics mismatch errors for RPITITs on -Zlower-impl-trait-in-trait-to-assoc-ty This PR stops reporting errors due to different count of generics on the new synthesized associated types for RPITITs. Those were already reported when we compare the function on the triat with the function on the impl. r? ``@compiler-errors``
2023-03-18Rollup merge of #109193 - spastorino:new-rpitit-11, r=compiler-errorsMatthias Krüger-20/+339
Add revisions for -Zlower-impl-trait-in-trait-to-assoc-ty fixed tests Needs to go on top of #109198 r? ``@compiler-errors``
2023-03-18Rollup merge of #107416 - czzrr:issue-80618, r=GuillaumeGomezMatthias Krüger-34/+60
Error code E0794 for late-bound lifetime parameter error. This PR addresses [#80618](https://github.com/rust-lang/rust/issues/80618).
2023-03-18Mark DoubleEndedIterator as #[const_trait] using rustc_do_not_const_check, ↵onestacked-15/+1
implement const Iterator and DoubleEndedIterator for Range.
2023-03-18fix: don't suggest similar method when unstableEzra Shaw-0/+47
2023-03-18Rollup merge of #109251 - MU001999:master, r=NilstriebMatthias Krüger-0/+25
Suggest surrounding the macro with `{}` to interpret as a statement Fixes #109237
2023-03-18Rollup merge of #109248 - compiler-errors:get_fn_decl-aaa, r=WaffleLapkinMatthias Krüger-0/+22
Pass the right HIR back from `get_fn_decl` Fixes #109232 Makes sure that the `fn_id: HirId` that we pass to `suggest_missing_return_type` matches up with the `fn_decl: hir::FnDecl` that we pass to it, so the late-bound vars that we fetch from the former match up with the types in the latter... This HIR suggestion code really needs a big refactor. I've tried to do it in the past (a couple of attempts), but it's a super tangled mess. It really shouldn't be passing around things like `hir::Node` and just deal with `LocalDefId`s everywhere... Anyways, I'd rather fix this ICE, now.
2023-03-18Rollup merge of #109222 - chenyukang:yukang/fix-109143, r=petrochenkovMatthias Krüger-2/+24
Do not ICE for unexpected lifetime with ConstGeneric rib Fixes #109143 r? ````@petrochenkov```` Combining this test with the previous test will affect the previous diagnostics, so I added a separate test case.
2023-03-18Rollup merge of #109200 - compiler-errors:issue-109191, r=WaffleLapkinMatthias Krüger-0/+24
Fix index out of bounds in `suggest_trait_fn_ty_for_impl_fn_infer` Fixes #109191
2023-03-18Rollup merge of #109102 - compiler-errors:ambig-assoc-in-non-lt-binder, ↵Matthias Krüger-0/+29
r=jackh726 Erase escaping late-bound regions when probing for ambiguous associated types Fixes #109090
2023-03-17Fix generics_of for impl's RPITIT synthesized associated typeSantiago Pastorino-0/+10
2023-03-17Fix impl_trait_ty_to_ty substsSantiago Pastorino-3/+41
2023-03-17Add revisions for -Zlower-impl-trait-in-trait-to-assoc-ty fixed testsSantiago Pastorino-20/+339
2023-03-17Add generic parameters mismatch test for async in traitsSantiago Pastorino-0/+31
2023-03-17Fix generics mismatch errors for RPITITs on ↵Santiago Pastorino-1/+16
-Zlower-impl-trait-in-trait-to-assoc-ty
2023-03-17Pass the right HIR back from get_fn_declMichael Goulet-0/+22
2023-03-17Erase escaping late-bound regions when probing for ambiguous associated typesMichael Goulet-0/+29
2023-03-17Drop subslices of arraysclubby789-0/+16
2023-03-17Rollup merge of #109198 - compiler-errors:new-rpitit-default-body, r=spastorinoMatthias Krüger-24/+254
Install projection from RPITIT to default trait method opaque correctly 1. For new lowering strategy `-Zlower-impl-trait-in-trait-to-assoc-ty`, install the correct default trait method projection predicates (RPITIT -> opaque). This makes default trait body tests pass! 2. Fix two WF-checking bugs -- first, we want to make sure that we're always looking for an opaque type in `check_return_position_impl_trait_in_trait_bounds`. That's because the RPITIT projections are normalized to opaques during wfcheck. Second, fix RPITIT's param-envs by not adding the projection predicates that we install on trait methods to make default RPITITs work -- I left a comment why. 3. Also, just a small drive-by for `rustc_on_unimplemented`. Not sure if it affects any tests, but can't hurt. r? ````@spastorino,```` based off of #109140
2023-03-17Suggest surrounding the macro with `{}` to interpret as a statementMu42-0/+25
2023-03-17Do not ICE for unexpected lifetime with ConstGeneric ribyukang-2/+24
2023-03-16Auto merge of #106824 - m-ou-se:format-args-flatten, r=oli-obkbors-12/+46
Flatten/inline format_args!() and (string and int) literal arguments into format_args!() Implements https://github.com/rust-lang/rust/issues/78356 Gated behind `-Zflatten-format-args=yes`. Part of #99012 This change inlines string literals, integer literals and nested format_args!() into format_args!() during ast lowering, making all of the following pairs result in equivalent hir: ```rust println!("Hello, {}!", "World"); println!("Hello, World!"); ``` ```rust println!("[info] {}", format_args!("error")); println!("[info] error"); ``` ```rust println!("[{}] {}", status, format_args!("error: {}", msg)); println!("[{}] error: {}", status, msg); ``` ```rust println!("{} + {} = {}", 1, 2, 1 + 2); println!("1 + 2 = {}", 1 + 2); ``` And so on. This is useful for macros. E.g. a `log::info!()` macro could just pass the tokens from the user directly into a `format_args!()` that gets efficiently flattened/inlined into a `format_args!("info: {}")`. It also means that `dbg!(x)` will have its file, line, and expression name inlined: ```rust eprintln!("[{}:{}] {} = {:#?}", file!(), line!(), stringify!(x), x); // before eprintln!("[example.rs:1] x = {:#?}", x); // after ``` Which can be nice in some cases, but also means a lot more unique static strings than before if dbg!() is used a lot.
2023-03-16Add test for -Zflatten-format-args=yes.Mara Bos-0/+24
2023-03-16Auto merge of #109206 - matthiaskrgr:rollup-oev8ax6, r=matthiaskrgrbors-1/+253
Rollup of 10 pull requests Successful merges: - #108875 (rustdoc: fix type search for `Option` combinators) - #108971 (error-msg: impl better suggestion for `E0532`) - #109139 (rustdoc: DocFS: Replace rayon with threadpool and enable it for all targets) - #109151 (Assert def-kind is correct for alias types) - #109158 (error-msg: expand suggestion for `unused_def` lint) - #109166 (make `define_opaque_types` fully explicit) - #109171 (Some cleanups in our normalization logic) - #109180 (Unequal → Not equal) - #109185 (rustdoc: remove `std::` from primitive intra-doc link tooltips) - #109192 (Mention UEFI target promotion in release notes for 1.67.0) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup