summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2023-01-21Revert "Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error"Mark Rousskov-36/+100
This reverts commit 7d82cadd97acc66993b69304c5a1a04ef7d1fa36.
2023-01-21Add testMichael Goulet-0/+26
2023-01-19Correct detection of elided lifetimes in impl-trait.Camille GILLOT-0/+5
2023-01-19Do not filter substs in `remap_generic_params_to_declaration_params`.Camille GILLOT-0/+39
The relevant filtering should have been performed by borrowck.
2023-01-19Revert "Make nested RPITIT inherit the parent opaque's generics." and adjust ↵Michael Goulet-1/+3
test This reverts commit e2d41f4c974f0cc09e5aafb02883f222487610f9.
2022-12-28Auto merge of #106163 - compiler-errors:🅱-IMPLIED_BOUNDS_ENTAILMENT, ↵bors-0/+75
r=Mark-Simulacrum Backport `IMPLIED_BOUNDS_ENTAILMENT` lint r? `@Mark-Simulacrum` as requested https://github.com/rust-lang/rust/pull/105575#issuecomment-1365490589
2022-12-27Switch `#[track_caller]` back to a no-op unless feature gate is enabledBryan Garza-6/+66
This patch fixes a regression, in which `#[track_caller]`, which was previously a no-op, was changed to actually turn on the behavior. This should instead only happen behind the `closure_track_caller` feature gate. Also, add a warning for the user to understand how their code will compile depending on the feature gate being turned on or not. Fixes #104588
2022-12-26Downgrade IMPLIED_BOUNDS_ENTAILMENT to warn by default, add it to builtin ↵Michael Goulet-26/+16
lint list
2022-12-26Add IMPLIED_BOUNDS_ENTAILMENT lintMichael Goulet-0/+85
2022-12-26add simulated non-regression test for issue 105637Rémy Rakic-0/+52
2022-12-26Revert "Replace usage of `ResumeTy` in async lowering with `Context`"Andrew Pollack-23/+16
2022-12-09Auto merge of #105486 - matthiaskrgr:rollup-o7c4l1c, r=matthiaskrgrbors-0/+52
Rollup of 10 pull requests Successful merges: - #105216 (Remove unused GUI test) - #105245 (attempt to clarify align_to docs) - #105387 (Improve Rustdoc scrape-examples UI) - #105389 (Enable profiler in dist-powerpc64le-linux) - #105427 (Dont silently ignore rustdoc errors) - #105442 (rustdoc: clean up docblock table CSS) - #105443 (Move some queries and methods) - #105455 (use the correct `Reveal` during validation) - #105470 (Clippy: backport ICE fix before beta branch) - #105474 (lib docs: fix typo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-09Rollup merge of #105455 - lcnr:correct-reveal-in-validate, r=jackh726Matthias Krüger-0/+52
use the correct `Reveal` during validation supersedes #105454. Deals with https://github.com/rust-lang/rust/issues/105009#issuecomment-1342395333, not closing #105009 as the ICE may leak into beta The issue was the following: - we optimize the mir, using `Reveal::All` - some optimization relies on the hidden type of an opaque type - we then validate using `Reveal::UserFacing` again which is not able to observe the hidden type r? `@jackh726`
2022-12-09Auto merge of #104449 - oli-obk:unhide_unknown_spans, r=estebank,RalfJungbors-713/+2025
Start emitting labels even if their pointed to file is not available locally r? `@estebank` cc `@RalfJung` fixes #97699
2022-12-08Rollup merge of #105408 - cuviper:help-rpitirpit, r=compiler-errorsMatthias Krüger-0/+6
Add help for `#![feature(impl_trait_in_fn_trait_return)]` This adds a new variant `ImplTraitContext::FeatureGated`, so we can generalize the help for `return_position_impl_trait_in_trait` to also work for `impl_trait_in_fn_trait_return`. cc #99697
2022-12-08Rollup merge of #105255 - cjgillot:issue-105197, r=compiler-errorsMatthias Krüger-0/+17
Make nested RPIT inherit the parent opaque's generics. Fixes https://github.com/rust-lang/rust/issues/105197 r? ```@compiler-errors```
2022-12-08Rollup merge of #104922 - estebank:fur-elize, r=oli-obkMatthias Krüger-11/+179
Detect long types in E0308 and write them to disk On type error with long types, print an abridged type and write the full type to disk. Print the widest possible short type while still fitting in the terminal.
2022-12-08add regression test for #105009lcnr-0/+52
2022-12-07Rollup merge of #105400 - BoxyUwU:braced_param_evaluatability, r=oli-obkMatthias Krüger-0/+12
normalize before handling simple checks for evaluatability of `ty::Const` `{{{{{{{ N }}}}}}}` is desugared into a `ConstKind::Unevaluated` for an anonymous `const` item so when calling `is_const_evaluatable` on it we skip the `ConstKind::Param(_) => Ok(())` arm which is incorrect.
2022-12-07Rollup merge of #105267 - compiler-errors:issue-104613, r=oli-obkMatthias Krüger-0/+54
Don't ICE in ExprUseVisitor on FRU for non-existent struct Fixes #104613 Fixes #105202
2022-12-07Make -Zsimulate-remapped-rust-src-base reproducible on CIOli Scherer-9/+9
2022-12-07Auto merge of #104799 - pcc:linkage-fn, r=tmiaskobors-30/+15
Support Option and similar enums as type of static variable with linkage attribute Compiler MCP: rust-lang/compiler-team#565
2022-12-07Avoid remapping paths back to `$SRC_DIR` in CIOli Scherer-6/+6
2022-12-06Add help for `#![feature(impl_trait_in_fn_trait_return)]`Josh Stone-0/+6
This adds a new variant `ImplTraitContext::FeatureGated`, so we can generalize the help for `return_position_impl_trait_in_trait` to also work for `impl_trait_in_fn_trait_return`.
2022-12-06normalize before matching on `ConstKind`Boxy-0/+12
2022-12-06Rollup merge of #105358 - TaKO8Ki:fix-104260, r=estebankMatthias Krüger-0/+14
Add a test for #104260 Fixes #104260
2022-12-06Filter out precise alloc ids from diagnosticsOli Scherer-2/+3
2022-12-06Bless 32 bit testsOli Scherer-82/+120
2022-12-06Properly indent messagesOli Scherer-7/+13
2022-12-06Change CTFE backtraces to use `note` instead of `label` to preserve their orderOli Scherer-641/+1857
labels are reordered within the file in which they are reported, which can mess up the stack trace
2022-12-06Remove now-redundant file/line info from const backtracesOli Scherer-416/+416
2022-12-06Start emitting labels even if their pointed to file is not available locallyOli Scherer-0/+51
2022-12-06Rollup merge of #105349 - compiler-errors:point-at-assoc-ct-fn-ptr-arg, ↵Matthias Krüger-2/+4
r=cjgillot Point at args in associated const fn pointers Tiny follow-up to #105201, not so sure it's worth it but :shrug: The UI test example is a bit more compelling when it's `GlUniformScalar::FACTORY` r? `@cjgillot`
2022-12-06Rollup merge of #105286 - willcrichton:maximal-hir-to-mir-coverage, r=cjgillotMatthias Krüger-0/+10
Add -Z maximal-hir-to-mir-coverage flag This PR adds a new unstable flag `-Z maximal-hir-to-mir-coverage` that changes the behavior of `maybe_lint_level_root_bounded`, pursuant to [a discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Mapping.20MIR.20to.20HIR). When enabled, this function will not search upwards for a lint root, but rather immediately return the provided HIR node ID. This change increases the granularity of the mapping between MIR locations and HIR nodes inside the `SourceScopeLocalData` data structures. This increase in granularity is useful for rustc consumers like [Flowistry](https://github.com/willcrichton/flowistry) that rely on getting source-mapping information about the MIR CFG that is as precise as possible. A test `maximal_mir_to_hir_coverage.rs` has been added to verify that this flag does not break anything. r? `@cjgillot` cc `@gavinleroy`
2022-12-06Rollup merge of #105250 - Swatinem:async-rm-resumety, r=oli-obkMatthias Krüger-16/+23
Replace usage of `ResumeTy` in async lowering with `Context` Replaces using `ResumeTy` / `get_context` in favor of using `&'static mut Context<'_>`. Usage of the `'static` lifetime here is technically "cheating", and replaces the raw pointer in `ResumeTy` and the `get_context` fn that pulls the correct lifetimes out of thin air. fixes https://github.com/rust-lang/rust/issues/104828 and https://github.com/rust-lang/rust/pull/104321#issuecomment-1336363077 r? `@oli-obk`
2022-12-06Rollup merge of #105174 - chenyukang:yukang/fix-105028-unused, r=eholkMatthias Krüger-1/+30
Suggest removing struct field from destructive binding only in shorthand scenario Fixes #105028
2022-12-06Rollup merge of #105004 - TaKO8Ki:fix-104897, r=wesleywiserMatthias Krüger-0/+49
Fix `emit_unused_delims_expr` ICE Fixes #104897 This is also related to #104433.
2022-12-06Rollup merge of #105340 - estebank:ice-ice-baby, r=compiler-errorsMatthias Krüger-0/+130
Avoid ICE by accounting for missing type Fix #105330
2022-12-06Rollup merge of #105339 - BoxyUwU:wf_ct_kind_expr, r=TaKO8KiMatthias Krüger-0/+42
support `ConstKind::Expr` in `is_const_evaluatable` and `WfPredicates::compute` Fixes #105205 Currently we haven't implemented a way to evaluate `ConstKind::Expr(Expr::Binop(Add, 1, 2))` so I just left that with a `FIXME` and a `delay_span_bug` since I have no idea how to do that and it would make this a much larger (and more complicated) PR :P
2022-12-06Rollup merge of #105318 - compiler-errors:issue-105304, r=jackh726Matthias Krüger-0/+37
Make `get_impl_future_output_ty` work with AFIT Fixes #105304
2022-12-06Rollup merge of #105310 - compiler-errors:issue-105288, r=eholkMatthias Krüger-0/+13
Be more careful about unresolved exprs in suggestion Fixes #105288
2022-12-06Rollup merge of #105287 - compiler-errors:issue-105275, r=eholkMatthias Krüger-0/+22
Synthesize substitutions for bad auto traits in dyn types Auto traits are stored as just `DefId`s inside a `dyn Trait`'s existential predicates list. This is usually fine, since auto traits are forbidden to have generics -- but this becomes a problem for an ill-formed auto trait. But since this will always result in an error, just synthesize some dummy (error) substitutions which are used at least to keep trait selection code happy about the number of substs in a trait ref. Fixes #104808
2022-12-06Rollup merge of #105254 - cjgillot:issue-105251, r=oli-obkMatthias Krüger-0/+28
Recurse into nested impl-trait when computing variance. Fixes https://github.com/rust-lang/rust/issues/105251
2022-12-06Rollup merge of #105098 - lyming2007:issue-103869-fix, r=eholkMatthias Krüger-0/+31
propagate the error from parsing enum variant to the parser and emit out While parsing enum variant, the error message always disappear Because the error message that emit out is from main error of parser The information of enum variant disappears while parsing enum variant with error We only check the syntax of expecting token, i.e, in case https://github.com/rust-lang/rust/issues/103869 It will error it without telling the message that this error is from pasring enum variant. Propagate the sub-error from parsing enum variant to the main error of parser by chaining it with map_err Check the sub-error before emitting the main error of parser and attach it. Fix https://github.com/rust-lang/rust/issues/103869
2022-12-06Rollup merge of #105005 - estebank:where-clause-lts, r=compiler-errorsMatthias Krüger-0/+74
On E0195 point at where clause lifetime bounds Fix #104733
2022-12-06Replace usage of `ResumeTy` in async lowering with `Context`Arpad Borsos-16/+23
Replaces using `ResumeTy` / `get_context` in favor of using `&'static mut Context<'_>`. Usage of the `'static` lifetime here is technically "cheating", and replaces the raw pointer in `ResumeTy` and the `get_context` fn that pulls the correct lifetimes out of thin air.
2022-12-06add a test for #104260Takayuki Maeda-0/+14
2022-12-05review comment: add test caseEsteban Küber-1/+18
2022-12-05On E0195 point at where clause lifetime boundsEsteban Küber-0/+57
Fix #104733
2022-12-05Avoid ICE by accounting for missing typeEsteban Küber-0/+130
Fix #105330