about summary refs log tree commit diff
path: root/tests/ui/regions
AgeCommit message (Collapse)AuthorLines
2023-12-16Make IMPLIED_BOUNDS_ENTAILMENT into a hard error from a lintMichael Goulet-15/+33
2023-12-10remove redundant importssurechen-3/+0
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-12-07recurse into refs when comparing tys for diagnosticsjyn-8/+8
2023-11-24Show number in error message even for one errorNilstrieb-76/+76
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-20s/generator/coroutine/Oli Scherer-1/+1
2023-10-08remove trailing dotsAli MJ Al-Nasrawy-22/+22
2023-10-08always show and explain sub regionAli MJ Al-Nasrawy-16/+85
2023-10-08improve the suggestion of generic_bound_failureAli MJ Al-Nasrawy-15/+25
2023-10-05Add a note to duplicate diagnosticsAlex Macleod-0/+2
2023-08-30Test and note unsafe ctor to fn ptr coercionMichael Goulet-4/+0
Also remove a note that I don't consider to be very useful in context.
2023-08-09Point out expectation even if we have RegionsInsufficientlyPolymorphicMichael Goulet-5/+15
2023-07-25write-long-types-to-disk: update testsMahdi Dibaiee-4/+2
2023-07-24new unstable option: -Zwrite-long-types-to-diskMahdi Dibaiee-1/+2
This option guards the logic of writing long type names in files and instead using short forms in error messages in rustc_middle/ty/error behind a flag. The main motivation for this change is to disable this behaviour when running ui tests. This logic can be triggered by running tests in a directory that has a long enough path, e.g. /my/very-long-path/where/rust-codebase/exists/ This means ui tests can fail depending on how long the path to their file is. Some ui tests actually rely on this behaviour for their assertions, so for those we enable the flag manually.
2023-07-10Do not set up wrong span for adjustmentsMichael Goulet-3/+6
2023-07-03update testslcnr-17/+1
2023-05-21Rename `drop_copy` lint to `dropping_copy_types`Urgau-1/+1
2023-05-10Adjust tests for new drop and forget lintsUrgau-3/+5
2023-04-11remove issue-2718.rs testlcnr-327/+0
this test was added for rust 0.4 and doesn't test anything specific. The repro originally relied on extern functions which are now just ordinary methods. It's also a run pass test even though `main` has been commented out.
2023-02-23Auto merge of #108324 - notriddle:notriddle/assoc-fn-method, ↵bors-2/+2
r=compiler-errors,davidtwco,estebank,oli-obk diagnostics: if AssocFn has self argument, describe as method Discussed in https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.22associated.20function.22.20vs.20.22method.22/near/329265515 This commit also changes the tooltips on rustdoc intra-doc links targeting methods. For anyone not sure why this is being done, see the Reference definitions of these terms in <https://doc.rust-lang.org/1.67.1/reference/items/associated-items.html#methods> > Associated functions whose first parameter is named `self` are called methods and may be invoked using the [method call operator](https://doc.rust-lang.org/1.67.1/reference/expressions/method-call-expr.html), for example, `x.foo()`, as well as the usual function call notation. In particular, while this means it's technically correct for rustc to refer to a method as an associated function (and there are a few cases where it'll still do so), rustc *must never* use the term "method" to refer to an associated function that does not have a `self` parameter.
2023-02-22Rollup merge of #108176 - compiler-errors:bad-lexical-region-resolve-bug, ↵Matthias Krüger-0/+37
r=oli-obk Don't delay `ReError` bug during lexical region resolve Lexical region resolution returns a list of `RegionResolutionError` which don't necessarily correspond to diagnostics being emitted. The compiler may, validly, throw away these resolution errors and do something else. Therefore it's not valid to use `ReError` during lifetime resolution, since we may actually be on a totally fine compilation path. For example, the `implied_bounds_entailment` lint runs region resolution twice, and only emits an error if it fails both times. If we delay a bug and create a `ReError` during this first run, then we will ICE. Fixes #108170 ---- Side-note: this is conceptually equivalent to how we can't necessarily delay bugs or create `ty::Error` during trait solving/fulfillment, since the compiler is allowed to throw away these fulfillment errors to do other things. It's only once we actually emit an error (`report_region_errors` / `report_fulfillment_errors`)
2023-02-22diagnostics: update test cases to refer to assoc fn with `self` as methodMichael Howell-2/+2
2023-02-22Convert a hard-warning about named static lifetimes into lint "unused_lifetimes"Zhi Qi-15/+45
Define the `named_static_lifetimes` lint This lint will replace the existing hard-warning. Replace the named static lifetime hard-warning with the new lint Update the UI tests for the `named_static_lifetimes` lint Remove the direct dependency on `rustc_lint_defs` fix build Signed-off-by: Zhi Qi <qizhi@pingcap.com> use "UNUSED_LIFETIMES" instead Signed-off-by: Zhi Qi <qizhi@pingcap.com> update 1 test and fix typo Signed-off-by: Zhi Qi <qizhi@pingcap.com> update tests Signed-off-by: Zhi Qi <qizhi@pingcap.com> fix tests: add extra blank line Signed-off-by: Zhi Qi <qizhi@pingcap.com>
2023-02-17Don't delay ReError bug during lexical region resolveMichael Goulet-0/+37
2023-02-12fix UB in ancient testRalf Jung-4/+4
2023-01-30Mention fn coercion rules (needs to be expanded)Esteban Küber-0/+4
2023-01-30Don't show `for<'lt>` in force trimmed pathsEsteban Küber-1/+1
2023-01-25Rollup merge of #107255 - lcnr:implied-b-hr, r=oli-obkMatthias Krüger-0/+35
add test where we ignore hr implied bounds r? types
2023-01-24add test where we ignore hr implied boundslcnr-0/+35
2023-01-15Tweak E0597Esteban Küber-2/+14
CC #99430
2023-01-11Move /src/test to /testsAlbert Larsan-0/+8428