about summary refs log tree commit diff
path: root/src/test/ui/regions
AgeCommit message (Collapse)AuthorLines
2019-04-25Rollup merge of #60160 - xldenis:fix-overlapping-zero-width-annotation, ↵Mazdak Farrokhzad-3/+1
r=estebank Fix #58270, fix off-by-one error in error diagnostics. This fixes #58270 by checking if two diagnostics overlap completely when we're calculating the line offset for each message.
2019-04-22Fix #58270, fix off-by-one error in error diagnostics.Xavier Denis-3/+1
2019-04-22Remove double trailing newlinesvarkor-1/+0
2019-04-22update tests for migrate mode by defaultMatthew Jasper-1190/+369
2019-04-19Rollup merge of #60052 - varkor:unused-parameter-diagnostic, r=estebankMazdak Farrokhzad-1/+1
Correct unused parameter diagnostic The message was incorrect for unused lifetime parameters. There's no need to be specific.
2019-04-18Update testsvarkor-1/+1
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-56/+14
2019-03-25When moving out of a for loop head, suggest borrowing it in nll modeEsteban Küber-5/+4
2019-03-17Updated UI test output to remove test annotations for revisionsMathias Blikstad-17/+17
2019-03-15rustc: print elided regions as '_ instead of nothing, and use a separate ↵Eduard-Mihai Burtescu-2/+2
check when optional.
2019-03-11Update tests that don't run on my platformVadim Petrochenkov-32/+0
2019-03-11Update NLL testsVadim Petrochenkov-25/+25
2019-03-11Update testsVadim Petrochenkov-181/+181
2019-02-21update test files to reflect new outputNiko Matsakis-9/+19
One surprise: old-lub-glb-object.rs, may indicate a bug
2019-01-19Handle lifetime annotations in unreachable codeMatthew Jasper-9/+235
We equate the type in the annotation with the inferred type first so that we have a fully inferred type to perform the well-formedness check on.
2019-01-17Update testsMark Mansi-2/+2
2019-01-14Auto merge of #57387 - euclio:nonstandard-style-suggestions, r=oli-obkbors-26/+1
Use structured suggestions for nonstandard style lints This PR modifies the lints in the nonstandard_style group to use structured suggestions. Note that there's a bit of tricky span calculation going on for the `crate_name` attribute. It also simplifies the code a bit: I don't think the "fallback" suggestions for these lints can actually be triggered. Fixes #48103. Fixes #52414.
2019-01-13Tweak output of type mismatch between "then" and `else` `if` armsEsteban Küber-3/+5
2019-01-08improve non_snake_case diagnosticsAndy Russell-26/+1
Use a structured suggestion and tighten the span to just the identifier.
2019-01-02improve handling for subtypeNiko Matsakis-33/+24
Still not great, but good enough to land this PR.
2019-01-02tests: cases where we now do the right thing but did not beforeNiko Matsakis-10/+25
Fixes #33684
2019-01-02tests: worse diagnostics, but basically same errorsNiko Matsakis-24/+33
2018-12-30Stop well-formedness checking unreachable code.David Wood-17/+2
This commit stops well-formedness checking applying to unreachable code and therefore stops some of the ICEs that the intended solution taken by this PR causes. By disabling these checks, we can land the other fixes and larger refactors that this PR includes.
2018-12-30Fix unresolved inference variable ICE.David Wood-1/+1
This commit moves well-formedness check for the `UserTypeAnnotation::Ty(..)` case from always running to only when the code is reachable. This solves the ICE that resulted from `src/test/ui/issue-54943-1.rs` (a minimal repro of `dropck-eyepatch` run-pass tests that failed). The main well-formedness check that was intended to be run despite unreachable code still is, that being the `UserTypeAnnotation::TypeOf(..)` case. Before this PR, the other case wasn't being checked at all. It is possible to fix this ICE while still always checking well-formedness for the `UserTypeAnnotation::Ty(..)` case but that solution will ICE in unreachable code for that case, the diff for that change [can be found here](0). [0]: https://gist.github.com/davidtwco/f9751ffd9c0508f7251c0f17adc3af53
2018-12-30Always check well-formedness.David Wood-8/+21
This commit uses the map introduced by the previous commit to ensure that types are always checked for well-formedness by the NLL type check. Previously, without the map introduced by the previous commit, types would not be checked for well-formedness if the `AscribeUserType` statement that would trigger that check was removed as unreachable code.
2018-12-25Remove licensesMark Rousskov-1761/+558
2018-12-24make non_camel_case_types an early lintAndy Russell-151/+150
2018-12-12Add test of current behavior (infer free region within closure body) ↵Felix S. Klock II-0/+74
previously not in test suite.
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-25/+25
2018-12-04Remove unused stderr fileOliver Scherer-49/+0
2018-12-04Update testsOliver Scherer-38/+0
2018-11-07Removed `#[rustc_error]` from tests that are all `// compile-pass`.Felix S. Klock II-110/+30
I also added `// skip-codegen` to each one, to address potential concerns that this change would otherwise slow down our test suite spending time generating code for files that are really just meant to be checks of compiler diagnostics. (However, I will say: My preference is to not use `// skip-codegen` if one can avoid it. We can use all the testing of how we drive LLVM that we can get...) (Updated post rebase.)
2018-11-07remove `#[rustc_error]` from ui/ tests that remain compile-fail tests.Felix S. Klock II-2/+2
2018-10-25Auto merge of #54490 - wesleywiser:rewrite_it_in_mir, r=oli-obkbors-2/+27
Rewrite the `UnconditionalRecursion` lint to use MIR Part of #51002 r? @eddyb
2018-10-24port the relate-types code from NLL type-check into a type-opNiko Matsakis-17/+2
Add regression tests for #55219 and #55241 Also another test where a duplicate-like error appears to have been suppressed; I'm not 100% sure why this output changes, though I could imagine that some duplicate suppression is enabled by this PR.
2018-10-22stop reporting "unsatisfied lifetime bounds" errors after the firstNiko Matsakis-26/+3
In particular, after the first for a given region variable. This suppresses a lot of duplicate errors.
2018-10-21Use new region infer errors for explaining borrowsMatthew Jasper-408/+424
This gives at least some explanation for why a borrow is expected to last for a certain free region. Also: * Reports E0373: "closure may outlive the current function" with NLL. * Special cases the case of returning a reference to (or value referencing) a local variable or temporary (E0515). * Special case assigning a reference to a local variable in a closure to a captured variable.
2018-10-17Update output for borrowck=migrate compare mode.David Wood-1090/+0
This commit updates the test output for the updated NLL compare mode that uses `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The previous commit changes `compiletest` and this commit only updates `.nll.stderr` files.
2018-10-12Auto merge of #54942 - matthewjasper:wf-type-annotations, r=nikomatsakisbors-84/+215
[NLL] Check user types are well-formed Also contains a change of span for AscribeUserType. I'm not quite sure if this was what @nikomatsakis was thinking. Closes #54620 r? @nikomatsakis
2018-10-10Check user types are well-formed in MIR borrow checkMatthew Jasper-60/+191
Also update some tests so that they don't have user types on `_` in unreachable code.
2018-10-10Use the span of the user type for `AscribeUserType`Matthew Jasper-24/+24
Also change the order of the fake read for let and the AscribeUserType, so that we use the better span and message from the fake read in errors.
2018-10-09Improve message for closure returning a closure.David Wood-1/+1
Now when a `FnMut` closure is returning a closure that contains a reference to a captured variable, we provide an error that makes it more clear what is happening.
2018-10-09Improve errors for `FnMut` closures.David Wood-6/+6
This commit improves the errors for `FnMut` closures where a reference to a captured variable is escaping.
2018-10-06Improve closure region bound errorsMatthew Jasper-19/+11
Now use the category and span that are associated to the most interesting bound that led to the closure bound.
2018-10-03Rewrite the `UnconditionalRecursion` lint to use MIRWesley Wiser-2/+27
Part of #51002
2018-10-03Clearer later use messages for callsMatthew Jasper-13/+10
Give a special message when the later use is from a call. Use the span of the callee instead of the whole expression. For conflicting borrow messages say that the later use is of the first borrow.
2018-09-27Enable NLL compare mode for more testsMatthew Jasper-56/+194
These tests were disabled due to NLL bugs that have since been fixed.
2018-09-26apply `process_registered_region_obligations` at the end of regionckNiko Matsakis-2/+2
We used to apply it repeatedly as we went, relying on the current value of the `region_bound_pairs_accum` vector. But now we save those values into a map, so we can just process all the registered region obligations at the end.
2018-09-25Update E0714 to E0716 in tests outputMikhail Modin-17/+17
2018-09-25add "temporary value dropped while borrowed" errorMikhail Modin-26/+72
Issue #54131